??? 04/16/08 16:47 Read: times |
#153522 - SDCC XRAM Problem |
I'm very new to embedded programming, though I have been programming Windows and Linux programming in C and C++ for the past 10 years, so bear with me if I'm not describing this problem adequately. I'm using the Silicon Labs C8051F340, the Silicon Labs IDE, and SDCC.
I'm working on a handheld device that has a variety of sensors (temp, tilt, gps, etc.) and a display. I'm using an 18x8 array (called "screen") of unsigned chars to represent the characters on the display. I'm running into problems when I try to declare a second 18x8 array ("select_screen") of unsigned chars to store clickable 'links' to other screens. I'm using the small memory model and I've used up about 190 bytes of internal RAM. The screen array and select_screen array are both declared using the xdata keyword. When I add in the select_screen definition the program compiles, but when I run it, nothing happens (no warnings during compile). I've tried putting a breakpoint on the first line in main() and it is never reached. If I comment out the select_screen definition the program will run fine. I've examined the external RAM using the IDE and it appears as though the screen array is initialized and then I can add in 5 more bytes before I get the program to hang (I tried just declaring unsigned chars and assigning them values until the program died). I've tried fiddling with the values of --xram-loc and --xram-size in the linker. I can see the data move around in the external RAM window, but it still seems like I'm running up against the 150ish byte limit. Any ideas? shawn |
Topic | Author | Date |
SDCC XRAM Problem | 01/01/70 00:00 | |
Sounds like ... | 01/01/70 00:00 | |
I *think* I have that covered... | 01/01/70 00:00 | |
it is NOT | 01/01/70 00:00 | |
Assembly | 01/01/70 00:00 | |
I'll try anything once | 01/01/70 00:00 | |
OK, here is a way | 01/01/70 00:00 | |
ANSI C | 01/01/70 00:00 | |
SDCC startup | 01/01/70 00:00 | |
unsigned char _sdcc_external_startup(void) | 01/01/70 00:00 | |
holy cow | 01/01/70 00:00 | |
The problem is obvious ... | 01/01/70 00:00 | |
I'm not that bombastic, but agree in principle wit | 01/01/70 00:00 | |
When someone is familiar with it as you are ... | 01/01/70 00:00 | |
show me one from this year | 01/01/70 00:00 | |
You have taken my comment wrong. | 01/01/70 00:00 | |
My Guess Is That... | 01/01/70 00:00 | |
not always ...![]() | 01/01/70 00:00 | |
obscure? | 01/01/70 00:00 |