cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved ]TrueStudio does not create an .elf file.

GTull
Associate II

Hi

I started learning Stm32 and got a problem: when compiling a project, TrueStudio does not create an .elf file.

Console log:

12:26:17 **** Incremental Build of configuration Debug for project STM32100B-EVAL_GPIO_IOToggle ****

Info: Internal Builder is used for build

arm-atollic-eabi-gcc -c ..\Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.c -mthumb -mcpu=cortex-m3 -std=gnu11 -DUSE_STM32100B_EVAL -DSTM32F10X_MD_VL -DUSE_STDPERIPH_DRIVER -I../src -I../Libraries/STM32F10x_StdPeriph_Driver/inc -I../Libraries/CMSIS/Device/ST/STM32F10x/Include -I../Libraries/CMSIS/Include -I../Utilities/STM32_EVAL/Common -I../Utilities/STM32_EVAL/STM32100B_EVAL -O0 -ffunction-sections -fdata-sections -g -fstack-usage -Wall -specs=nano.specs -o Libraries\STM32F10x_StdPeriph_Driver\src\stm32f10x_flash.o

12:26:21 Build Finished (took 3s.875ms)

There are no errors in the “Problems�? window.

I tried several projects including downloaded from the TrueStudio repository. The result is the same. I used TrueStudio 8.0 and 9.3 with "out-of-box" settings.

What can I do?

7 REPLIES 7
MEder
Associate III

I had a problem with no elf file for a release build and I used the following:

​This was gleamed from a touchGFX project that a ST employee posted. 

Create a bat file with...

arm-atollic-eabi-objcopy --remove-section=ExtFlashSection %1.elf intflash.elf

arm-atollic-eabi-objcopy -O binary intflash.elf intflash.bin

arm-atollic-eabi-objcopy -O binary --only-section=ExtFlashSection %1.elf extflash.bin

Then add the bat file to your build configuration (release)

Add the directory/file name of the hex file  to the command line. Then when you build the release, the elf file is created.

It will create the intflash and extflash elf file for programming.

If you don't need the extflash section then you can ignore it.

Good luck

I didnt understand how to do these. I can only create a bat-file on the disk by external text editor.

>>Then add the bat file to your build configuration (release)

In which section of the project settings it should be done?

-Add the directory/file name of the hex file  to the command line. Then when you build the release, the elf file is created.

PS Now after build only files .su appear.

MEder
Associate III

If you get a s record then maybe Convert is checked in the Output Format section?

Anyway PostBuild settings are in C/C++ Build->Settings, Build Steps Tab.

My bat file is in the project directory. Your directory names will be different.

There's somewhat of a learning curve to use these tools.

0690X000006DytOQAS.png

0690X000006DysVQAS.png

Thank you very much for your answers.

I made the bat-file and put it in the project folder. In PostBuil  write commands it out. I tried several variation оf command but it did not work.

In C/C++ build/ settings/tool settings/ other/output format  was specified Intel hex, but in also not created.

Like other Eclipse toolchains, TrueStudio will create output files usually in the configuration specific subfolder, like ../.Debug/.. for a debug build.

Did you check ?

Thanks for the support.

It turned out that TS does not work well with WindowsXP ;) I installed Windows7 and now commpiler worked.

MBake.3
Associate

The problem for me was that the error only shows up in the console and not under problems.