Hi,
Have a several ain the code that contain strings amongst other constant data and have run out of data memory as these are not being stored in ROM.
Not been using this device/environment long and wondered if it was possible to force the linker to put the constant data in P memory?
I found a Freescale Application Note AN1952.pdf, that seems to indicate that this is possible but the use_rodata pragma is not recognised by the IDE.
Any help would be appreciated before I resort to more convoluted processing to achieve the same.
Cheers
Dave
Hi Dave,
with CW for DSC V8.3 I've created an example for 8366 through the EABI project wizard.
By default in the prm file you can see:
.data_in_xROM : | ||
{ | ||
# constant data is placed in x flash ROM |
* (.const.data.char) # used if "Emit Separate Char Data Section" enabled | |
* (.const.data) | |
} > .x_flash_ROM
.x_flash_ROM | (RW) : ORIGIN = 0x4000, LENGTH = 0x4000 |
do you want to place the constant in another memory section ?
Unfortunately the #pargma use_rodata is not compatible with 56800E.
Extract of "56800x_Build_Tools_Reference.pdf" manual:
Compatibility
This pragma is compatible with the DSP56800, but it is not compatible with the DSP56800E.
I've created a new section .p_flash_ROM_bis and associated the .data_in_xROM instead of .x_flash_ROM.
Attached you will find the example.
Hope this will help you.
Pascal
Thanks for your reply Pascal.
I've been digging about a bit more and compiling, comparing map files, which I probably should have done earlier :smileyblush: but anyway, the data is being placed in data_in_xROM.
However I was starting to run out of space, but if I recoded the application to use the same strings and data embedded within functions with if/else ladders, rather than have a more easily maintained table and generic handling functions, then, although the code size increases, the data footprint also drops.
I was just surprised that there was such a big difference (code size increases by 10K, data size dropped by 3.5k) when the strings, data elements were still being used.
Dave
you're welcome.
don't hesitate to contact us.
Hi, again.
Looking at it, is it possible to use the full 32K of data flash, rather than just 16K?
The compile and link is controlled solely by the IDE, and I can't see anywhere to update this, other than by editing the generated cmd file.
Dave
Hi,
you can manually update the cmd file.
Now, included in DSC V8.3, Processor Expert is a tool generator which can help you to create your application.
Lot of customers are using this tool.
You can create a project using Processor Expert with the project wizard File + New.
Some examples using: bootloader, Peripheral, etc ... are available.
++++++++++++++
Processor Expert Software is a development system to create, configure, optimize, migrate, and deliver software components that generate source code for Freescale silicon. Processor Expert software covers Freescale's S08/RS08, S12(X), ColdFire, ColdFire+, Kinetis, DSC 56800/E, QorIQ and some other Power Architecture® processors. Processor Expert software is available as part of the CodeWarrior tool suite or as an Eclipse-based plug-in feature for installation into an independent Eclipse environment...
++++++++++++++
For details I recommend you to have a look to :
Processor Expert Software and Embedded Components
Regards
Pascal