Diference between two arm gcc compiler version

Asked by Caique Cardoso

I'm trying to compile a simple export code from mbed using their rtos, if I use the version GCC ARM Embedded 2011-q4-major every thing is fine, but if a try using version GCC ARM Embedded 4.6-2012-q1-update or version GCC ARM Embedded 4.6-2012-q2-update a receive the follow message:

mbed-rtos/rtx/LPC1768/GCC_ARM/HAL_CM3.s:62: Error: selected processor does not support requested special purpose register -- `msr PSP,R0'
mbed-rtos/rtx/LPC1768/GCC_ARM/HAL_CM3.s:80: Error: selected processor does not support requested special purpose register -- `mrs R0,PSP'
mbed-rtos/rtx/LPC1768/GCC_ARM/HAL_CM3.s:100: Error: selected processor does not support requested special purpose register -- `msr PSP,R0'
mbed-rtos/rtx/LPC1768/GCC_ARM/HAL_CM3.s:107: Error: selected processor does not support requested special purpose register -- `msr CONTROL,R0'
....

Why this difference?

Thanks.

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Terry Guo (terry.guo) said :
#1

Hi Caique,

Those are assembler messages. There is an assembler bug in 2011-q4-major release. When target isn't specified through -mcpu or -march, the above instructions will be incorrectly assembled without generating error message. In the following two releases, we fixed this bug by checking targets when assemble instructions that use "PSP" and "CONTROL" registers. When the target isn't explicitly specified, the default target used by our tool chain will be armv4t, those registers can't apply to it.

So for your case, you need to explicitly specify target with options like -mcpu=cortex-m3. Here is a useful link http://mbed.org/forum/bugs-suggestions/topic/3879/?page=1#comment-19318.

BR,
Terry

Can you help with this problem?

Provide an answer of your own, or ask Caique Cardoso for more information if necessary.

To post a message you must log in.