Manuel, thankyou for your reply.
I have partial, but not complete success…
I have managed to get the debugger working with my original configuration
Debugger using usb com26
Target using usb com 6.
No power between debugger and target.
I don’t know why it has suddenly worked, but maybe due to dodgy connections?
So the debugger works, good news, but I have observed some things that I’m concerned about.
- It takes ~4 seconds to load i.e. get to
Terminal will be reused by tasks, press any key to close it.
- A further 12 seconds to get to
Temporary breakpoint
3 a further 4 seconds
- Another 4 seconds for the variables to load in the variables window
Bear in mind that this is a trival piece of code, see below; “Is this performance normal”?
Also I’m experiencing abnormal CPU usage when the debugger is running. I’ve tracked this down to
Again, is this behaviour “normal”?
If you or others couild comment on these observations I’d be grateful.
I still have some way to go to getting a “nucleo” type set-up so if you or anyone else has suggestions or can help, please post.
Best regards
Greg
code under test
#include <Arduino.h>
// #defines
#define LED_BUILTIN 18
#define LED_POWER 19
#define Delay 1000 // Delay in milliseconds
// End of #defines
//Function declarations
void Blink(int n, bool m);
//End of Function declarations
//Variable declarations
int n = 0; // initialise an integer n with zero
//End of Variable declarations
// Initialisation
void setup()
{
// get the serial port working at 115200 Baud.
Serial.begin(115200);
// initialize LED digital pin as an output.
pinMode(LED_BUILTIN, OUTPUT);
pinMode(LED_POWER, OUTPUT);
digitalWrite(LED_POWER, 1);
}
// End of Initialisation
// Main Loop
void loop()
{
// Calculate n mod 2; and test if the answer is 0 or 1 i.e. test for odd or even number
if (n%2 == 0){
// n is EVEN, pass n to Blink for printing and turn LED off.
Blink(n, LOW);
}
else{
// n is ODD, pass n to Blink for printing and turn LED on.
Blink(n, HIGH);
}
n=n+1; // incremwent n
delay(Delay); // wait for DELAY
}
// End of Main Loop
//Functions
void Blink(int n, bool m){
Serial.print(n,DEC); // print as an ASCII-encoded decimal
Serial.print(“\t”); // prints a tab
Serial.println(); // prints a new line
digitalWrite(LED_BUILTIN, m);
}