Open dkegel-fastly opened 3 years ago
I'm running into the same while debugging Raspberry Pi Pico on an Ubuntu 22.04 host. Combining this with not being able to figure out how to redirect stdout to UART (instead of USB) when using a picoprobe, I'm finding debugging to be more difficult.
@MikeJansen you possibly want the -serial
flag:
-serial string
which serial output to use (none, uart, usb)
Beware that this can have side effects like making it required to use debugger to reflash the board if you replace USB serial output support.
Beware that this can have side effects like making it required to use debugger to reflash the board if you replace USB serial output support.
You may need to enter the bootloader manually using double tapping or by holding the boot button while resetting, but I don't think you'd need a hardware debugger? The rp2040 chips have the bootloader in hardware.
On linux on amd64, gdb can do
info variables
to see globals, butinfo locals
usually lists all the variables as optimized out.This is the case even with
tinygo -opt 1
I can't go lower; opt 0 fails with
(This is with dev from mar 29, 35bf0746a178c, to work around the crash https://github.com/tinygo-org/tinygo/issues/1805 .)