??? 07/08/08 19:35 Read: times |
#156542 - So where is the code Responding to: ???'s previous message |
Assuming you you know ASM have you looked at the LST files.
extern char operational_array[] = {1,0,0,0,0}; That is an error you can not initialize and extern. Where is the real code (cut and paste, not typed). The compiler reads an array in C the same way you would do it in ASM as an indirect move. Most likely with R0 or R1. Do you have any ASM functions or interrupts? If so you must save and restore any thing you use. Does your code generate warnings? Is the warning level set to maximum. In the end C arrays in Keil require no special care. A char array of 4 bytes is no different than a long. You have a bug in your and have not provided enough info for people upto 6000 miles away to help. |
Topic | Author | Date |
Data Array getting corrupted after init | 01/01/70 00:00 | |
OnePossibleIdea.... | 01/01/70 00:00 | |
I did not do anything with the stack | 01/01/70 00:00 | |
As Michael said.... | 01/01/70 00:00 | |
How do you test and debug code? | 01/01/70 00:00 | |
Keil is the only thing in place | 01/01/70 00:00 | |
'crap'?? | 01/01/70 00:00 | |
Is this the book you refer? | 01/01/70 00:00 | |
nope | 01/01/70 00:00 | |
Erik | 01/01/70 00:00 | |
So where is the code | 01/01/70 00:00 | |
do NOT "put them" | 01/01/70 00:00 | |
Focus | 01/01/70 00:00 | |
Simulator | 01/01/70 00:00 | |
So this is on a simulator? | 01/01/70 00:00 | |
Post your duff code | 01/01/70 00:00 | |
Finding Cause of Corruption | 01/01/70 00:00 | |
Get the C right, then look at the target CPU | 01/01/70 00:00 | |
Optimizing Compilers | 01/01/70 00:00 | |
In my experience..... | 01/01/70 00:00 | |
Keil C 51 Optimizations | 01/01/70 00:00 | |
Use IAR then | 01/01/70 00:00 | |
different approaches | 01/01/70 00:00 | |
sometimes, depends | 01/01/70 00:00 | |
Thanks![]() | 01/01/70 00:00 |