Add additonal area to the copytable of tc222

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Ok, here is the problem.

I have a bunch of variables that I need to have a ROM version of at a specific address and a RAM version at any RAM address. No problem yet, I just did two copies of each variable (one ROM and one RAM) and a init function which copies from ROM to RAM.
The problem is that the init function which copies the variables is really huge and take a lot of flash. So I started looking at just using a memcopy over all of the variables, but I do not know how to garantee that the variables is in the right order and with the same padding. I cannot use a struct to accompish this as I need to find the variables in the map-file.

Then I found the copytable and saw that all the RAM variables was copied from the ROM with the copytable. The problem is that I cannot move the ROM versions of the copytable variables.

So my question is really can I add an additional area with specific variables to the copytable?

This is how it looks like in the map-file:

| mpe:dspr0 | | .data.Temp.VariableA(13026) | 0x00000001 | 0x700027fe | 0x000027fe | 0x00000001 |

| mpe:pflash0 | | [.data.Temp.VariableA] (35650) | 0x00000001 | 0xa002281e | 0x0002281e | 0x00000001 |

I want to change the ROM address 0xa002281e to another which I can choose, but just for specific variables, I do not want to move the entire copytable ROM area.

Please let me know if you need additional information, I am sure you do, this is my first time writing such a post.

/Johan
0 Likes
1 Reply
User13290
Level 5
Level 5
First like received First solution authored
Hi Johan,
Johanox wrote:
I want to change the ROM address

TASKING rom copies can be located by means of the load_addr linker script attribute. Their user manual shows an example how this is done.

Best regards,

Henk-Piet Glas
Principal Technical Specialist
0 Likes