Git Product home page Git Product logo

Comments (3)

eshanmherath avatar eshanmherath commented on September 14, 2024

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.

billroy avatar billroy commented on September 14, 2024

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.

eshanmherath avatar eshanmherath commented on September 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.