That means it tried to do a SVC (supervisor call) instruction, which is supposed to catapult it into the SVC_Handler() interrupt function provided the by the RTOS, but there was no such interrupt function defined, causing it to go into the the default handler (infinite loop) instead.
Looking at the original project, there is a lib/RTOS2/RTX/Source/GCC/irq_cm4f.S file that defines all the interrupt functions that the RTOS needs (SysTick_Handler, PendSV_Handler, SVC_Handler). With a STM32F103C8, you obviously have a Cortex-M3 instead of a Cortex-M4F.
The original RTOS2 source in CMSIS5 has a “GCC” folder here:
https://github.com/ARM-software/CMSIS_5/tree/5.9.0/CMSIS/RTOS2/RTX/Source
which is completely not present in your project. And, while they seemed to have renamed the files in this new version, your Cortex-M3 still falls under the ARMv7-M architecture.
Thus, I would suggest:
- copy RTOS2/RTX/Source/GCC/irq_armv7m.S into your project’s
lib\rtos\rtx\Source\GCCfolder - set
lib_archive = no(docs) in yourplatformio.ini. This is extremely important, too. When a libary (something inlib/) defines an interrupt handler, the intermediate packing of the object files to an archive file and then linking it can cause the interrupt handler to not be found, you have to disable the archiving step for it to work.- note: In this project, it seems to work without it, too, but for safety reasons I would still add it.
