[Icc-mot] GNU to ICC

Edward Karpicz ekarpicz at freemail.lt
Wed Feb 20 13:14:09 PST 2008


I forgot that C family members, different compared to D's and A's, can have 
linear nonpaged memory area larger than 48k. Good news for you, isn't it? I 
didn't try C64 myself, but if I understand datasheet properly, then you can 
have up to 64-4=60k of linear nonpaged flash. If you didn't read in the docs 
about internal memories priorities, then please note that RAM takes 
precedence over flash. It means when RAM and flash addresses do overlap, 
then RAM is visible and piece of flash, covered by RAM block, isn't visible. 
And the next rule - register block has the highest priority. That's why 
64-4k. INITRM register out of reset is set to 9, so RAM block is at 
0x0.0xFFF. INITRG register defaults at 0, so register block occupies 
0x0.0x3FF addresses. So out of reset you have 2k of registers at 0x0.0x3FF, 
3k of RAM at 0x400.0xFFF, and 60k of flash at 0x1000.0xFFFF. If you need all 
4k of RAM, then you will have to remap RAM for example to 0x1000.0x1FFF, 
loosing extra kB of flash.

So maybe try changing program memory setting to 0x1000.0xFFFF. If it won't 
fit 60k, then I guess you need more flash and paged memory.


Edward

P.S. you may have problems flashing compiled 0x1000.0xFFFF image due to 
possibly lack of support from debugger/programmes. But this is solvable 
converting S records to proper format.


Oskar Atkinson wrote:

> Well, looking different now ... :-)
>
> However I need to bug you again...
>
>>>
> How much space do you need for your constants? Could your constants and
> all the code into 48k? It would be the best for you, just use nonpaged
> 0x4000.0xFFFF area.
> <<
>
> Seems it not fitting in 48k,
>
> icc12w -o MSIIETXTRA-ICC-2008 -btext:0x4000.0xFFFF -bdata:0x0400
> -dinit_sp:0x1000 -fmots19 @MSIIETXTRA-ICC-2008.lk
> !E <library>(200): area 'text' not large enough
> want size 24967
> lo 49487 hi 65535 size 16049
>
> And then I am getting a gazillion errors:
>
> !E ms2_extra_main.o(2749): Code address 0:0x400b already contains a
> value
> !E ms2_extra_main.o(2749): Code address 0:0x400c already contains a
> value
> Counting up to
> !E ms2_extra_main.o(2749): Code address 0:0x6186 already contains a
> value
>
>
> Oskar
>
> _______________________________________________
> Icc-mot mailing list
> Icc-mot at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-mot
> 



More information about the Icc-mot mailing list