title: Pre-processor macro to convert an hex string to a byte array
body: <p>I've defined an AES-128 key as a build symbol inside my IDE, so that it calls GCC like this:</p>
  
  <pre><code>arm-none-eabi-gcc -D"AES_KEY=3B7116E69E222295163FF1CAA1681FAC" ...
  </code></pre>
  
  <p>(which is equivalent to <code>#define AES_KEY 3B7116E69E222295163FF1CAA1681FAC</code>)</p>
  
  <p>The advantage is that the same symbol can also be passed automatically as a parameter to a post-build CLI script that encrypts the compiled code with this key (e.g. for a secure firmware update)...</p>
  
  <p>But how to store this key as a byte array in 
   my code?
  I would like to define a pre-processor macro which does the conversion:</p>
  
  <pre><code>uint8_t aes_key[] = { SPLIT_MACRO(AES_KEY) };
  </code></pre>
  
  <p>to</p>
  
  <pre><code>uint8_t aes_key[] = {0x3B, 0x71, 0x16, 0xE6, 0x9E, 0x22, 0x22, 0x95, ...};
  </code></pre>
  
  <p>In other words, could the GCC pre-processor split the key string in 2-char blocks and add "<code>, 0x</code>" between them?</p>