GDBSTUB
=======
Intro
-----
While the ESP8266 supports the standard Gnu set of C programming utilities, for now the choice of debuggers
has been limited: there is an attempt at [OpenOCD support](https://github.com/projectgus/openocd), but at
the time of writing, it doesn't support hardware watchpoints and breakpoints yet, and it needs a separate
JTAG adapter connecting to the ESP8266s JTAG pins. As an alternative, [Cesanta](https://www.cesanta.com/)
has implemented a barebones[GDB stub](https://blog.cesanta.com/esp8266-gdb) in their Smart.js solution -
unfortunately, this only supports exception catching and needs some work before you can use it outside of
the Smart.js platform. Moreover, it also does not work with FreeRTOS.
For internal use, we at Espressif desired a GDB stub that works with FreeRTOS and is a bit more capable,
so we designed our own implementation of it. This stub works both under FreeRTOS as well as the OS-less
SDK and is able to catch exceptions and do backtraces on them, read and write memory, forward [os_]printf
statements to gdb, single-step instructions and set hardware break- and watchpoints. It connects to the
host machine (which runs gdb) using the standard serial connection that's also used for programming.
In order to be useful the gdbstub has to be used in conjunction with an xtensa-lx106-elf-gdb, for example
as generated by the [esp-open-sdk](https://github.com/pfalcon/esp-open-sdk) project.
Usage
-----
* Grab the gdbstub project and put the files in a directory called 'gdbstub' in your project. You can do this
either by checking out the Git repo, or adding the Git repo as a submodule to your project if it's already
in Git.
* Modify your Makefile. You'll need to include the gdbstub sources: if your Makefile is structured like the
ones in the Espressif examples, you can add `gdbstub` to the `SUBDIRS` define and `gdbstub/libgdbstub.a` to the
`COMPONENTS_eagle.app.v6` define. Also, you probably want to add `-ggdb` to your compiler flags (`TARGET_LDFLAGS`)
and, if you are debugging, change any optimation flags (-Os, -O2 etc) into `-Og`. Finally, make sure your Makefile
also compiles .S files.
* Configure gdbstub by editting `gdbstub-cfg.h`. There are a bunch of options you can tweak: FreeRTOS or bare SDK,
private exception/breakpoint stack, console redirection to GDB, wait till debugger attachment etc. You can also
configure the options by including the proper -Dwhatever gcc flags in your Makefiles.
* In your user_main.c, add an `#include <../gdbstub/gdbstub.h>` and call `gdbstub_init();` somewhere in user_main.
* Compile and flash your board.
* Run gdb, depending on your configuration immediately after resetting the board or after it has run into
an exception. The easiest way to do it is to use the provided script: xtensa-lx106-elf-gdb -x gdbcmds -b 38400
Change the '38400' into the baud rate your code uses. You may need to change the gdbcmds script to fit the
configuration of your hardware and build environment.
Notes
-----
* Using software breakpoints ('br') only works on code that's in RAM. Code in flash can only have a hardware
breakpoint ('hbr').
* Due to hardware limitations, only one hardware breakpount and one hardware watchpoint are available.
* Pressing control-C to interrupt the running program depends on gdbstub hooking the UART interrupt.
If some code re-hooks this afterwards, gdbstub won't be able to receive characters. If gdbstub handles
the interrupt, the user code will not receive any characters.
* Continuing from an exception is not (yet) supported in FreeRTOS mode.
* The WiFi hardware is designed to be serviced by software periodically. It has some buffers so it
will behave OK when some data comes in while the processor is busy, but these buffers are not infinite.
If the WiFi hardware receives lots of data while the debugger has stopped the CPU, it is bound
to crash. This will happen mostly when working with UDP and/or ICMP; TCP-connections in general will
not send much more data when the other side doesn't send any ACKs.
License
-------
This gdbstub is licensed under the Espressif MIT license, as described in the License file.
Thanks
------
* Cesanta, for their initial ESP8266 exception handling only gdbstub,
* jcmvbkbc, for providing an incompatible but interesting gdbstub for other Xtensa CPUs,
* Sysprogs (makers of VisualGDB), for their suggestions and bugreports.
没有合适的资源?快使用搜索试试~ 我知道了~
MiSTer 的硬件插件_相关文件_下载
共88个文件
h:26个
ino:16个
cpp:15个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 137 浏览量
2022-07-04
21:37:56
上传
评论
收藏 2.95MB ZIP 举报
温馨提示
MiSTer 的硬件插件 I/O 子板 该板提供 VGA、模拟和数字音频输出。它还为按钮和 LED 提供连接其外部版本的能力,以便集成到外壳(如 Amiga 1200 外壳)中。该板非常方便,但不是必需的,因为所有内核都提供 HDMI 视频和音频输出,并能够使用 DE10-nano 板载 LED 和按钮。 RTC 子板 该板提供实时时钟。它已插入 LTC 连接器。 SDR SDRAM 子板 该板为需要大 (>512KB) 内存的内核提供 32MB SDR SDRAM 内存。虽然 DE10-nano 有 DDR3 RAM,但它的延迟很大,无法适应复古 EDO DRAM 的时序。因此,如果内核需要精确的内存时序,则不能使用 DDR3。尽管某些内核不需要此板,但仍有许多其他内核需要它。因此需要 SDRAM 板。 有两种 SDRAM 板版本: “SDRAM_uni”版本是通用的,可以垂直、水平向内或向外安装。当它水平向内安装时,它覆盖了 Arduino GPIO,因此未来无法扩展。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
hardware-master (20).zip (88个子文件)
hardware
package_jantje_index.json 7KB
jantje
ESP8266
platform.txt 7KB
boards.txt 287KB
debug
gdbcmds 100B
xtensa-lx106-elf-gdb.exe 7.17MB
libraries
gdb
gdbstub-entry.h 560B
gdb.cpp 69B
gdbstub.c 24KB
License 2KB
c_types.h 21B
gdbstub.h 147B
gdb.h 147B
examples
blink
blink.ino 655B
Makefile 1KB
corebits.h 7KB
core-isa.h 19KB
README.md 4KB
gdbstub-cfg.h 2KB
gdbstub-entry.S 9KB
specreg.h 2KB
samd
platform.txt 251B
read.me 712B
boards.txt 3KB
avr_local
platform.txt 3KB
cores
arduino
WString.h 10KB
Arduino.h 6KB
WMath.cpp 2KB
Stream.h 5KB
Print.cpp 5KB
defines.h 30KB
HardwareSerial.cpp 2KB
HardwareSerial.h 4KB
defines.cpp 906B
Arduino.cpp 4KB
stdlib_noniso.h 1KB
binary.h 11KB
avr
wdt.cpp 84B
eeprom.h 3KB
wdt.h 403B
eeprom.cpp 1023B
pgmspace.h 92B
Printable.h 1KB
Print.h 3KB
WString.cpp 17KB
WCharacter.h 4KB
Stream.cpp 7KB
stdlib_noniso.c 1KB
boards.txt 26KB
libraries
SoftwareSerial
SoftwareSerial.cpp 13KB
SoftwareSerial.h 3KB
keywords.txt 659B
library.properties 259B
examples
TwoPortReceive
TwoPortReceive.ino 2KB
SoftwareSerialExample
SoftwareSerialExample.ino 1KB
Wire
Wire.h 2KB
keywords.txt 731B
library.properties 284B
examples
SFRRanger_reader
SFRRanger_reader.ino 3KB
master_writer
master_writer.ino 646B
master_reader
master_reader.ino 734B
slave_sender
slave_sender.ino 702B
digital_potentiometer
digital_potentiometer.ino 944B
slave_receiver
slave_receiver.ino 979B
Wire.cpp 6KB
EEPROM
keywords.txt 459B
EEPROM.h 998B
library.properties 256B
examples
eeprom_write
eeprom_write.ino 870B
eeprom_read
eeprom_read.ino 889B
eeprom_clear
eeprom_clear.ino 340B
EEPROM.cpp 2KB
Servo
keywords.txt 580B
Servo.cpp 489B
examples
Knob
Knob.ino 939B
Sweep
Sweep.ino 1KB
Servo.h 2KB
SPI
SPI.cpp 6KB
keywords.txt 831B
SPI.h 5KB
library.properties 283B
examples
BarometricPressureSensor
BarometricPressureSensor.ino 4KB
DigitalPotControl
DigitalPotControl.ino 2KB
target
.gitignore 35B
.settings
org.eclipse.core.resources.prefs 101B
org.eclipse.core.runtime.prefs 48B
.project 212B
.gitignore 26B
README.md 360B
共 88 条
- 1
资源评论
- yuanguan6292022-12-16资源值得借鉴的内容很多,那就浅学一下吧,值得下载!
快撑死的鱼
- 粉丝: 1w+
- 资源: 9149
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 【java毕业设计】仓储系统出入库模块设计源码(ssm+mysql+说明文档+LW).zip
- 最新整理!!!中国同一带一路国家海关进出口数据
- 【java毕业设计】毕业生生活用品出售网站系统源码(ssm+mysql+说明文档+LW).zip
- 最新整理-中国各、省、市、县、乡镇基尼系数数据(到2023年)
- 【java毕业设计】影院管理系统源码(ssm+mysql+说明文档+LW).zip
- Golang: 高效、简洁的Google开源编程语言
- 【java毕业设计】家用电器销售网站源码(ssm+mysql+说明文档+LW).zip
- 数维杯大学生数学建模竞赛概述及其价值解析
- 【java毕业设计】二手交易平台网站源码(ssm+mysql+说明文档+LW).zip
- HEVC Video Extensive
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功