Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By tinhead
#1328 that attached should be enough.

This is the example with

WRITE_PERI_REG(0x60000400, 0);
WRITE_PERI_REG(0x60000500,0);

The problem seems to be in fmt_RRI8_disp, that vshift=2 of 0x80 is 0x200 (vshift=2 of 0xC0 is then 0x300) but the result is cut, so 0x0. One can see when vshift=0 that decoding works here, only results when shifted is to big.

That so far for s32i, wondering if there is issue as well with s16i.
You do not have the required permissions to view the files attached to this post.
User avatar
By 0ff
#1331 Yup, it was :)
Here's fixed version, that at least for s32i now correctly handles the immediate value: https://github.com/0ff/ida-xtensa/commi ... b94ae4a88d

Code: Select all.text:00000004 ; ===========================================================================
.text:00000004
.text:00000004 ; Segment type: Pure code
.text:00000004 dword_4         .int 0x60000200         ; DATA XREF: user_init+2r
.text:00000008
.text:00000008 ; =============== S U B R O U T I N E =======================================
.text:00000008
.text:00000008
.text:00000008 user_init:
.text:00000008                 movi.n          a2, 0
.text:0000000A                 l32r            a3, dword_4
.text:0000000D                 memw
.text:00000010                 s32i            a2, a3, 0x200
.text:00000013                 memw
.text:00000016                 s32i            a2, a3, 0x300
.text:00000019                 ret.n
.text:00000019 ; End of function user_init
.text:00000019
.text:00000019
User avatar
By mamalala
#1335 Hmm, i just noticed another difference between the two disassemblies that tinhead showed (and those that i showed in my post before).

Is the code generated by the same compiler in both cases? Because in the IDA disassembly, the first store is s32i, and the second is s32i.n, whereas the Xplorer disassembly has s32i in both cases.

Anyways, thanks for taking a shot at it, 0ff! (btw, we are now on the #esp8266 channel on freenode...)

Greetings,

Chris