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

User avatar
By sshakuf
#10393 I found the problem, I don't understand it but now it works,

I put the code in a function, and called it.
It seems that when the code is in user_init() it does not work.
Once i put it in a function, and called it (from the same place as it was before in user_init) the code works.
I didn't change the code.
User avatar
By joostn
#10395 As I said it's caused by your struct not being properly aligned. If the source address of spi_flash_write is not a 4 byte multiple an exception is raised. This will force proper alignment:

Code: Select allstruct __declspec(align(4)) plug_saved_param {
User avatar
By sshakuf
#10431 I used the same code as before, I don't understand why was it not aligned ?
the same structure. same size.

do you mean that the struct in the memory did not start in an aligned 4 bit address ?