cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX 6.3.0 -> 6.4.0 migration, some sources missing in C_SOURCES list of the generated makefile

Martin M.
Associate II

I migrated an STM32F401 project from CubeMX 6.3.0 to CubeMX 6.4.0 (on a Windows 10 machine),

Now, after the migration, I see that some files are missing in the C_SOURCES list in my customized makefile.

All files of the following paths are missing, respectively have been removed by CubeMX 6.4.0 from the previous (working) makefile.

Drivers/STM32F4xx_HAL_Driver/Src/...
Middlewares/Third_Party/FreeRTOS/Source/...
 

I did a lot of such makefile project migrations in the past, starting from STM32CubeMx 4.x, and I never experienced such a problem till now. (I experienced other issues like CubeMX not correctly initializing variable "uwTickPrio", but that are different stories...)

I also see changes in the generated .mxproject file (by CubeMX 6.4.0), that could be a hint about what's going on here.

1.) There are now backslashes in the paths instead of forward slashes(?)

2.) The HeaderPath and the SourcePath became relative instead of absolute.

excerpt of .mxproject file by CubeMX 6.3.0 (before migration):

[PreviousLibFiles]
LibFiles=Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h
 
....
 
[PreviousGenFiles]
HeaderPath=D:/arm-projects/vz_head5/Inc
HeaderFiles=FreeRTOSConfig.h;stm32f4xx_it.h;stm32f4xx_hal_conf.h;main.h;
SourcePath=D:/arm-projects/vz_head5/Src
SourceFiles=freertos.c;stm32f4xx_it.c;stm32f4xx_ ...

excerpt of .mxproject file by CubeMX 6.4.0 (after migration):

[PreviousLibFiles]
LibFiles=Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc.h;
 
....
 
[PreviousGenFiles]
HeaderPath=..\Inc
HeaderFiles=FreeRTOSConfig.h;stm32f4xx_it.h;stm32f4xx_hal_conf.h;main.h;
SourcePath=..\Src
SourceFiles=freertos.c;stm32f4xx_it.c;stm32f4xx_hal_msp.c;stm32f4xx_hal_timebase_tim.c;main.c;

I don't know if I missed something when migrating from CubeMX 6.3.0 to 6.4.0, but my makefile is definitely broken after the migration.

Glad to have a working versioning system to quickly and easily revert the changes. :grinning_face_with_sweat:

Would be interesting if someone made a similar experience or knows more about what's going on here.

Thanks in advance and have a nice day!

3 REPLIES 3
Sara BEN HADJ YAHYA
ST Employee

Hi @Martin M.​ ,

Thanks for your feedback,

Could you please share your .ioc file before migration to CubeMX 6.4.0 and did you test your project after migration and noticed some errors?

Regards,

Sara.

Martin M.
Associate II

Hi @Sara BEN HADJ YAHYA​ ,

Thanks a lot for your quick reply.

I've attached a zip file, containing two complete projects in separate folders:

  • stm32_cubemx_demo_6_3_0_build_ok

This folder contains basic parts of my project (stripped down, not containing any private code) which will successfully build with gcc, and which was generated using STM32 CubeMX 6.3.0

  • stm32_cubemx_demo_migrated_to_6_4_0_build_not_ok

This folder contains the same project as above, but only migrated to STM32 CubeMX 6.4.0 (no additional changes), and the project will not build due to some files (especially HAL drivers and FreeRTOS files, see below) missing in the generated makefile (C_SOURCES).

The files missing in the makefile (C_SOURCES) of the migrated project are:

Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_adc.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_iwdg.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c \
Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c \
Src/system_stm32f4xx.c \
Middlewares/Third_Party/FreeRTOS/Source/croutine.c \
Middlewares/Third_Party/FreeRTOS/Source/event_groups.c \
Middlewares/Third_Party/FreeRTOS/Source/list.c \
Middlewares/Third_Party/FreeRTOS/Source/queue.c \
Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.c \
Middlewares/Third_Party/FreeRTOS/Source/tasks.c \
Middlewares/Third_Party/FreeRTOS/Source/timers.c \
Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c \
Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c \
Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c

Hope this helps for further investigations, and I also hope, that I'm not doing something basically wrong here. :smiling_face_with_halo:

I will stay with CubeMX 6.3.0 for the time being, since my projects do "not really" benefit from migrating to 6.4.0 so far.

Thanks again and kind regards.

Sara BEN HADJ YAHYA
ST Employee

Hello @Martin M.​ ,

Thanks for your feedback,

This issue is reported internally to be checked.

I will keep you posted with the updates.

If you issue is solved, please close this post by clicking the "Select as Best" button. This will help other members of the community find this response more quickly :)

Regards,

Sara.