Hey there,
I'm using keil v5.27.1.0 with a stm32h745 nucleo board. i'm developing firmware code for a student project.
i'm having a problem where the watch window shows jibberish values for variables. it's literally as simple as a line of code being 'variable = 1' and the debugger shows a value of 0 or 0xB1 or something. so far i have trouble recognizing any pattern or rule with which a variable shows 0, garbage or a value that seems to make sense. The shown values are the same for every variable after recompiling and flashing (also with different optimization settings) but they are weird and different for every different variable
i have added a little piece of debug code that jumps into an 'if' when the variable has the intended value. that seemed to work so i think it might be an issue with the debugger and the correct code might actually be running.
i'm fairly new to embedded development in general, so i think there might be a lot of causes for this. still, maybe that's a common error and a no brainer for experienced people. i can provide more info about my keil configurations, the software i'm designing and so on if needed.
thank you in advance!
Greetings, Alex
It's always better to use the latest version of any toolchain because the latest version has more bug fixes.
You can download MDKv5.29 from below link:
https://www.keil.com/download/product/
Give it a try and let us know if it helps.
Alrie said:i'm fairly new to embedded development in general
Do you have any experience with software development in any other contexts?
Alrie said:for a student project.
for a student project.
So the first place you should be going for help is to your teacher / supervisor / tutor
It is far easier for them to help, as they know you, they know the course you are on, they know the task you have been assigned, they know the setup you have, etc, etc.
We know none of that!
Alrie said:there might be a lot of causes for this
Optimisation would be another prime suspect....
thanks, will try!
hey andy, thank you for your reply.i have little experience in software development in general but not none.problem is, its not a project for my university but an external one (maybe you heared of formula student). i've asked this before but there are no professors at my faculty that know a lot about the toolchain we're using right now (with stm32 and keil).i've already tried optimization settings from 0 to 3 to no success. is there a way to completely shut down optimization? (afaik level 0 still does some minimal optimization)
Alrie said:maybe you heared of formula student
I hadn't, but google says: https://www.imeche.org/events/formula-student
Alrie said:there are no professors at my faculty that know a lot about the toolchain we're using right now (with stm32 and keil)
perhaps it would be better to choose a toolchain your professors are familiar with?