Sonsivri

Electronics => Projects => Topic started by: alichan on February 11, 2019, 12:08:35 00:08



Title: How to display 32-bit integers in Proteus when debugging?
Post by: alichan on February 11, 2019, 12:08:35 00:08
Hello.

It looks Proteus, any version as far as I know, is not able to show correctly the 32-bit integers when debugging (C language). It always shows one word (16-bits). I haven't been able to find a way to show them correctly; in the variable window you can specify the format of the variable as double word... but most of the times it reports the type does not support that format or something so.

Do you know how to show them properly? If possible...

PS: I also noticed similar bhaviour with structs, sometimes not showing the members with the usual mesage "format not supported" (or something so), but others showing them correctly. But if you create a pointer in your code (scope doesn't matter), and reference the struct via that pointer then the struct (and members) are correctly displayed in the debug window.




Title: Re: How to display 32-bit integers in Proteus when debugging?
Post by: sadman on February 11, 2019, 08:32:31 08:32
checkout this example

https://github.com/ahmed-Nasr-Eldin/64-bit-Calculator-8051


Title: Re: How to display 32-bit integers in Proteus when debugging?
Post by: alichan on February 28, 2019, 05:57:21 17:57
Thanks, but it's not useful. It doesn't have debugging symbols so I cannot see the variables when debugging (step-by-step) that is the annoying thing.





Title: Re: How to display 32-bit integers in Proteus when debugging?
Post by: sam_des on March 02, 2019, 05:14:59 05:14
I guess that depends on your compiler as well as Proteus.
See attached file, its for AVR generated by gcc. Preotus is v8.1 SP1.

sam_des