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
Peter BENSCH
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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.

 

Peter BENSCH
ST Employee

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.

@Imen.D 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Imen.D
ST Employee

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).

 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
MartinDQ
Associate III

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.

Pavel A.
Evangelist III

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 ))

 

MartinDQ
Associate III

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.

Imen.D
ST Employee

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.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

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