-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
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 e618125
Merge branch 'master' into gdb
earlephilhower c3890bd
Fix GDB merge errors
earlephilhower 211c2f3
Merge branch 'master' of https://github.com/esp8266/Arduino into gdb
earlephilhower 6a714f3
Update to unpatched GDB protocol specification
earlephilhower a4c8ea4
Fix .iram.literal to come before .iram.text for GDB
earlephilhower b1d47e6
Move functions to flash, call using wrappers
earlephilhower b341c07
Remove LWIP2 builder commit
earlephilhower cc03543
Add documentation and gdbstub_init header
earlephilhower bb37b27
Merge branch 'master' into gdb
devyte 0e2adcb
Clean up GDB include and library dir
earlephilhower fc7012f
Undo much of UART refactoring, set fifo IRQ to 16
earlephilhower 33a21cd
Add architecture comments, cleanup uart.c code
earlephilhower e72291a
Also set the UART flags for HW error in GDB
bffd385
Merge branch 'master' into gdb
earlephilhower aef060b
Merge branch 'master' into gdb
earlephilhower a71d705
Merge branch 'master' into gdb
earlephilhower 99da578
Merge branch 'master' into gdb
earlephilhower 11a338c
Merge branch 'master' into gdb
earlephilhower 06a28bd
Merge branch 'master' into gdb
earlephilhower a3ed4b4
Merge branch 'master' into gdb
earlephilhower File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
commit 0e2adcb8c27095ced05b4a7d3760ac5cff26a6ba
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.