Configuring MC9S12C64 Flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Configuring MC9S12C64 Flash

3,060 次查看
pirate
Contributor I
The Microcontroller is MC9S12C64.

I am trying to program the
MC9S12C64  flash but sometimes i get fixup overflow interrupt linker errors. I think the reason for that is the division of flash into blocks...addresses 0x4000 to 0x7FFF and 0xC000 to 0xFFFF are unpaged flash.... 0x8000 to 0xBfff is paged flash i want to use this whole range from 0x4000 to 0xFFFF as contiguous memory ..

how can i do it?

attached is the prm file...
标签 (1)
0 项奖励
回复
3 回复数

1,324 次查看
kef
Specialist I
Not CW guru, but I think that first of all you should make sure you are using small memory model, -Ms compiler switch, also small memory model libraries.
Then you should simply define single ROM segment
 
      ROM           = READ_ONLY     0x4000 TO   0xFEFF;
 
and change placement from 
 
      DEFAULT_ROM, NON_BANKED,             /* runtime routines which must not be banked */
      COPY                    /* copy down information: how to initialize variables */
                              /* in case you want to use ROM_4000 here as well, make sure
                                 that all files (incl. library files) are compiled with the
                                 option: -OnB=b */
                        INTO  ROM_C000/*, ROM_4000*/;

      OTHER_ROM         INTO  PAGE_3C, PAGE_3D                  ;
 
 
 
to
 
 
       DEFAULT_ROM, NON_BANKED, 
      COPY, OTHER_ROM    
                                              INTO  ROM;
 
0 项奖励
回复

1,324 次查看
pirate
Contributor I
I tried the method you suggested Jim but it still doesnot work. I am working with the linker settings in the project.........if you come to think of anything please let me know...
 
Thanks!!
0 项奖励
回复

1,324 次查看
JimDon
Senior Contributor III
I belive I have tried this and I think this works.
Just make sure PPAGE never gets changed.


Code:
SEGMENTS      ROM_8000      = READ_ONLY     0x8000 TO   0xBFFF;PLACEMENT  INTO  ROM_4000, ROM_8000, ROM_C000;

 


0 项奖励
回复