Hello all, until today I've been happily developing a sizable project with the TI CC2430 with SDCC.
Suddenly I have a problem I don't understand. A linker error: "?ASlink-Error-Could not get 30 consecutive bytes in internal RAM for area DSEG" I'm guessing it has something to do with stack space, since it happened after moving some functions around and increased the stack depth. I've made globals out of some of the locals in these functions, no help. I use a divide in the function, dividing an unsigned 32bit by an unsigned 8bit, and if I comment them out then lo and behold no problem. Does this mean I need to recompile some sdcc libraries with --model-large? I've been doing that divide for weeks, so I'm guessing that some kind of precious, limited RAM has been in use for calls to the divide function and now there isn't room anymore. Compiler arguments I use: --model-large and linker: --model-large --xram-loc 0xE000 --xram-size 8192 --code-size 32768 Attached is the .mem file generated. This is kind of an emergency as this project is behind schedule and almost ready to go, and people are waiting with specialized test environments to run this board. So any help/explanation is greatly, greatly appreciated. I didn't find an explanation of what DSEG is in the sdcc docs. If I need to recompile sdcc libraries, getting a link to documentation on how to do this be most appreciated. Thanks in advance. Jesse Internal RAM layout: 0 1 2 3 4 5 6 7 8 9 A B C D E F 0x00:|0|0|0|0|0|0|0|0|c|d|d|d|d|d|d|Q| 0x10:|Q|Q|Q|Q|Q|Q| | | | | | | | | | | 0x20:|B|B|a|a|a|a|a|a|a|a|a|a|a|a|a|a| 0x30:|a|a|a|a|a|a|a|a|a|a|a|a|a|b|b|b| 0x40:|b|b|b|b|b|b|b|b|b|b|b|b|b|b|b|b| 0x50:|b|b|b|b|b|b|b|b|b|b|b|b|b|b|b|b| 0x60:|b|b|b|S|S|S|S|S|S|S|S|S|S|S|S|S| 0x70:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0x80:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0x90:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0xa0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0xb0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0xc0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0xd0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0xe0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0xf0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S| 0-3:Reg Banks, T:Bit regs, a-z:Data, B:Bits, Q:Overlay, I:iData, S:Stack, A:Absolute ERROR: Couldn't get 30 bytes allocated in internal RAM for area DSEG. Stack starts at: 0x63 (sp set to 0x62) with 157 bytes available. Other memory: Name Start End Size Max ---------------- -------- -------- -------- -------- PAGED EXT. RAM 0 256 EXTERNAL RAM 0xe000 0xe8f7 2296 8192 ROM/EPROM/FLASH 0x0000 0x7686 30343 32768 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user