cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the program load header for the debug environment flash algorithm while using the STM32CubeIDE?

BMäme.1
Associate II

Hi there,

it seems that STM32CubeProgrammer (Version 2.6.0) is using the program load header information to flash the system, while the STM32CubeIDE (Version 1.8.0) is using the section information. Since the initialize data section is not part of that section information, this is missing in the size and the correct length is in the program header information.

My problem is, that I cannot flash and debug the program while using the CubeIDE. Is it possible that the CubeIDE is using the program load header information instead of the section information?

Kind regards

Bastian

8 REPLIES 8

2.6.0 is pretty old not sure you'll get much interest in that and how it's ELF parser works.

The sections should be somewhat duplicative ​of the data described in the program header.

Perhaps dump with objcopy or fromelf tools.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mattias norlander
ST Employee

@Bastian Mämecke​,

Do you have procedure we can use internally to re-produce this issue? Which MCU/board?

A file illustrating this disconnect between program header and section table, along with respective linker script would be a good opening move..​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
BMäme.1
Associate II

Hey there,

sorry for the late response.

What I have done, is to manipultate the .elf file, so that the program header and the section table have the same length.

But Im looking to give the IDE an command at the beginning of the Debug session that the session is using the program header instead of the section.

We are using the STM32L4R5.

What do you mean by linker script?

The .LD​ file the Linker uses to construct the image.

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

You'll likely need to reconstruct both to be internally consistent so the loader code​ can work with them as provided.

I'm not aware of any debug script or method to alter the loading mechanics. ​

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

Perhaps generate a .HEX file describing what is written where.​

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