Comments (3)
Update:
I was able to Temporarily fix the problem by writing the entire eeprom with eeprome_clear using the value 255 instead of the default 0. It seems that when doCommand tries to save a function to eeprom, it looks for the allocated positions but instead of the normal norm of thinking 0 as unused memory, it searches for 255. Thus cleaning the eeprom and writing it with 0 (as the usual practice) wont help. Even though cleaning and filing the eeprom with 255 before loading the program works, it still causes some error after few uploads. To get rid of it I again have to clean the eeprom with setting 255 to all the locations.
from bitlash.
Hello and thanks for your notes.
As you have observed, the AVR convention is that 255 is the value for uninitialized EEPROM.
The fact that the problem recurs after several reboots from the clean state leads me to believe what you are seeing is likely caused by eeprom fragmentation. Could you send the output of “peep” after the error happens?
A possible workaround is to only define the eeprom function if it is not already there. You could possibly use the function src/bitlash-eeprom.c::findKey(char *id) to check if it’s already been defined from your C driver program.
-br
On Apr 24, 2015, at 1:37 AM, eshanMewantha [email protected] wrote:
Update:
I was able to Temporarily fix the problem by writing the entire eeprom with eeprome_clear using the value 255 instead of the default 0. It seems that when doCommand tries to save a function to eeprom, it looks for the allocated positions but instead of the normal norm of thinking 0 as unused memory, it searches for 255. Thus cleaning the eeprom and writing it with 0 (as the usual practice) wont help. Even though cleaning and filing the eeprom with 255 before loading the program works, it still causes some error after few uploads. To get rid of it I again have to clean the eeprom with setting 255 to all the locations.—
Reply to this email directly or view it on GitHub #45 (comment).
from bitlash.
Hello, Thank you for the reply.
When everything is working fine the peep of the eeprom is this.
E000: iot_ func tion $pin Mode (13, 1); dw( 13,1 ); if(a 0< 2 00){ prin t "l evel
E040: ="a0 ;}; snoo ze(2 000) ;$.. .... .... .... .... .... .... .... .... .... ....
E080: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E0C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E100: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E140: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E180: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E1C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E200: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E240: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E280: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E2C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E300: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E340: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E380: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E3C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E400: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E440: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E480: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E4C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E500: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E540: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E580: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E5C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E600: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E640: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E680: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E6C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E700: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E740: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E780: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E7C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E800: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E840: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E880: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E8C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E900: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E940: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E980: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E9C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
EA00: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
EA40: .... .... .�� ���� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ���
EA80: ������� ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ���
EAC0: ������� ������ ��� ���� ��� ��� ��� ��� ������� ��� ���� ��� ����
EB00: ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ����
EB40: ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ������� �������
EB80: ��� ��� ��� ��� ������� ��� ���� ��� ���� ��� ��� ��� ��� �������
EBC0: ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ���
EC00: ��� ���� ��� ��� ��� ��� ������� ������ ��� ���� ��� ��� ��� ���
EC40: ��� ���� ��� ���� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ���
EC80: ������� ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ���
ECC0: ������� ������ ��� ���� ��� ��� ��� ��� ������� ��� ���� ��� ����
ED00: ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ����
ED40: ��� ��� ������� ������� ��� ���� ��� ��� ��� ��� ������� ������
ED80: ��� ��� ��� ��� ������� ��� ���� ��� ���� ��� ��� ��� ��� �������
EDC0: ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ���
EE00: ��� ���� ��� ��� ��� ��� ������� ��� ��� ��� ���� ��� ��� ��� ���
EE40: ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ���
EE80: ������� ��� ���� ��� ��� ��� ��� ������� ������� ��� ���� ��� ���
EEC0: ������� ��� ��� ��� ���� ��� ��� ��� ��� ������� ��� ���� ��� ����
EF00: ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ����
EF40: ��� ��� ������� ������� ��� ���� ��� ��� ��� ��� ������� ��� ���
EF80: ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ��� �������
EFC0: ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� �������
Then say I program it again with the same code, no issue everything works fine. Same eeprom peep. If I do the programming several times (not a specific number of times), then I get the error of 'unexpected id' when trying to run the saved function using doCommand("run iot;") and at that point the peek looks like the following. (which i think is the cause for the 'unexpected id' since following is all seem jumbled up)
Note - Even though in previous cases 'eeprom overflow' was shown in addition to 'unexpected id', I coundn't reproduce that error in order to take a peep.
E000: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E040: .... .... .... .... .00) ;$io t_fu ncti on$p inMo de(1 3, 1 ); d w(13 ,1); if
E080: (a0< 200 ){pr int "lev el=" a0;} ; sn ooze (200 0);$ iot_ func tion $pin Mode
E0C0: (13, 1); dw( 13,1 ); if(a 0< 2 00){ prin t "l evel ="a0 ;}; snoo ze(2 000)
E100: ;$.. .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E140: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E180: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E1C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E200: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E240: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E280: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E2C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E300: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E340: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E380: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E3C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E400: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E440: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E480: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E4C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E500: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E540: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E580: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E5C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E600: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E640: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E680: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E6C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E700: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E740: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E780: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E7C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E800: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E840: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E880: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E8C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E900: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E940: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E980: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
E9C0: .... .... .... .... .... .... .... .... .... .... .... .... .... .... .... ....
EA00: .... .... .... .... .... .... ...� ��� ������� ��� ���� ��� ��� ��� ���
EA40: ������� ��� ���� ��� ��� ��� ��� ������� ������ ��� ���� ��� ���
EA80: ������� ��� ���� ��� ���� ��� ��� ��� ��� ������� ��� ���� ��� ���
EAC0: ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ����
EB00: ��� ��� ������� ��� ��� ��� ���� ��� ��� ��� ��� ������� ��� ����
EB40: ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ��� �������
EB80: ��� ��� ��� ��� ������� ������� ��� ���� ��� ��� ��� ��� �������
EBC0: ��� ���� ��� ��� ��� ��� ������� ��� ���� ��� ���� ��� ��� ��� ���
EC00: ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ���
EC40: ������� ��� ���� ��� ��� ��� ��� ������� ������ ��� ���� ��� ���
EC80: ������� ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ���
ECC0: ��� ��� ������� ��� ���� ��� ��� ��� ��� ������� ������� ��� ����
ED00: ��� ��� ������� ��� ��� ��� ���� ��� ��� ��� ��� ������� ��� ����
ED40: ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ��� �������
ED80: ��� ��� ��� ��� ������� ������� ��� ���� ��� ��� ��� ��� �������
EDC0: ��� ���� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ���
EE00: ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ���
EE40: ������� ��� ���� ��� ��� ��� ��� ������� ��� ��� ��� ���� ��� ���
EE80: ������� ��� ���� ��� ��� ��� ��� ��� ��� ������� ��� ���� ��� ���
EEC0: ��� ��� ������� ��� ���� ��� ��� ��� ��� ������� ������� ��� ����
EF00: ��� ��� ������� ��� ��� ��� ���� ��� ��� ��� ��� ������� ��� ����
EF40: ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ��� �������
EF80: ��� ��� ��� ��� ������� ������� ��� ���� ��� ��� ��� ��� �������
EFC0: ��� ���� ��� ��� ��� ��� ������� ��� ���� ��� ��� ��� ��� ��� ���
I think for the time being I would try out the workaround you mentioned.
Thank you again for the reply.
from bitlash.
Related Issues (20)
- Talk to arduino without >command HOT 6
- run bitlash code stored in flash HOT 5
- Blank user function causes following functions not to appear HOT 2
- Port to spark-core or esp-8266 HOT 7
- Not working on new Arduino.. HOT 9
- Can't save user functions to startup? HOT 27
- Deleted-cant add user functions to memory
- Cant add more then 9 commands inside startup functions
- No support for bypass serial
- Serial flash support? HOT 2
- No need to wait after Wire.requestFrom().
- LED was very dim when using bitlash HOT 1
- bitlash demo - blink does not blink HOT 5
- Problem of output buffer when using bitlash
- ========^ unexpected number error for functions HOT 5
- Run code from eeprom HOT 2
- Make SdCard example code use IDE's inbuilt SD API
- Maintained fork?
- update library for support lastet arduino ide version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitlash.