cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX not generating syscalls.c and sysmem.c

mbaer_zg
Associate

Hi everyone,

I used STM32CubeMX (version 6.11.1) to generate the initialization code for an STM32G491RCT.
The toolchain is configured as a Makefile project.

At the end of the C_SOURCES definition, it specifies sysmem.c and syscalls.c.

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

However, those two files were not generated, resulting in the following error:

make: *** No rule to make target 'build/sysmem.o', needed by 'build/firmware.elf'. Stop.

Is this a bug in STM32CubeMX or am I supposed to implement the functions myself?

3 REPLIES 3
STTwo-32
ST Employee

Hello @mbaer_zg and welcome to the ST Community 😊.

I'm not able to reproduce this

STTwo32_0-1714117817654.png

Can you add more details.

Best Regards.

STTwo-32

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.

I tested a few configurations and I think it is a combination of "STM32Cube MCU packages and embedded software packs" setting and regenerating.

If I have a blank project (only .ioc, no files generated) and I generate the source files for the first time with "Copy only the necessary library files" selected, then the sysmem.c and syscalls.c won't be generated.

mbaer_zg_0-1714120136551.png

When I do the same thing (blank project, first generation) but I select "Copy all used libraries into the project folder", then the sysmem.c and syscalls.c get generated.

If I delete the two files and regenerate, the files don't get regenerated.

You can reproduce the behavior by creating a new project, selecting "Copy only the necessary library files" and generating the code.

a_user
Associate

I saw this issue when I migrated my makefile project from STM32CubeMX v6.11.0 to v6.11.1. My also have the "Copy Only Necessary library files" option selected.

My old project folder using v6.11.0 did not contain sysmem.c and syscalls.c files.

After the migration and subsequent regenerating the makefile now contains the extra two lines for sysmem.c and syscalls.c but the folder does not contain these files.