- Fri Dec 19, 2014 12:47 pm
#5191
alonewolfx2 wrote:can you explain how I can add or implement new functions for getting chipid?i take a quick look on the code and i tried adding function in lnode_node.c but i cant worked and finally how can i compile code to one flash.fw? (i can compile on linux and i tried gen_misc.sh. i have flash.bin and iromtext.bin. how can i compile one bin ?
thank you for your work. this project changed the game
Thank you for trying it out
I planned to add APIs for reading node’s status, such as free heap spaces, chipid, SPI Flash chip ID, etc. The related module is ‘node’ (still undocumented), codes are in this file: /app/lua/lnode_node.c
For now you can see a entry 'free' in lnode_node.c, call it like this: print(node.free()). If you added another entry, just call it the same way.
To put the two separated bin files into one, you can check my Makefile which calls gen_flashbin.py to do the real job:
../tools/gen_flashbin.py ../bin/eagle.app.v6.flash.bin ../bin/eagle.app.v6.irom0text.bin
It simply writes “eagle.app.v6.flash.bin” to the offset 0x0, and writes eagle.app.v6.irom0text.bin to offset 0x10000, fill gaps between them with 0xFF