Skip to main content
JP_RS
Associate II
September 17, 2021
Solved

How to generate hex file in STM32H750vb?

  • September 17, 2021
  • 1 reply
  • 972 views

I am trying to generate hex file for my boot loader. I need a fix length hex file for my boot loader. I tried arm-none-eabi-objcopy -O srec --srec-len 0x10 ${ProjName}.elf ${ProjName}.srec;arm-none-eabi-objcopy -I srec -O ihex ${ProjName}.srec ${ProjName}.hex command for generate fixed length hex file it's not working.

:10FB70002B6803B1236038BDA40F0124F8B500BF82

:10FB8000F8BC08BC9E467047F8B500BFF8BC08BC7E

:04FB90009E467047D6

:10FB9800626C655F68616E646C65725F7461736BDB

:10FBA80000000000256C6C75000000002573000043

:10FFC8006F00000025660000437573746F6D6572DD

:10FFD8005F4E616D650000004F70656E5F536C6F1A

:10FFE80074000000436C6F73655F536C6F7400009E

:08FFF8004F726465725F446101

:02000004900367

:100000007465000041646472657373004C617469C7

:1000100074756465000000004C6F6E6769747564E8

So any other command to generate fixed length hex file or how to solve this issue?

Thanks in advance

This topic has been closed for replies.
Best answer by Tesla DeLorean

Can't you just make your loader more robust?

I'm not using the GNU tools with this level of specificity, I have other tools that can read and write .HEX, .DFU and .ELF that I've built over the years.

The .HEX might need rationalizing if the loader can't do this. There was an issue with the GNU tools generating files not on 8-byte boundaries,and this was problematic for some ST tools where the parts had 64-bit Flash Lines. That was posted to the forum some while back, HEX2DFU as I recall, although I thought the underlying problem was remediated at some point between then and now.

There are tools like SRECORD that might provide you with more options. My problem with a lot of these tools is they try to fix a million problems with a million command line options, so it's impossible to select the right incantations unless you wrote the application.

1 reply

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
September 18, 2021

Can't you just make your loader more robust?

I'm not using the GNU tools with this level of specificity, I have other tools that can read and write .HEX, .DFU and .ELF that I've built over the years.

The .HEX might need rationalizing if the loader can't do this. There was an issue with the GNU tools generating files not on 8-byte boundaries,and this was problematic for some ST tools where the parts had 64-bit Flash Lines. That was posted to the forum some while back, HEX2DFU as I recall, although I thought the underlying problem was remediated at some point between then and now.

There are tools like SRECORD that might provide you with more options. My problem with a lot of these tools is they try to fix a million problems with a million command line options, so it's impossible to select the right incantations unless you wrote the application.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..