title: Error: Offset out of range, in CoIDE
body: <p>I am trying out CooCox CoIDE for developing software to a STM32F100.</p>
  
  <p>When I compile after adding CooCox RTOS (CoOS), I get a error message: </p>
  
  <pre><code>   [cc] Starting link
     [cc] arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -g -nostartfiles -flto -Wl,-Map=OS_Test.map -O0 -Wl,--gc-sections -Wl,--entry=main -LC:\CooCox\CoIDE\configuration\ProgramData\OS_Test -Wl,-TC:\CooCox\CoIDE\configuration\ProgramData\OS_Test/arm-gcc-link.ld -g -o OS_Test.elf ..\obj\kernelHeap.o ..\obj\core.o ..\obj\startup_stm32f10x_md_vl.o ..\obj\core_cm3.o ..\obj\timer.o ..\obj\utility.o ..\obj\system_stm32f10x.o ..\obj\task.o ..\obj\serviceReq.o ..\obj\main.o ..\obj\mbox.o ..\obj\mm.o ..\obj\time.o ..\obj\event.o ..\obj\syscalls.o ..\obj\port.o ..\obj\queue.o ..\obj\mutex.o ..\obj\flag.o ..\obj\arch.o ..\obj\sem.o ..\obj\hook.o
     [cc] C:\Users\Jonas\AppData\Local\Temp\cccpkRF6.s: Assembler messages:
     [cc] C:\Users\Jonas\AppData\Local\Temp\cccpkRF6.s:240: Error: offset out of range
     [cc] C:\Users\Jonas\AppData\Local\Temp\cccpkRF6.s:241: Error: offset out of range
  </code></pre>
  
  <p>I know this isn't much information, but I haven't seen this error before, so i am completely blank, please help :) </p>
  
  <p>EDIT: Oh, and i found out that if I change the optimization from -O0 to -O1 the error becomes: </p>
  
  <pre><code>   [cc] ccKXT9LB.s:1163: Error: registers may not be the same -- `strexb r0,r0,[r1]'
     [cc] ccKXT9LB.s:1188: Error: registers may not be the same -- `strexh r0,r0,[r1]'
  </code></pre>