Hello
I Always used Atmel AT89C51RE2 but there the production stopped we changed over to Silicon C8051F580 processor.
now I am facing problems with the memory. when I add variables after downloading the program wont run. the compiler give Program Size: data=78.3 xdata=172 code=10749
so to mine point there is enough space. maybe something with parameters?
with regards
Jos
Maybe time to break out the documentation and the debugger, and figure out what the processor is objecting too?
Take a listing file, walk the code, add diagnostics.
How can you add variables after downloading?
Note that the C8051F580 is not a C251
when I add variables after downloading the program wont run.
Probably means something like:
When I've added variables to the project and rebuilt then the download won't run.
Maybe my having a wife who speaks English as a second language makes it easier for me to translate such sentences on the fly (?)
Anyway, obvious area to look is memory allocation. So examination of map files and regular debugging would be a sensible path to follow.
Presumably, just don't just add variables - that would be pointless without also adding code to use those variables.
So, as well as the memory allocation, you need to look at that code.
As already noted, use the debugger.
Add printfs and/or other instrumentation to see what your code is doing.
Carefully compare before & after the changes ...
www.avrfreaks.net/.../2418156
Wow. You are a Mr Smarty-Pants. lol.
was your port to the SiLabs part thoroughly tested and debugged before you started adding/changing stuff ?
what do you mean? when I add variables after downloading HOW?. when I add variables to my sode the program wont run.
porting toa 589, you, typically missed a set of SFRPAGE
this is discussed in parallel on the SiLabs forum
of course I use those variables in mine code
I have seen that when I have to many variables the program wont run. so debugging is also impossible.
I have declarede arrays of 1000 bytes no problem.
I shall look to the amound of variables and try to decrease those.
Hallo Erik
can you send me a link to this topic of Silicon? thanks
Of course the program runs.
There are only 3 ways to stop a CPU from running: 1. no power; 2. something external is holding it in reset; 3. your code has put it into a "sleep" state.
Otherwise, the CPU will always be running; ie, fetching stuff from CODE memory, and executing it. Of course, what it's fetching may be junk - but it will still be running.
"so debugging is also impossible."
Not at all! The debugger lets you see where it's going wrong!
OK - make that four:
4. The clock has stopped.
Go on. You started that topic - surely you know where it is?
Again, note that the name is Silicon Labs. (if that's too much for you to type, just say "SiLabs").
Hello Andrew
thanks for your response.
I will try to explain what I am doing.
Our company has a monitorsystem and I am working on the substations. Normally the substations do not have the ability to store measurements. This is what I am trying to achieve.
on the old board with the AT89C51RE2 it works.
but as I told before this processor is obsolete and we changed over to C8051F580
what should have same memory space.
First I get the firmware running without datalogging, to see if the hardware was ok. now I am adding the routinges for datalogging. therefore I need more variables, after adding those variables the problems starts.
the program did not start.
in the C8051F580 I use a startup program and found out that the program hangs in the first routine ( I will add a part of the code later) when I reduce the amount of variables it runs again.
Now I am using some structures, what seems to work but I find that the variables are corrupted.
maybe I use some wrong arguments in the code (pragma?)
here the startup file
?C_STARTUP: LJMP STARTUP1
RSEG ?C_C51STARTUP
STARTUP1:
IF IDATALEN <> 0 MOV R0,#IDATALEN - 1 CLR A IDATALOOP: MOV @R0,A DJNZ R0,IDATALOOP ENDIF
I use this argument in the main routine
SFRPAGE = ACTIVE_PAGE;
if you can help me further, please
thanks in advance