arduinocc
Published © GPL3+

$5 WIFI Black Magic GDB for SAM/SAMD/STM32/MBED

Want to use GDB over WiFi on a a variety of SAM/SAMD/STM32/MBED boards, as you would a standard Black Magic? This is exactly what you need!

AdvancedShowcase (no instructions)1,415
$5 WIFI Black Magic GDB for SAM/SAMD/STM32/MBED

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
May be M-F / F-F depending on boards being connected
×1
Adafruit SWD Breakout Adapter
Optional and is needed for Due / MKR1000 to breakout pins for ESP8266
×1
Adafruit HUZZAH ESP8266 Breakout
Adafruit HUZZAH ESP8266 Breakout
Or any ESP8266 board with 4MB flash and GPIO0 and 2 Broken out
×1
Arduino Nano 33 IoT
Arduino Nano 33 IoT
Or DUE, any board compatible with the BMP Probe
×1

Software apps and online services

Arduino IDE
Arduino IDE
Visual Studio 2017
Microsoft Visual Studio 2017
Visual Micro
ESP8266 BMP Firmware Project
Only needed if Building Firmware Image for Probe from Scratch

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
may be required to wire up SWD and / or target connections
Solder Wire, Lead Free
Solder Wire, Lead Free
may be required to wire up SWD and / or target connections

Story

Read more

Schematics

Nano33IoT Wiring Example

Snapshot of the 4 wires connecting the ESP8266 to the Nano33 IoT
See the Website Guide for specific Pin Information

Due Wiring Example

Snapshot of the 4 wires connecting the ESP8266 to the Arduino DUE
See the Website Guide for specific Pin Information

Code

Example Sketch

Arduino
Example Blink Sketch to allow testing of the GDB Features
int a = 0;


void setup() {
	Serial.begin(115200);
	a += 1;
	pinMode(LED_BUILTIN, OUTPUT);
}


void loop() { 
	function1();
	delay(1000);
	digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
	delay(1000);              // wait for a second
	digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
	delay(1000);              // wait for a second
}


void function1() {
	a += 2;
	int localVariable = 1;
	byte aNotherLocalVariable = 2;
}

Credits

arduinocc

arduinocc

2 projects • 13 followers

Comments