How to modify the freertos code to adapter ghs compiler?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to modify the freertos code to adapter ghs compiler?

1,255 Views
dongliangwang
Contributor I

Hi, NXP

I have a question about compiling the FreeRTOS code of MPC574XG  in GHS MULTI IDE.

With GNU C mode enabled and enable the option "-gnu_asm_se_vle_register", most of the asm compile errors disappeared. Unfortunately there is one error existing such as " cannot allocate "numberR3" to specified caller-saved register".

pastedImage_2.png

Could you give me some advice how to fix the error in GHS MULTI compiler ?

0 Kudos
Reply
2 Replies

1,129 Views
dongliangwang
Contributor I

 Hi Sliva,

Thank you for your advice. The "accept gnu __asm__ statements" option have already enabled, but ghs compiler also reported error.

And I try to change r3 to another register, the error still exists.

I try to remove  "__asm__("r3") " in the code and it can work. Will the modification impact stability of freertos?  

Of course, I will also contact GHS.

0 Kudos
Reply

1,129 Views
stanish
NXP Employee
NXP Employee

Hi,

Have you enabled "accept gnu __asm__ statements" option?

Can you try to use any other register e.g. r24 instead of r3 -  just to check the compiler accepts it?

Anyway I'd recommend you to contact GHS support for more information about GHS compiler details.

Regards,

Stan

0 Kudos
Reply