Bugs Bugs Bugs

Luckily I have a dev board on STMF030F4 that I also can use for verification. The board work (Motor driver not connected), but (1) debug don’t work from CoIDE on this device and (2) the printf() I pulled from the CoIDE repository is unstable. It is the UART driver itself that is unstable, so this is funny – no extra leds, no debug, no serial port I can trust yet… I felt a bit blindfolded for a moment. Progress can be difficult in these cases.

One of the things I like with ST is their documentation is easy to find, once you look up a MCU you find well organized pages with loads of documents. In this case I needed the Errata sheet for the MCU. I notice that many other vendors still have something to learn here.

I also noted another bug while working on this. Using puts() with redirection it sometime compiled in 12Kb. I suspect that gcc tries to be a bit to smart. Normal size is ca 3,5 Kb and this difference matter on a device with only 16Kb Flash.

Regardless, looking into bugs you will find that 95% of the work is to understand “why”, 5% is to fix it. This is why it is so important to invest time into debug/maintenance assistance.

Back to my printf() problem. It suddenly started to work and I don’t understand what fixed it! But, I will ignore this for the time being because I will need to make my own driver regardless to implement RS-X.


Leave a Reply