compiling, but not understand
Posted: Mon Apr 06, 2015 11:51 am
Hello all,
I have made working compilation chain with eclipse/mingw as described everywhere.
Everything looks working fine. I played with nodemcu firmware from examples and I do not understand two strange things :
1) there is used readvdd33() function. I can not find any header for it all around ( any file containing this text, only several appearances of libphy.a in esspresiff folder). So how is compilation possible ? Any trick with linker or so ?
2) I made my own lua commands, for read and write to RTC memory. The strange thing is with addresses in memory.
In manual of sdk api is written prototype bool system_rtc_mem_read ( uint32 src_addr, void * des_addr, uint32 save_size),
but in user_interface.h ( all in nodemcu and sdk folders ) is prototype bool system_rtc_mem_read(uint8 src_addr, void *des_addr, uint16 load_size)
So what is format of src_addr ? And, the more strange thing is when I try to access memory of multiple 4 numbers ( like 0,4,8,12,16 ... ) it looks working, but accessing other ( non multiple 4 ) addresses causes the ESP to reboot. This looks like there is not done the multiplication as in SDK API guide, but then 8bit address is not enough to be used for 768 bytes. Also it looks like there is repetition each 256 adressess, e.g. I read the same from address 4 and 260 ( or 64 and 256+64 ).
Can somebody help me to understand ?
I have made working compilation chain with eclipse/mingw as described everywhere.
Everything looks working fine. I played with nodemcu firmware from examples and I do not understand two strange things :
1) there is used readvdd33() function. I can not find any header for it all around ( any file containing this text, only several appearances of libphy.a in esspresiff folder). So how is compilation possible ? Any trick with linker or so ?
2) I made my own lua commands, for read and write to RTC memory. The strange thing is with addresses in memory.
In manual of sdk api is written prototype bool system_rtc_mem_read ( uint32 src_addr, void * des_addr, uint32 save_size),
but in user_interface.h ( all in nodemcu and sdk folders ) is prototype bool system_rtc_mem_read(uint8 src_addr, void *des_addr, uint16 load_size)
So what is format of src_addr ? And, the more strange thing is when I try to access memory of multiple 4 numbers ( like 0,4,8,12,16 ... ) it looks working, but accessing other ( non multiple 4 ) addresses causes the ESP to reboot. This looks like there is not done the multiplication as in SDK API guide, but then 8bit address is not enough to be used for 768 bytes. Also it looks like there is repetition each 256 adressess, e.g. I read the same from address 4 and 260 ( or 64 and 256+64 ).
Can somebody help me to understand ?