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

User avatar
By cal
#17641 Moin,

many thanks to the crosstools team and the xtensa gurus for the giant shoulders to stand on!

Here is a question about xtensa registers.

When executing "info all-registers" in xtensa-lx106-elf-gdb

I get

a0 0x4023db2b 1076091691
a1 0x3ffff760 1073739616
...
litbase 0x0 0
...
litbaddr 0x0 0
litben 0x3ffff760 1073739616

As far as I understand the masks defined in xtensa-config.c
the register "litben" should be just some bits out of "litbase".

Did I miss something?

Cal
User avatar
By jcmvbkbc
#17649
cal wrote:When executing "info all-registers" in xtensa-lx106-elf-gdb
I get

a0 0x4023db2b 1076091691
a1 0x3ffff760 1073739616
...
litbase 0x0 0
...
litbaddr 0x0 0
litben 0x3ffff760 1073739616

As far as I understand the masks defined in xtensa-config.c
the register "litben" should be just some bits out of "litbase".

Your understanding is correct and that looks like bug in gdb. Interestingly litbaddr works correctly. I'll have a look.

UPD: fixed: https://github.com/jcmvbkbc/crosstool-N ... 68065f479d
Last edited by jcmvbkbc on Sun May 17, 2015 7:24 pm, edited 1 time in total.
User avatar
By cal
#17651 Moin,

I hoped to catch your attention! ;) Thanks in advance.

While your at it ...

Backtracing seems to be not so easy without an FP but it would be nice if it just aborts
instead of being stuck in a loop:

#0 gdb_breakpoint () at ...
#1 0x3ffff770 in ?? ()
#2 0x4023db2b in nodemcu_init () at user_main.c:219
#3 0x4023db2b in nodemcu_init () at user_main.c:219
#4 0x4023db2b in nodemcu_init () at user_main.c:219
#5 0x4023db2b in nodemcu_init () at user_main.c:219
#6 0x4023db2b in nodemcu_init () at user_main.c:219

and so on.

Thanks for your great work on the xtensa stuff.

Cal