Skip to main content
BMäme.1
Associate II
September 13, 2022
Question

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

  • September 13, 2022
  • 3 replies
  • 1698 views

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

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
September 13, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
mattias norlander
ST Employee
September 19, 2022

@Bastian Mämecke​,

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

Tesla DeLorean
Guru
September 19, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..
BMäme.1
BMäme.1Author
Associate II
September 20, 2022

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.

Tesla DeLorean
Guru
September 20, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..