title: Placing variables in absolute memory location (IAR C/C++)
body: <p>I am working on an STM8S microcontroller with the IAR Compiler.</p>
  <p>How can I fix the start location for more then one variable using a pragma or another method?</p>
  <p>When I try the below code, the compiler gives this error message:</p>
  <blockquote>
  <p>Error[Lp025]: absolute section .near.bss (main.o #12)
  ([0x000100-0x000100]) overlaps with absolute section .near.bss
  (main.o #8) ([0x000100-0x000100])</p>
  </blockquote>
  <p>I searched on IAR tech notes for &quot;Absolute located variable&quot; but I couldn't find any info.</p>
  <pre class="lang-c prettyprint-override"><code>#pragma location = 0x100   /* Start address of absolute location */
  
  extern uint8_t        R0,
                        R1,
                        R2,
                        R3,
  extern uint16_t       M1;           
  extern uint8_t        M2,    
                        M3;    
  </code></pre>