2020-07-16 01:13 PM
Hi I used STM32CubeMX to create a new project for STM32F030F4 + STM32CubeIDE.
The project was created, but when I compile, all the data by default is mapped to address 0x00008000, just after the valid range of the flash mirror. How strange...
Problem one: The file STM32F030F3Px_FLASH.ld was never created in my project, so I found one online and put it into my project folder
Problem two: The linker argument builder is not able to resolve the ${workspace_loc:/${ProjName}/STM32F030F4PX_FLASH.ld} path, so no -T "c:\foo\bar\STM32F030F4PX_FLASH.ld" is added to the linker command-line.
Work-around for problem two:
Added under other flags for the linker: -T "${workspace_loc:/${ProjName}/STM32F030F4PX_FLASH.ld}" - The quatation marks are important, else \ for windows paths turns into escape characters...
Windows 10, English language, Norwegian locale
STM32CubeMX: 5.6.1
STM32CubeIDE: 1.3.1
com.st.stm32cube.ide.feature.mcu.linker.ui 1.3.0.202002181050
com.st.stm32cube.ide.feature.mcu.toolchain.arm_none 1.3.0.202002181050
(The missing linker script causes all kinds of funky errors when trying to load the resulting file with the different softwares for the hardware dongles)
2020-07-16 02:34 PM
I just tried this. Linker file is generated just fine. Same OS and software versions as you (but English locale).
Are you selecting STM32CubeIDE as the Toolchain/IDE? Share your IOC file.
2020-07-17 05:47 AM
I agree linker file is part any project generation whatever from STM32CubeIDE or STM32CubeMX.
Root issue is at project generation ... @Community member please could you share more details about your project creation way of working ?
2020-07-17 06:30 AM
2020-07-17 06:48 AM
Started STMCubeMX and configured my setup
Started STMCubeIDE that already had one project loaded, added project into the workspace by browsing the project file
Compiled project could not be loaded into STM32 MCU using any of the adapter settings (using a STM32-devel kit as SWD bridge to my actual board).
After some studying of the result .ELF file with arm-none-eabi-objdump, I saw that the entire .code and .data sections were mapped into 0x8000.
Then I noticed that there was no linker script in the project folder, so I added that manually
But it still was not used, no -T argument used for linking, so added the -T argument manually, and finally I had a working binary that does give assertions in openOCD or disconnect errors with STLINK tools.
2020-07-17 06:48 AM
Got linker file without issue from your .ioc file (IDE 1.3.1)
I've done my trial based on File > New > STM32 project from .ioc file
Project compiles without any issue
2020-07-17 07:02 AM
So you generated the project inside STMCubeIDE, not inside STMCubeMX?
2020-07-17 07:08 AM
I just tested. I renamed the file into mk2, opened it in STM32CubeMX and hit generate code, and then "open folder"
2020-07-17 08:33 AM
Yes I'm only relying on STM32CubeIDE as far as MX integrated.
According your snapshot you're right if MX standalone sounds you're lacking linker file ... quite weird. Which MX version are you relying on ?
Just in case looking in details at your snapshot ... could be issue the fact you'have set 0x000 as heap size ? I would guess such is preventing linker file generation ...
2020-07-17 09:15 AM
As specified in the initial post: STM32CubeMX: 5.6.1 (and yes, problem is generate project from MX, not import/create from inside the IDE itself)