debugging support :) over gdbstub

This commit is contained in:
Simon Schmidt
2021-06-22 20:25:27 +02:00
parent c8938f4b36
commit 1d7f2f368b
8 changed files with 112 additions and 23 deletions
+14 -15
View File
@@ -1,17 +1,19 @@
#include <Arduino.h>
#ifdef WITH_GDB_STUB
// debugging support via GDBStub over UART
#ifdef WITH_DEBUGGING_ON
#include <GDBStub.h>
#endif
// #include <Wire.h>
#include "PCA9685.h"
extern "C" {
#include "user_interface.h"
}
#define ESP12_LED 2
#define NODEMCU_LED 16
extern "C" {
#include "user_interface.h"
}
os_timer_t Timer1; // Verwaltungsstruktur des Timers
int c;
@@ -46,9 +48,9 @@ void timerCallback(void *pArg)
#include <ESP8266WebServer.h>
#include <WiFiClient.h>
// #include "index.html.gz.h"
// #include "style.css.gz.h"
// #include "favicon.png.gz.h"
#include "index.html.gz.h"
#include "style.css.gz.h"
#include "favicon.png.gz.h"
// images are possible
// maybe check out FS <- SPIFFS
@@ -69,21 +71,18 @@ PCA9685 pwmController;
void handleRootGz() {
const char* dataType = "text/html";
server.sendHeader(F("Content-Encoding"), F("gzip"));
server.send(404, dataType, "debug");
// server.send(200, dataType, (const char*)index_html_gz, index_html_gz_len);
server.send(200, dataType, (const char*)index_html_gz, index_html_gz_len);
}
void handleCssGz() {
const char* dataType = "text/css";
server.sendHeader(F("Content-Encoding"), F("gzip"));
server.send(404, dataType, "debug");
// server.send(200, dataType, (const char*)style_css_gz, style_css_gz_len);
server.send(200, dataType, (const char*)style_css_gz, style_css_gz_len);
}
void handleFaviconGz() {
const char* dataType = "image/png";
server.sendHeader(F("Content-Encoding"), F("gzip"));
server.send(404, dataType, "debug");
// server.send(200, dataType, (const char*)favicon_png_gz, favicon_png_gz_len);
server.send(200, dataType, (const char*)favicon_png_gz, favicon_png_gz_len);
}
void handleNotFound() {
@@ -184,7 +183,7 @@ void setup_pwm_pca9685() {
}
void setup() {
#ifdef WITH_GDB_STUB
#ifdef WITH_DEBUGGING_ON
Serial.begin(460800);
gdbstub_init();
#else