Topic : Error 107 Seg_Registers

Forum : ST7/STM8

Original Post
Post Information Post
March 19, 2008 - 3:44pm
Guest

I believe this means I have run out of direct access RAM.

Memory Map as follows:

DATA 0080H 0002H PAGE0 ?D0?Message_Generation_Function?APP_MESSAGE_GEN
DATA 0082H 0014H OVERLAID UNIT ?D0?TEAEncrypt?APP_MESSAGE_GEN
DATA 0082H 0011H OVERLAID UNIT ?D0?IncrementSyncCounter?APP_MESSAGE_GEN
DATA 0096H 0005H OVERLAID UNIT ?D0?EEPROM_Read?EEPROM
DATA 0096H 0005H OVERLAID UNIT ?D0?EEPROM_Write?EEPROM
DATA 009BH 0040H PAGE0 ?D0?APP_GLOBALS
DATA 00DBH 0002H PAGE0 ?D0?IO_Read?IO
DATA 00DDH 0004H PAGE0 ?D0?IO_Write?IO
DATA 00E1H 0007H OVERLAID UNIT ?D0?IO_Input?IO
DATA 00E1H 0002H OVERLAID UNIT ?D0?IO_ByteWrite?IO
DATA 00E1H 0006H OVERLAID UNIT ?D0?IO_Output?IO
RLST7 LINKER/LOCATOR V1.02 03/19/08 09:24:48 PAGE 2

DATA 00E8H 0002H PAGE0 ?D0?ITC
DATA 00EAH 0003H PAGE0 ?D0?ITC_ConfigureInterrupt?ITC
DATA 00EDH 0009H PAGE0 ?D0?WDG_ComputeTimeout?WDG
DATA 00F6H 0009H PAGE0 ?D0?SPI
DATA 0180H 0080H UNIT ?C_STACK?SEG

I am not sure how to move data into I or X DATA or if this is correct for the ST7. I know I have more memory between 0xFF and 0x180, but how do I access it?

Thanks

Replies
Post Information Post
+1
0
-1
March 20, 2008 - 8:59am
Raisonance Support Team

Hello Jordan,

On ST7, PAGE0 stands for "short range RAM" (i.e. below address 255, address fits within a single byte), although DATA stands for "long range" RAM.

The easiest way to go is to switch your project to DMC(DATA) or change the ?D0?APP_GLOBALS global variables to data.
You can do this as follows:

data char myarray[20]; /* Short-range data */
data char myarray2[20]; /* Long-range data */

Also please refer to the Compiler manual for "Auto-relocation mode", which automatically affects the variables to page0 or data depending on the project's RAM usage.

Bruno