Skip to main content
MLalu.1
Associate
March 31, 2021
Question

Confusing behavior of asm with memory

  • March 31, 2021
  • 4 replies
  • 1029 views

I try to better understand assembly so I use STcubeIDE debugger to see how my C code is translate in asm langage. But I dont understand a thing. In the asm code I see that it regulary "jump" on memory addresses where there is nothing (only FFFFFFFF) or it is going to search or write data in non accessible memory (such as "0x2020202c" or "0x20202028"). The aim of my code is simply to use the button on my NUCLEO-64 board to blink the embedded green led. I was surprised to see that my asm code use the "non accessible memory adresses" instead of the GPIO registers adresses. Could someone help me to understand this behavior ?

This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
March 31, 2021

Would seem some information is being misinterpreted somewhere.​

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

I would say, either use a tool like objdump to create asm files, or step through with the debugger in instruction-step-mode.

You might misinterpret data oe empty sections.

Tesla DeLorean
Guru
March 31, 2021

Yeah, I'd start with a static analysis of the sources vs linker output disassembly, and then assess if the debugger or user is reporting cogent information. ​

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

ok ... thank you ! I'm going to try with the debugger in instruction-step-mode to see where is my problem.