HCS08DZ128, non banked application. Processor Expert generates the prm file.
I get "out of allocation space in segment ROM at address nnnn".
PE has not added sections ROM1 and ROM2 to the prm file.
How do I tell Processor Expert to include not only ROM, but also ROM1 and ROM2 in the prm file it generates.
Thanks, Anders J
Vojtech,
I want to use all available ROM in my SMALL memory model application.
When PE generates the prm file the placement section is as follows:
PLACEMENT
DEFAULT_RAM /* non-zero page variables */
INTO RAM,RAM1;
NON_BANKED, DEFAULT_ROM, ROM_VAR, STRINGS INTO ROM;
PAGED_ROM /* routines which can be banked */
INTO PPAGE_0,PPAGE_0_1,PPAGE_2,PPAGE_4,PPAGE_5,PPAGE_6,PPAGE_7,ROM1,ROM2;
_DATA_ZEROPAGE, /* zero page variables */
MY_ZEROPAGE INTO Z_RAM;
END
The only way I have found to have access to ROM1 and ROM2 is to modify
prm file myself as follows:
PLACEMENT
DEFAULT_RAM /* non-zero page variables */
INTO RAM,RAM1;
/* Added ROM1 and ROM2 to PE generated prm file */
/* 2009-09-10/AJ */
NON_BANKED, DEFAULT_ROM, ROM_VAR, STRINGS INTO ROM, ROM1, ROM2;
PAGED_ROM /* routines which can be banked */
INTO PPAGE_0,PPAGE_0_1,PPAGE_2,PPAGE_4,PPAGE_5,PPAGE_6,PPAGE_7,ROM1,ROM2;
_DATA_ZEROPAGE, /* zero page variables */
MY_ZEROPAGE INTO Z_RAM;
END
What do I need to do to generate a prm-file that uses all available rom?
Thanks,
Anders J
I am surprised that PE allows us to create named sections of ROM, and not generate entries for placement. I like the GUI assissted building of the PRM file. Maybe the solution isn't here, but elsewhere.
for example
SECTION
FRED = READ_ONLY 0x1000 TO 0x1fff;
...
END
PLACEMENT
FredContent INTO FRED;
....
END
In my code I have something along the lines of
#pragma CONST_SEG fredContent
const char dataInFred[] = "Fred Text";
Is the solution in using some other form of CONST_SEG or CONST_SECTION?
I see
#pragma CONST_SEG FRED
will land data in ROM/DEFAULT_ROM.
Is there a PLACEMENT definition we can put in our code?
#place FredContent INTO FRED
#pragma CONST_SEG FredContent
Just clutching at straws.
I know, just generate my close to perfect PRM, then disable regeneration and add the placement names and all will work.
Alex
Hello AndersJ,
Processor Expert does not support such functionality to generating prm file according to your request. Please follow my steps from my resonse above:
To extend memory area of NON_BANKED, DEFAULT_ROM, ROM_VAR and STRINGS there is only the possibility to disable code generation of prm file using "Generate PRM file" property from "Build options" tab from "CPU bean Inspector window" and to edit it manually.
For editing prm file please use menu command "View Linker File" from CPU bean´s pop-up menu.
best regards
Vojtech Filip
Processor Expert Support Team
What do I need to do to make sure I have ALL ROM available?
* Banked memory model?
* Non banked memory model?
* PE generated prm file?
* Manually edited prm-file? What is needed?
* Other?
Thanks,
Anders J
I think the easiest way for you will be the following:
1 - switch "Memory model" property in "Build options" tab in CPU bean inspector window to "Banked memory" model
- in compiler options rewrite -Ms parameter to -Mb
- in project panel on Files tab unfold Libs group and choose library according to selected memory model
2 - disable generation of prm file (please follow steps mentioned before)
3 - please find attached prm.txt file and copy the code inside this file into your prm file in a project
Note:
The 3rd steps must be additionaly made in Processor Expert V3.06 and older because the prm file in banked memory model is not correctly generated in these versions.
The problem has been already fixed in PE V3.07 in CW V6.3. To download the latest version of Code Warrior and Processor Expert please follow this link.
best regards
Vojtech Filip
Processor Expert Support Team
I have a function code that is more than 16kbytes. Even if I went thru this thread and look at the other thread to make the 128kbytes of flash available, the linker is still grumbling about not space in ROM. Is there a way to have a function that is larger than 16k extend to more than 1 page of the Banked ROM?
I have been fighting this problem for the past 2 weeks!
Thanks
Hello, and welcome to the forum.
Why not break up the very large function into a number of sub-functions? This should also make the code easier to follow, and simplify the debugging. I can think of no reason why a single function would need to be such a large size.
Regards,
Mac