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.
-
Add
context_gcc.s
files. 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
-
Modify the startup file (modify startup_stm32f103xb.s), will
bl main
be changedbl 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