Hello.
I'm working on my tesis to complete my studies of Electronic Engineering.
It's my first time with a microcontroller of S12's Series.
I really don't understand the themes of banked and non-banked memory.
I need to make a web server. For that I'm studing the AN2836 for NE64 microcontroller.
When I compile that project, codewarrior generates an error that says:
"Out of allocation space in segment ROM_C000 at address 0xEC6B"
The code of the .PRM is here:
NAMESENDSECTIONS // RAM = READ_WRITE 0x2180 TO 0x3FFE; /* BUFMAP = 0 (128 byte) */// RAM = READ_WRITE 0x2300 TO 0x3FFE; /* BUFMAP = 1 (256 byte) */// RAM = READ_WRITE 0x2600 TO 0x3FFE; /* BUFMAP = 2 (512 byte) */// RAM = READ_WRITE 0x2C00 TO 0x3FFE; /* BUFMAP = 3 (1K) less then means no DHCP*/ RAM = READ_WRITE 0x3200 TO 0x3FFE; /* BUFMAP = 4 (1.5K) */ /* unbanked FLASH ROM */ ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF; ROM_C000 = READ_ONLY 0xC000 TO 0xF780; /* banked FLASH ROM */ ROM_Mon = READ_ONLY 0xF800 TO 0xFEFF; SECURITY = READ_ONLY 0xFF00 TO 0xFF0F; ROM_FF10 = READ_ONLY 0xFF10 TO 0xFF7F; PAGE_3C = READ_ONLY 0x3C8000 TO 0x3CBFFF; PAGE_3D = READ_ONLY 0x3D8000 TO 0x3DBFFF; ENDPLACEMENT _PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */ STARTUP, /* startup data structures */ ROM_VAR, /* constant variables */ STRINGS, /* string literals */ NON_BANKED, /* runtime routines which must not be banked */ COPY /* copy down information: how to initialize variables */ INTO ROM_4000,ROM_C000; MyConstSegPage1 INTO PAGE_3C; DEFAULT_ROM INTO PAGE_3D; DEFAULT_RAM INTO RAM;ENDSTACKTOP 0x3FFF
How can I solve this problem?
In AN2836 comments the following:
"P&E_ICD_linker.prm also defines the placement of the sections. It is noteworthy to discuss the
MyConstSegPage1 placement
MyConstSegPage1 refers to a web server file array for the ActiveX
component, NE64DemoNOPIC_file, which is contained in NE64DemoNOPIC.c. Because
NE64DemoNOPIC.c is a constant array, by default, it would be stored in ROM_VAR which causes a
FLASH allocation problem for this project. Creating MyConstSegPage1 and grouping the
NE64DemoNOPIC_file data with DEFAULT_ROM resolves the FLASH allocation problem. More
information on FLASH allocation can be found within the CodeWarrior user manual."
I don't understand indeep that. My question is how to implement that correction to solve my problem?
Thank you very much, I will waiting your answers!
.