cancel
Showing results for 
Search instead for 
Did you mean: 

Hi! I am new to all this stuff. While transfering Keil project to Cube IDE I'm facing many issues, is there a proper step by step tutorial or help on how to transfer kei project to cubeIDE? Also help me with following errors

AKhan.6
Associate

Errors

  • fatal error: rt_sys.h: No such file or directory

 #include <rt_sys.h>

I have this fuction in somefile

 __asm void MSR_MSP(u32 addr)

{

 MSR MSP, r0 //set Main Stack value

 BX r14

}

  • error: expected '(' before 'void'

 __asm void MSR_MSP(u32 addr)

  • error: expected identifier or '(' before string constant

  volatile("MSR MSP, r0")  

4 REPLIES 4
TDK
Guru

Might be easier to generate a project in CubeIDE and then transfer your user code over. Kiel uses a different compiler, so a lot of system files are not going to transfer over well.

If you feel a post has answered your question, please click "Accept as Solution".

You don't have rt_sys.h and probably don't need it. If you have semi-hosting for putchar/fputc then you're going to have to replace that plumbing with GNU/GCC equivalent code.

You'll also need to move to CMSIS supported __set_MSP() from Drivers\CMSIS\Include\cmsis_gcc.h

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
prain
Senior III

cubeide uses GCC. GCC have different naming conventions ​than ARMCC used by keil. for example writing assembly functions is different. Read gcc-arm-non-eabi documentation for more details.

S.Ma
Principal

Create a cubeIDE project, set the mcu and packages and the peripheral and clocks settting and from there, import your source files incrementally.

Eclipse fans will like CubeIDE, Keil or IAR...