2007-07-18 06:47 AM
how can I save 2 bytes in eeprom using c
2006-11-15 11:12 PM
Hello
I use st7flite09 and stvd3 and cosmic c. I want to store two bytes in eeprom. How can I do it? I wrote in main.c: @eeprom char var1; @eeprom char var2; and I became error: #error clnk Debug\sw-dimm.lkf:1 no default placement for segment .eeprom How can I fix it? Please help me.2006-11-16 03:52 AM
2006-11-16 08:09 PM
Thanks Luca
I try it and no luck. I write 0x1000 (first byte in eeprom) no luck. I have question: how can I modify *.lkf file? It is done by linker. This is my first step in st7 and c language ( befor I write only assemler for family '51)and I can't find solution for this problem. I must write something in main.c and then linker modify *.lkf?2006-11-20 03:24 AM
2006-11-21 07:58 PM
it's immposible!
I wrote extra line like you said me: +seg .eeprom _b 0x1000 -c in *.lkf file.But when I try to start ''build'' function in STVD7 *.lkf file is automaticaly overwrite and my line is deleted. I write my program in STVD 7 , maybe I must change anything in options (but I don't know where).2006-11-24 03:06 AM
In Project->Settings->Linker->Input, untick the 'auto' box beside the 'Script Lkf file name' text box.
You will then need to re-write the linker file with the extra segment locator (i.e. go back and add +seg .eeprom _b 0x1000 -c).2006-12-07 02:09 AM
I believe I might have similar problems to above. My application only works when I don't use certain I/O ports. Is there any documentation for editing the linker file. Can't find any in the IDEA help... I assume that the linker documentation is what I'm seeking.
2006-12-07 02:18 AM
The linker doesn't know about I/O ports, only memory addresses. What is the error you are having?
2006-12-07 04:44 AM
the linker documentation is actually a chapter of the compiler manual. This manual is installed with every compiler, or you can find it
Regards, Luca (Cosmic)