cancel
Showing results for 
Search instead for 
Did you mean: 

How to store 10,560 'unsigned int' values in ROM (ST10F276)

johnlintern9
Associate II
Posted on May 08, 2009 at 13:52

How to store 10,560 'unsigned int' values in ROM (ST10F276)

2 REPLIES 2
johnlintern9
Associate II
Posted on May 07, 2009 at 15:05

I want to store 2 arrays in ROM, both of which contain 5280 unsigned int values.

I can successfully compile the code with 1 array, but when I compile the code with 2 arrays I get the following error...

Linking and locating to st10_theta_simulator.out

E 235: module theta_sim.obj (THETA_SIM_C): section 'THETA_SIM_5_NC':

combination exceeds page size

total errors: 1, warnings: 0

wmk: *** action exited with value 1.

wmk: st10_theta_simulator.out removed.

The arrays are assigned in ROM using 'const', as follows...

unsigned int const theta_in_capcom[5280]={3118,3152,3117,3118,3107...ect...3214};

unsigned int const theta_out_capcom[5280]={4569,4127,4638,4813,4214...etc...4647};

I am using Tasking EDE to build this code for an ST10F276.

How can I assign both these arrays in ROM ?

johnlintern9
Associate II
Posted on May 08, 2009 at 13:52

Some other information that might help...

To get the code to compile, I have temporarily reduced the size of one of the arrays to 10, so I now have...

theta_in_capcom[5280]

and...

theta_out_capcom[10]

Once downloaded to the emulator program (Hitex HiTOP5), I can see that theta_in_capcom starts at address 0x001070 and ends at address 0x0039AF (10560 bytes of data).

I can see that theta_out_capcom starts at address 0x0039B0 and ends at address 0x0039C3 (20 bytes of data).

If I were to change the size of theta_out_capcom back to 5280, then presuming it would start at the same address of 0x0039B0, the end address would be 0x0062EF (10560 bytes of data).

With reference to the ST10F276 datasheet, the memory is made up of 1024 data pages where each page is 16k.

If the start address of theta_out_capcom was at 0x0039B0 and the end address was 0x0062EF, then it would start on data page 0 and end on data page 1 - refer to diagram in attachment.

Could this be a problem ?

Would one word (2 bytes) cross over the data page 0 and 1 ?

If so, how do I solve this problem ?

Surely there is enough memory on the ST10F276 to hold all this data I want to store in ROM ?

[ This message was edited by: john.lintern on 08-05-2009 17:24 ]