Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By cal
#21944 Dear IoT entusiasts!

Is there any interest on using a debugger like gdb to analyze your programs running on the esp8266?
Using gdb directly or one of the multiple frontends like eclipse you could
  • step to your code on C and/or assembler level,
  • inspect registers/variables/memory
  • set breakpoints in code,
  • set watchpoints on memory changes,
  • enter debugger on exceptions like exceptions 28 or 29 (illegal read or write access)
  • print and inspect call stacks

I am asking this because new replies on the threads talking about debuggers are discouraging low.
(Debugging via jtag (http://www.esp8266.com/viewtopic.php?f=9&t=1871) or using an embedded gdb stub
( http://www.esp8266.com/viewtopic.php?f=9&t=3734, http://www.esp8266.com/viewtopic.php?f=9&t=3751 ))




Is that because you think you can't help in building the debug solution or do you think it is not needed or useful or you don't know or don't care?

Curious,
Cal

P.S.

For debugging via JTAG you need additional hardware that controls the CPU.

A gdb stub is an object file/library that gets linked to and adds code to your firmware file and gets activated by calling some init function or entered directly. In case of the esp8266 it talks to the debugger that runs on your pc over the serial interface.
The linked tale shows an example.
Last edited by cal on Mon Jun 29, 2015 5:58 am, edited 2 times in total.
User avatar
By voyager
#21947 Moin Cal,
have you written or are you writing a debugger with the mentioned features? During our 8 Bit times we always used debuggers and tracers to write reliable and stable software. Would be nice to have such a tool for the 8266.
User avatar
By hreintke
#21949 Hi Cal,
Yes definitely interested, will check other postings too to get understanding of current status.
Would it then also be possible to disassemble (parts of) sdk ? I am specialy intrested in the system_get_sdk_version().
I'd like to get the sdk version from libmain.a (or any other espressif lib) directly (win/linux)
Herman
User avatar
By cal
#21950
voyager wrote:Moin Cal,
have you written or are you writing a debugger with the mentioned features? During our 8 Bit times we always used debuggers and tracers to write reliable and stable software. Would be nice to have such a tool for the 8266.

Moin voyager,

I am going the gdb stub route and i try to decide how far I should go. I added links to the initial posting.

Cal