Modify CubeMX resulting RT-Thread makefile project

Modify CubeMX resulting RT-Thread makefile project

Using RT-Thread official based CubeMX transplanted RT-Thread Nano generated Makefile engineering errors at compile time, simply change it.

  1. Add context_gcc.sfiles. We need to add in the Makefile this .s file, you can find it in CubeMX generated by the project, if you find a file called capital expansion .S please change it to lowercase .s, in case the compilation is not the same .

    # ASM sources
    ASM_SOURCES =  \
    startup_stm32f103xb.s \
    Middlewares/Third_Party/RealThread_RTOS_RT-Thread/libcpu/arm/cortex-m3/context_gcc.s
    
  2. Modify the startup file (modify startup_stm32f103xb.s), will bl mainbe changed bl entry.

    /* Call the application's entry point.*/
    bl entry
    bx lr
    .size Reset_Handler, .-Reset_Handler
    

End modify the compiler should be no problem, but there may be a warning that I am here obj defined but not used, do not ignore it

Guess you like

Origin www.cnblogs.com/Luad/p/12637225.html