10000 GDB support w/new toolchain and UART driver by earlephilhower · Pull Request #5559 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

GDB support w/new toolchain and UART driver #5559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
073299b
Add full gdb support with uart/Serial integration
kylefleming Mar 13, 2018
e618125
Merge branch 'master' into gdb
earlephilhower Dec 26, 2018
c3890bd
Fix GDB merge errors
earlephilhower Dec 26, 2018
211c2f3
Merge branch 'master' of https://github.com/esp8266/Arduino into gdb
earlephilhower Dec 27, 2018
6a714f3
Update to unpatched GDB protocol specification
earlephilhower Dec 27, 2018
a4c8ea4
Fix .iram.literal to come before .iram.text for GDB
earlephilhower Dec 27, 2018
b1d47e6
Move functions to flash, call using wrappers
earlephilhower Dec 27, 2018
b341c07
Remove LWIP2 builder commit
earlephilhower Dec 27, 2018
cc03543
Add documentation and gdbstub_init header
earlephilhower Dec 27, 2018
bb37b27
Merge branch 'master' into gdb
devyte Dec 28, 2018
0e2adcb
Clean up GDB include and library dir
earlephilhower Dec 30, 2018
fc7012f
Undo much of UART refactoring, set fifo IRQ to 16
earlephilhower Dec 31, 2018
33a21cd
Add architecture comments, cleanup uart.c code
earlephilhower Jan 1, 2019
e72291a
Also set the UART flags for HW error in GDB
Jan 2, 2019
bffd385
Merge branch 'master' into gdb
earlephilhower Jan 2, 2019
aef060b
Merge branch 'master' into gdb
earlephilhower Jan 8, 2019
a71d705
Merge branch 'master' into gdb
earlephilhower Jan 9, 2019
99da578
Merge branch 'master' into gdb
earlephilhower Jan 14, 2019
11a338c
Merge branch 'master' into gdb
earlephilhower Jan 17, 2019
06a28bd
Merge branch 'master' into gdb
earlephilhower Jan 18, 2019
a3ed4b4
Merge branch 'master' into gdb
earlephilhower Jan 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up GDB include and library dir
Replace GDBstub.h with the version in the internal/ directory, and
adjust stub code accordingly.  This way, only one copy of a file called
"GDBstub.h" will exist.

Update the gdbcommands and replace the obsolete ESPRESSIF readme with
@kylefleming's version since we're mainly doing serial, not TCP,
connected debugging.

Bump the library rev. number since this is a pretty big functionality
change.

Minor documentation tweak.
  • Loading branch information
earlephilhower committed Dec 30, 2018
commit 0e2adcb8c27095ced05b4a7d3760ac5cff26a6ba
4 changes: 2 additions & 2 deletions doc/gdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ Now, connect to the running ESP8266:

Don't worry that GDB doesn't know what is at our present address, we broke
into the code at a random spot and we could be in an interrupt, in the
ROM, or elsewhere. The important bit is that we're not connected and
ROM, or elsewhere. The important bit is that we're now connected and
two things will now happen: we can debug, and the app's regular serial
output will be displayed.
output will be displayed on the GDB console..

Continue the running app to see the serial output:

Expand Down
File renamed without changes.
49 changes: 0 additions & 49 deletions libraries/GDBStub/README.rst

This file was deleted.

19 changes: 18 additions & 1 deletion libraries/GDBStub/gdbcmds
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# ESP8266 HW limits the number of breakpoints/watchpoints
set remote hardware-breakpoint-limit 1
set remote hardware-watchpoint-limit 1
target remote :9980
# Some GDBstub settings
set remote interrupt-on-connect on
set remote kill-packet off
set remote symbol-lookup-packet off
set remote verbose-resume-packet off
# The memory map, so GDB knows where it can install SW breakpoints
mem 0x20000000 0x3fefffff ro cache
mem 0x3ff00000 0x3fffffff rw
mem 0x40000000 0x400fffff ro cache
mem 0x40100000 0x4013ffff rw cache
mem 0x40140000 0x5fffffff ro cache
mem 0x60000000 0x60001fff rw
# Change the following to your sketch's ELF file
file /path/to/sketch.ino.elf
# Change the following to your serial port and baud
set serial baud 115200
target remote /dev/ttyUSB0
2 changes: 1 addition & 1 deletion libraries/GDBStub/library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "GDBStub",
"version": "0.2",
"version": "0.3",
"keywords": "gdb, debug",
"description": "GDB server stub helps debug crashes when JTAG isn't an option.",
"repository":
Expand Down
2 changes: 1 addition & 1 deletion libraries/GDBStub/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GDBStub
version=0.2
version=0.3
author=Jeroen Domburg
maintainer=Ivan Grokhotkov <ivan@esp8266.com>
sentence=GDB server stub by Espressif
Expand Down
38 changes: 36 additions & 2 deletions libraries/GDBStub/src/GDBStub.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
#ifndef GDBSTUB_H
#define GDBSTUB_H

extern "C" void gdbstub_init();
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>

#endif //GDBSTUB_H
#include "internal/gdbstub-cfg.h"

#ifdef __cplusplus
extern "C" {
#endif

void gdbstub_init();

//Indicates whether gdbstub will attach to these or not
//Useful for other uart libs to avoid conflicts
bool gdbstub_has_putc1_control();
bool gdbstub_has_uart_isr_control();

#if GDBSTUB_REDIRECT_CONSOLE_OUTPUT
void gdbstub_set_putc1_callback(void (*callback)(char));
#endif

void gdbstub_write_char(char c);
void gdbstub_write(const char* buf, size_t size);

#if GDBSTUB_CTRLC_BREAK && !GDBSTUB_FREERTOS
void gdbstub_set_uart_isr_callback(void (*callback)(void*, uint8_t), void* arg);

//Override points for enabling tx and rx pins for uart0
void gdbstub_hook_enable_tx_pin_uart0(uint8_t pin);
void gdbstub_hook_enable_rx_pin_uart0(uint8_t pin);
#endif

#ifdef __cplusplus
}
#endif

#endif
2 changes: 1 addition & 1 deletion libraries/GDBStub/src/internal/gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* License: ESPRESSIF MIT License
*******************************************************************************/

#include "gdbstub.h"
#include <GDBStub.h>
#include <stddef.h>
#include "ets_sys.h"
#include "eagle_soc.h"
Expand Down
40 changes: 0 additions & 40 deletions libraries/GDBStub/src/internal/gdbstub.h

This file was deleted.

0