Skip to main content
Visitor II
May 14, 2025
Question

Custom FP-AI-Monitor1 problem

  • May 14, 2025
  • 2 replies
  • 539 views

Hi,

I want to add some functions to the FP-AI-MONITOR1 project, but I prefer to compile it using CMake for better compatibility with AI agents and the STM32Cube VS Code extension.

I’ve created the CMakeLists.txt files and successfully compiled the project. However, the firmware doesn’t run as expected compared to when I compile it using STM32CubeIDE.

It gets stuck after calling HAL_Delay(1000); if any of the following code blocks are not commented out:

 if (SysDebugInit() != 0) {
 sys_error_handler();
 }
if (xTaskCreate(InitTaskRun, "INIT", INIT_TASK_CFG_STACK_SIZE, NULL, INIT_TASK_CFG_PRIORITY, &s_xTheSystem.m_xInitTask) != pdPASS) {
 xRes = SYS_OUT_OF_MEMORY_ERROR_CODE;
 SYS_SET_SERVICE_LEVEL_ERROR_CODE(xRes);
 }

Both lines of code are in SysInit function in sysinit.c file.


Can anyone tell me what might be causing this error? Also, is there an easy way to convert an STM32CubeIDE project into a CMake project or into STM32CubeMX ioc file? I need to use Manus AI to generate the CMakeLists.txt files that include all the necessary files for compilation. Thank you.

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    May 14, 2025

    Hi @deddy11 

    I'm currently traying to export this project to VSCode and check if I have the same issue but at first sight I think you have an issue with the file initializing your systick maybe an msp setting the timer as systick source

    deddy11Author
    Visitor II
    May 15, 2025

    Hi @Nawres GHARBI 
    Thanks for you response. I have tried to use SystemClock_Config functions both from FP-AI-Monitor1 and from other project, but both get stuck. I'll wait for your result. Thanks.

    Technical Moderator
    May 15, 2025

    could you please share your systick, timing and interrupts config please ?