How to use UART to login/debug the CANHUBK344

  1. Since Cerebri sits ontop of Zephyr you can use normal Zephyr west commands to debug. Specifically with the JLinkEDU attached you can run west debug from the development machines ~/cognipilot/ws/cerebri what that will do is rebuild and flash the latest zephyr binary if there has been changes and attach you to a gdb session (make sure to have recently flashed/built cerebri though so it has the context of the last board and app for the build combination). (edited)

  2. If you are looking for just general debug details you can use the logging backend of Zephyr through a UART shell or have printf statements that go directly to shell. Be careful how much you dump to the shell though, it's not an infinite resource, the logging backend helps protect you from spamming the shell too much. Note that logging backend also allows you to do things like set the logging level and enable/disable the log while it is running from the shell. On the included DCD-LZ adapter use the UART FTDI cable and connect to it over screen: screen /dev/ttyUSB_ 115200 (fill in the USB number it comes up as if you have multiple should tab complete)

Last updated