2024-03-25 12:24 PM
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
...
2024-03-25 01:36 PM
The question has already been discussed a few times in the community, e.g. here, where HBoss.1 has shown a very simple solution.
Hope that helps?
Regards
/Peter
2024-03-25 02:14 PM
But I don't use STM32CubeIDE (just MX for configuring the project, then GNU toolchain).
I already have defined _write and _read in my main.c
Well so I created a new project and copied sysmem.c and syscalls.c to my project directory and rebuild it.Now it seems to be OK. But accidental removing of these files is a bug or not? At least it should be synchronized with Makefile content.
2024-03-26 12:02 AM
Oh, right, sorry, I had read too quickly and only noticed "missing syscalls.c, sysmem.c files". For make files and CubeMX this would need to be looked at more closely.
2024-03-26 01:07 AM
Hello @MartinDQ ,
Could you please share your .ioc file before migration to CubeMx 6.11.0, this will help to reproduce the issue.
If possible, attach a zip file for the two complete projects (before and after migration).
2024-03-26 09:13 AM - edited 2024-03-26 09:15 AM
I have to correct myself, I looked at my old GIT commits and found that I never had that files syscalls.c, sysmem.c in my project. So the only difference is that before the code generator didn't put this files in Makefile and now it does.
Here are attached both IOC files.
2024-03-26 09:54 AM
Maybe this has been changed because other users complained that these two files are not included in the makefile. Now these users should be happy ))
2024-03-26 10:00 AM
Maybe, but it I think that migration process should create this files or there should be a clickable option in MX if add this files to makefile or not... Forcing something without an option is generally bad idea.
2024-03-26 05:14 PM
Hello @MartinDQ,
The adopted change is that Makefile projects generate sysmem.c and syscalls.c files, as requested by users.
This would keep CubeMx in sync with GCC toolchain development.
2024-03-27 01:31 AM
The problem seems to be that migrated Makefile projects adds the entiries to the Makefile but the actual files are not generated in /Core (or anywhere else). This causes compile error as the files are missing.
In my case I migrated from FW_L4 V1.17.2 to V1.18.0 when moving from CubeMX 6.8 to 6.11