cancel
Showing results for 
Search instead for 
Did you mean: 

project creation for enhanced pack fails with ERROR__CUBESCRATCHFILE__STARTUPFILE_INVALID

scaprile
Associate III

I have these working examples for an enhanced package. I work for an ST partner (Cesanta) and ST people in charge of validating the pack for the MadeForSTM32 label requested I moved drivers into a common directory and configure the project to use relative paths in STM32CubeMX
https://wiki.st.com/stm32mcu/wiki/Introduction_to_STM32Cube_Expansion_Packages 5.1 step 2

When I switch the project to use relative paths for the firmware libraries as instructed and generate code again, STM32CubeMX does not modify the .cproject file, so examples won't build anymore.

I noticed this in the STM32CubeMX shell log:

[INFO ] 2023-11-28 19:04:47,713 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Start Cube IDE services
[INFO ] 2023-11-28 19:04:47,720 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Cube IDE services are relying on '1.13.0.23rc2_generators' product version and '16900_20230602_1109(UTC)' build version
[INFO ] 2023-11-28 19:04:47,720 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Analyze Cube IDE services command line
[INFO ] 2023-11-28 19:04:47,726 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Look for Cube IDE service type
[INFO ] 2023-11-28 19:04:47,743 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Use Cube IDE service: 'Mx update project service'
[INFO ] 2023-11-28 19:04:47,743 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Look for Cube IDE service option(s)
[INFO ] 2023-11-28 19:04:47,743 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Check Cube IDE service option(s)
[INFO ] 2023-11-28 19:04:47,744 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Run Cube IDE service
[ERROR] 2023-11-28 19:04:48,158 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Fail to get startup file description from Cube scratch file for configuration 'nucleo-f746zg-cube-baremetal/nucleo-f746zg-cube-baremetal'
[ERROR] 2023-11-28 19:04:48,159 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - ERROR__CUBESCRATCHFILE__STARTUPFILE_INVALID
[ERROR] 2023-11-28 19:04:48,160 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Fail to complete service execution. Return code is '85016'. Related message to is 'ERROR__CUBESCRATCHFILE__STARTUPFILE_INVALID'.
[INFO ] 2023-11-28 19:04:48,160 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Service 'Mx update project service' usage is:
[INFO ] 2023-11-28 19:04:48,161 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - '-source / -src (Optional)' : Project source. Supported ones are: '[CUBE, MANAGED, NONMANAGED]'
[INFO ] 2023-11-28 19:04:48,161 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - '-buildType (Optional)' : Build type. Supported ones are: '[EXEC, LIB]'
[INFO ] 2023-11-28 19:04:48,161 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - '-lang (Optional)' : Project language. Supported ones are: '[CPP, C]'
[INFO ] 2023-11-28 19:04:48,162 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - '-cubeScratchFile / -scratch' : Cube scratch file
[INFO ] 2023-11-28 19:04:48,162 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - End Cube IDE services

Looks like something is missing, I'm eager to help in debugging.

Ubuntu 20.04

STM32CUBEIDE_VERSION=1.13.2
STM32CUBEMX_VERSION=6.9.2

3 REPLIES 3
Imen.D
ST Employee

Hello @scaprile ,

Can you please share your ioc file?

You should check the valid path in your mx.scratch file and .ioc file input data?

ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=
ProjectManager.FirmwarePackage=

 Thanks

Imen

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

Hello @Imen.D 

How come I have to check a path inside a file that was generated by your tool ?

I just started a new project, added our pack, built the project.

Copied contents of the Drivers folder to another one some levels above,

Opened the project with STM32CubeMX, followed instructions as per the link pasted above, things happened as described above.

ProjectManager.CustomerFirmwarePackage= ../../..     set by your tool
ProjectManager.DefaultFWLocation= false              set by your tool
ProjectManager.FirmwarePackage= STM32Cube FW_F7 V1.17.1    (also)

Please find the whole project attached.

-rw-r--r-- 1 root root 26834 dic 5 16:11 .cproject
-rw-r--r-- 1 root root 8535 dic 5 18:20 .mxproject
-rw-r--r-- 1 root root 1178 dic 5 15:47 .project
drwxr-xr-x 2 root root 109 dic 5 15:47 .settings
-rw-r--r-- 1 root root 4769 dic 5 16:11 STM32F746ZGTX_FLASH.ld
-rw-r--r-- 1 root root 4762 dic 5 15:47 STM32F746ZGTX_RAM.ld
-rw-r--r-- 1 root root 10273 dic 5 18:19 test.ioc

Generating code after those changes at 18:20 does not change any of the other files, so proper references for Drivers files are not introduced

This log carries UTC time (I'm at GMT-3):

[INFO ] 2023-12-05 21:20:02,673 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Start Cube IDE services
[INFO ] 2023-12-05 21:20:02,707 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Cube IDE services are relying on '1.13.0.23rc2_generators' product version and '16900_20230602_1109(UTC)' build version
[INFO ] 2023-12-05 21:20:02,707 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Analyze Cube IDE services command line
[INFO ] 2023-12-05 21:20:02,718 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Look for Cube IDE service type
[INFO ] 2023-12-05 21:20:02,833 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Use Cube IDE service: 'Mx generate project service'
[INFO ] 2023-12-05 21:20:02,833 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Look for Cube IDE service option(s)
[INFO ] 2023-12-05 21:20:02,834 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Check Cube IDE service option(s)
[INFO ] 2023-12-05 21:20:02,834 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Run Cube IDE service
[ERROR] 2023-12-05 21:20:03,675 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Fail to get startup file description from Cube scratch file for configuration 'test/test'
[ERROR] 2023-12-05 21:20:03,677 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - ERROR__CUBESCRATCHFILE__STARTUPFILE_INVALID
[ERROR] 2023-12-05 21:20:03,781 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Fail to get startup file description from Cube scratch file for configuration 'test/test'
[ERROR] 2023-12-05 21:20:03,781 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - ERROR__CUBESCRATCHFILE__STARTUPFILE_INVALID
[ERROR] 2023-12-05 21:20:03,782 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Fail to complete service execution. Return code is '85016'. Related message to is 'ERROR__CUBESCRATCHFILE__STARTUPFILE_INVALID'.
[INFO ] 2023-12-05 21:20:03,782 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - Service 'Mx generate project service' usage is:
[INFO ] 2023-12-05 21:20:03,782 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - '-source / -src (Optional)' : Project source. Supported ones are: '[CUBE, MANAGED, NONMANAGED]'
[INFO ] 2023-12-05 21:20:03,783 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - '-buildType (Optional)' : Build type. Supported ones are: '[EXEC, LIB]'
[INFO ] 2023-12-05 21:20:03,783 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - '-lang (Optional)' : Project language. Supported ones are: '[CPP, C]'
[INFO ] 2023-12-05 21:20:03,783 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - '-cubeScratchFile / -scratch' : Cube scratch file
[INFO ] 2023-12-05 21:20:03,784 com.st.stm32cube.ide.common.services.mx.rcp.CubeIdeServices - End Cube IDE services

 

Really ? No support ?