Description
Hi all,
I believe I have discovered some issue with pico_unique_id example, but can't for the life of me figure out how to find out what it is....
Firstly, in it's existing form, I feel the example program is not much use to a beginner as it sends the ID out through the UART.....most people won't have a USB serial port plugged into GPIO0 and GPIO1, so I thought I'd build it to use USB for stdout. In my mind most people will have purchased a single Pico to play with and would expect the example to work without having to purhase any additional bits.
As it happens, I do have a 3.3v serial port adapter and when the example is built, running with my external USB-Serial adapter connected, the example runs and emits the expected uniqe serial number string. Great!
When compiled to use USB for stdout, I get nothing and the USB doesn't even initialise properly....so more investigation required.;
Ok, I think to myself, lets run the standard example code under OpenOCD and find out what's going on as I happen to have a spare Pico too !
Here's where it gets interesting....
The standard pico_unique_id example which runs quite happily without the debugger won't run under the debugger using OpenOCD and causes a SIGINT on the line:
inline static void hw_write_masked(io_rw_32 *addr, uint32_t values, uint32_t write_mask) {
which in turn is called from flash_cs_force
The best I can figure out at the moment is that it's something going wrong in the constructor code that's run from the runtime_init.
So I have two (related?) problems with this example, and one request
- I can't debug the standard example using openOCD debugger.
- When it is built to use USB for stdout it crashes and I can't find out why because I can't debug it (Crashes at the same point with the same fault)
The request is "Can this example be made to work without the need for an external serial port?"