Skip to main content
Nikunj Patel
Associate III
Sep 1, 2020 4:38 AM UTC
Question

Command to separate the binary from .elf file

Hello @Martin KJELDSEN​ @Community member​ ,@All ALL​ 

We are using TouchGFX based development kit.

  1. STM32F746G-DISCO
  2. STM32F7508-DK

STM32F746G-DISCO :

When we used STM32F746G-DISCO Kit, we are using following command to separate the flash and ext-flash binary.

arm-none-eabi-objcopy.exe -O binary --only-section=*Section "$ STM32F746G_DISCO.elf" ExtFlash.bin;arm-none-eabi-objcopy.exe -O binary --remove-section=*Section "$ STM32F746G_DISCO.elf" Flash.bin

Above Generated binary are working fine and we are loaded using ST-LINK Utility.

STM32F7508-DK :

When we used STM32F7508-DK kit, We are using following command.

arm-none-eabi-objcopy.exe -O binary --only-section=.isr_vector --only-section=.text --only-section=.rodata --only-section=.ARM.extab --only-section=.ARM --only-section=.preinit_array --only-section=.init_array --only-section=.fini_array "$ STM32F7508-DK.elf" Flash.bin; arm-none-eabi-objcopy.exe -O binary --only-section=*Section "$ STM32F7508-DK.elf" ExtFlash.bin;

Above command will create the binary but it is not working fine.

Here, i attached both linker file for both broad, can you please guide me on this point?

Is something that i missed?

Regards,

Nikunj Patel

This topic has been closed for replies.

5 replies

Martin KJELDSEN
Principal III
Sep 1, 2020 12:50 PM UTC

What does "but it is not working fine" mean? Anything more

/Martin

Nikunj Patel
Associate III
Sep 3, 2020 11:58 AM UTC

Hello @Martin KJELDSEN​ ,

It means when i used following command for STM32F7508-DK .

arm-none-eabi-objcopy.exe -O binary --only-section=.isr_vector --only-section=.text --only-section=.rodata --only-section=.ARM.extab --only-section=.ARM --only-section=.preinit_array --only-section=.init_array --only-section=.fini_array "$ STM32F7508-DK.elf" Flash.bin; arm-none-eabi-objcopy.exe -O binary --only-section=*Section "$ STM32F7508-DK.elf" ExtFlash.bin;

It is creating a Two Binary

  1. Flash.bin (0x90000000)
  2. ExtFlash.bin (0x90100000)

When i load both binary using STLINK Utility using External Loader. It will not display anything on display.

Can you please guide me.

Regards,

Kaushal Patel

Tesla DeLorean
Guru
Sep 3, 2020 1:09 PM UTC

Ok, and is flash.bin viable?​

Does your loader​ output any actionable diagnostic information? Like checksumming or hashing what it sees, and that matches the PC side copy?

Does a disassembly show expected code?

Can you run the boot loader in a debugger, and walk the transition into the QSPI image?​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Martin KJELDSEN
Principal III
Sep 3, 2020 1:04 PM UTC

Have you tried debugging? What's the application doing, if anything?

/Martin

Cvega.11
Associate II
Sep 6, 2020 8:27 AM UTC

Hello my friend

Do you know how to use the wifi module (ISM43340-M4G-L44-10 CF) of the stm32h7b3i-dk board?

Any example of a WIFI http server with stm32h7b3i-dk ???