| ??? 07/09/08 16:22 Read: times |
#156557 - Get the C right, then look at the target CPU Responding to: ???'s previous message |
It seems that you are a little unsure of arrays, and how they are used. I would guess that the main logic of your problem could apply to a standard C console program. So compile it for the PC.
If your program has no side-effects or corruption on a PC, then start looking carefully at your memory use. The PC may well show up stray pointers, but more importantly a PC debugger will show a lot more than an 8051 simulator. Never try to force storage where the compiler does not want it to go. You can hint and advise, but forcing fixed addresses is a recipe for disaster. David. |
| 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 |



