cancel
Showing results for 
Search instead for 
Did you mean: 

Command to separate the binary from .elf file

Nikunj Patel
Associate III

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

5 REPLIES 5
Martin KJELDSEN
Chief III

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

/Martin

Nikunj Patel
Associate III

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

Martin KJELDSEN
Chief III

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

/Martin

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
Up vote any posts that you find helpful, it shows what's working..
Cvega.11
Associate II

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 ???