Announcing: Synthesizers.com Manufacturer Sub-Forum

Please check out the new sub-forum by following the link above. It is nice to have another manufacturer onboard and opening another direct communication line to potential and existing customers

Debugging/logging for firmware dev

Creator of of the Super Sixteen Sequencer and based in San Francisco. This is a DIY and Finished Good product for Eurorack.
Post Reply
User avatar
Shoggoth
Wiggling with Experience
Posts: 264
Joined: Sat Aug 10, 2013 6:51 am
Location: Richmond, VA

Debugging/logging for firmware dev

Post by Shoggoth »

Total noob when it comes to embedded dev… is it possible to debug or at least console-type log (I understand this is serial.print?) for the Super Sixteen while the chip is in situ? I have an Arduino Uno if that helps
User avatar
extralifedisco
Common Wiggler
Posts: 140
Joined: Thu Apr 05, 2018 5:03 pm
Location: San Francisco, CA

Re: Debugging/logging for firmware dev

Post by extralifedisco »

Shoggoth wrote: Sat Sep 03, 2022 8:18 pm Total noob when it comes to embedded dev… is it possible to debug or at least console-type log (I understand this is serial.print?) for the Super Sixteen while the chip is in situ? I have an Arduino Uno if that helps
I haven't done any direct debugging with the module, I think you'd have to connect an ATMEL-ICE to the ICSP header and use AVR studio. For serial output I'm not sure, probably a similar thing but because the IC is pretty much maxed out for I/O pins, the TX/RX pins are used for the gate output and Chip Select 3, so you might get crosstalk on the lines. Not sure how you'd connect, some kind of USB RS-232 adapter presumably.

In general the AVR platform isn't great for debugging b/c it doesn't natively support JTAG. Arduino massively improves on that with its USB interface. But without it, basically my development process was to build up the 7 segment display driver and circuit and then do all of the serial output debugging on that. In most of the classes you can find a reference to the Display object, so you can just output something to the screen with

Code: Select all

DisplayVar->setDisplayAlpha("ABC"); 
or the equivalent with setDisplayNum(123);
User avatar
extralifedisco
Common Wiggler
Posts: 140
Joined: Thu Apr 05, 2018 5:03 pm
Location: San Francisco, CA

Re: Debugging/logging for firmware dev

Post by extralifedisco »

Actually now that I'm looking further into it there is an AVR debug tool for Platform IO that was added in May of 2020 (a couple months after I finished the firmware v1 lol). I'm not able to get Serial.write working over the Arduino serial monitor but that's probably my own user error, it should work with PuTTY or in platform.io's "Upload and Monitor" feature.

If that works properly it should be straightforward to get avr-stub debugging working as well. LMK if you have any success:
https://docs.platformio.org/en/stable/p ... -stub.html

https://github.com/jdolinay/avr_debug/? ... edium=docs
Post Reply

Return to “Extralife Instruments”