cancel
Showing results for 
Search instead for 
Did you mean: 

After migrating project from CubeMX 6.9 to 6.11.0 two sys.C-files was deleted but forced in Makefile

MartinDQ
Associate III

I updated STM32CubeMX 6.9 to 6.11.0 and migrated my previously configured project (for stm32h735) to new version and now I have a problem that everytime I re-generate the code the compiler complains about missing syscalls.c, sysmem.c files. This files doesn't exist anywhere in the project neither CubeMX folder. The code generator always places this files in generated Makefile at the end of C_SOURCES list and I have to manually delete this 2 lines. Is there some option to not include this non-existing files in Makefile? Or how could I generate them again?

the Makefile:

# C sources
C_SOURCES = \
Core/Src/main.c \

...user c files...

Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc_ex.c \

..HAL files...

Core/Src/sysmem.c \
Core/Src/syscalls.c

# ASM sources
ASM_SOURCES = \
startup_stm32h735xx.s

...

12 REPLIES 12

Exactly. If there's harcoded adding this two files in the Makefile then the code migrator should check for presence of this files and (re)generate them.

>  the code migrator should check for presence of this files and (re)generate them.

A compromise solution can be using for this a post-generation command (script). You can do it today rather than waiting half year for ST.

Post .bat scripts (calling Powershell scrips) to do anything useful could be a workaround as you say but I ended up just creating two empty files:

Core/Src/sysmem.c
Core/Src/syscalls.c

On a side note, ST needs to update the documentation regarding pre/post code generation scripts. I couldn't find anything in the docs regarding this.