When printf debugging is a luxury (2010)
lackingrhoticity.blogspot.com
lackingrhoticity.blogspot.com
I've done this for a handful of other projects as well. My first step is always locating a processor GPIO that controls something obvious (camera flash, status LED, etc) that I can use to figure out where I am in the boot process.
Once I turned it over to production use, the techs found the difference in overall sound between "OK" and an error message useful enough that they kept it jumper-enabled. They did put tape over the oscillator's opening to cut down the amplitude, though.
There the debugging is toggling a port pin and examining with an oscilloscope. I typically toggle it different numbers of times at different places in the code to see where I've got to.
Even if you don't have a uart, you can write a little proc to bit-bang a pin.
#define debugVar ((uint32_t *) 0x10007000)
*debugVar = 1;
*debugVar = 2;
*debugVar = 0xdeadcafe;[1] http://www.sparetimelabs.com/tinyprintf/tinyprintf.php [2] https://github.com/cjlano/tinyprintf (32bit version)
I failed that assignment, but in the process learned how to use gdb. I still do wish I had seen this post back* then though, just for the marks.
*Disc: I'm not knowledgeable enough to know 100% this would have helped
This is particularly bad when visiting Pinterest. So bad that I stopped visiting Pinterest at all because I hate the behaviour. It is so obviously broken that I'm surprised they still do it.
This is, of course, mostly a problem on microcontrollers rather than PC's.
There are some things I miss about doing hardcore embedded programming. This is not one of them.