Closed davepruitt closed 4 months ago
The logging mechanism was developed by the original authors of this code at Microsoft. I too have made some attempt to use the logging, but didn't quite succeed. In the scripts/
directory there is some Javascript code that may be informative. If that doesn't help, you could inquire in an issue in the original repo: https://github.com/microsoft/uf2-samdx1
I was able to get it to work by installing node.js and slightly changing the dbdtool.js to point to my arduino openocd install directory by making this change:
// let openocdPath = pkgDir + "tools/openocd/0.10.0-arduino1-static/"
let openocdPath = pkgDir + "tools/openocd/0.11.0-arduino2/"
Then updating the file search in dbdtool.js to this:
for (let ln of mapFile.split(/\r?\n/)) {
// let m = /^\s*0x00000([0-9a-f]+)\s+(\S+)/.exec(ln)
let m = /^\s*0x0*([0-9a-f]+)\s+(\S+)/.exec(ln);
if (m && m[2] == logSym) {
Then running this in the command prompt:
node dbgtool.js firmware.map
Closing as resolved. Thanks for the followup.
I am having some issues with the bootloader and it would be helpful to get logging working. Unfortunately, there is not really any explanation or tutorial on how to read the logs that the bootloader generates.
In
uf2.h
, I have setUSE_LOGS
to be equal to 1:I have noticed from reading
utils.c
anduf2.h
that the logs seem to just be stored in a 4096 byte memory buffer. Fromuf2.h
:From
utils.c
:Is there an easy way to read these logs from my computer? If the response is "use OpenOCD", that doesn't really give me any more information. Are there any tutorials or documentation anywhere about how to read those logs?
My setup:
The specific issues I am having with the bootloader (the reasons why I want to get logging working):