printf("Hello World\n"); //fails to print on Linux.
Posted: 21 Dec 2022, 09:33
Though the helloWorld project does compile on Linux, and does burn to the target, I never saw it print on serial. I had to go to Windows to see that print. (I used putty on Windows.)
This is despite the fact that VCOM pins 1-2 were set to On, on the mini-debugger, and the latter's usb connection was clearly used by openocd to burn to the target.
(N.B. though openocd is supposed to talk to a local gdb -- typically for talking to a remote, gdb server, on a remote target -- its sole route to the eval board is via the mini-debugger's usb port. I've not looked at openocd in a few years, so I don't know/recall its mechanisms.)
.
(BTW, semihosting did not help.)
.
I used
minicom -D /dev/ttyACM0 -b 115200
to watch the printf, as ACM0 was created when I connected the mini-debugger' s usb (which runs at 115200 baud rate, 8n1) to the development host's/PC's usb port. But I saw nothing.
I don't know why this failed. I checked numerous options within eclipse, to no avail.
This is not a huge issue for me, as I should be able to wire directly to the uC's tx/rx pins, but it was annoying that an example project did not print.
This is despite the fact that VCOM pins 1-2 were set to On, on the mini-debugger, and the latter's usb connection was clearly used by openocd to burn to the target.
(N.B. though openocd is supposed to talk to a local gdb -- typically for talking to a remote, gdb server, on a remote target -- its sole route to the eval board is via the mini-debugger's usb port. I've not looked at openocd in a few years, so I don't know/recall its mechanisms.)
.
(BTW, semihosting did not help.)
.
I used
minicom -D /dev/ttyACM0 -b 115200
to watch the printf, as ACM0 was created when I connected the mini-debugger' s usb (which runs at 115200 baud rate, 8n1) to the development host's/PC's usb port. But I saw nothing.
I don't know why this failed. I checked numerous options within eclipse, to no avail.
This is not a huge issue for me, as I should be able to wire directly to the uC's tx/rx pins, but it was annoying that an example project did not print.