Sorry I know it I am probably missing where it is already described. But I did not find any complete set of instructions.
Suppose I ran some sketch like the DirList example, and I know, that the system crashed, somewhere in this code.
void setup() {
pinMode(PA_15, OUTPUT);
digitalWrite(PA_15, HIGH);
Serial.begin(115200);
while (!Serial)
;
Serial.println("Starting USB Dir List example...");
// if you are using a Max Carrier uncomment the following line
// start_hub();
while (!msd.connect()) {
//while (!port.connected()) {
delay(1000);
}
Serial.print("Mounting USB device... ");
More specifically, the Serial monitor shows the line: Starting USB Dir List example...
Although not the line ending
And I don't see the line Mounting USB device... And the board goes into the blinking Red state of a crash...
Now what?
Can I source level debug this?
I downloaded the source tree, into the /hardware/... directory. patched the API link, etc. So the board now shows up twice in the boards list. Similar for UNO R4 stuff...
Note: I have a ST_LINK/V2 as well as a J-LINK EDU Mini, as well as another small debugger that I think it was @ptillisch suggested for another board.
Suggestion on which JTAG unit is best for this?
Do you use the Debugger that is part of IDE2? If so how do you enable it.
If I remember correctly, there needs to be something like a debug section in platform.txt?
Or do you use an external debug window?
Sorry I know this probably could be better organized.
I now have Ozone setup. It complains each time saying the MINI EDU version does not come with a license for it but you can use for evaluation purposes....
The Dir List had a hard crash yesterday. This mornign I tried setting breakpoints and Walk over the section of code where the crash was happening. And this time it actually completed the directory list.
Starting USB Dir List example...
Mounting USB device... done.
Opening the root directory... Done
done.
Root directory:
System Volume Information
P1000391.JPG
P1000392.JPG
P1000393.JPG
P1000394.JPG
P1000395.JPG
...
P1000386.JPG
P1000387.JPG
P1000388.JPG
P1000389.JPG
P1000390.JPG
53 files found!
Closing the root directory... OK
So maybe a timing issue?
Would still be nice to get it to work directly in the IDE, but...
I have just put in a couple of PRs to add the Giga to platformio, this is now based on the recent 4.0.10 version for ArduinoCore-mbed where the Arduino guys spent time making this possible.