Accessing Paged Memory in AC128

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Accessing Paged Memory in AC128

2,245件の閲覧回数
Davo
Contributor II

I'm trying to access PPAGE2 in the AC128.  The AC128 comes out of reset with PPAGE=2.  Therefore there should be 16k of flash available from $8000 to $BFFF.  I have a lookup table starting at $8000. It appears to program OK (using P&E USB Multilink), however when my running code reads back from $8000 onwards it only RETURNS $FF. 

 

I have tried forcing PPAGE=2 in code, but this makes no difference.

 

When I look at the flash using the P&E PROGHCS08 Show Module command, I can see the range from $8000 programmed.  However when I dump the flash to an S19 file using the Upload Module command, the code is nowhere.  Some files are attached.

 

I'm still researching this, but would appreciate any ideas - am I missing something here ?

 

David

ラベル(1)
0 件の賞賛
返信
6 返答(返信)

1,007件の閲覧回数
tonyp
Senior Contributor II

I did a simple search for 8000 and I found the following lines inside your S19.  So, you get correct results when running your code -- all FFs from address $8000 up.  Apparently, in your provided screenshot, PPAGE is not 2, but possibly zero(?).  It seems like you're loading the table into a wrong area, check (or post for review) your actual S19, not the dumped one.

 

S1138000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7C
S1138010FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6C
S1138020FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5C
S1138030FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4C
S1138040FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3C
S1138050FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF2C
...

0 件の賞賛
返信

1,007件の閲覧回数
Davo
Contributor II

Thanks for the replies.  I have attached the .S19 file produced by the assembler (Compiled.s19), and the dump from the PROGHCS08 programmer (Dumped.s19). These are slightly different to the previous version, but the problems are the same.

 

I suspect the data is being written into page 0 flash, as when I scroll down on the PROGHCS08 I start seeing a mirror of the flash at 0A0F0h (the AC128 flash program space starts at 20F0h).  This gets confusing, I am using org $8000 to define the start location of the table, , as this is the correct absolute address in the extended address range for this page. Therefore when I set PPAGE=2, this page should be sitting at $8000.  Perhaps there is another way to advise the P&E assembler to start my tables in the correct extended address range.

 

I am not using CodeWarrior - this is a legacy assembler app that I am updating to allow some tables to use the larger address space of the AC128. I am using P&E WINIDE and P&E's CPROG/PROG software.  I have also updated my flash programming algrithms to the latest ones available on their web site.

 

0 件の賞賛
返信

1,007件の閲覧回数
kef
Specialist I

When you open S-file in PROGHCS08, the question is how it treats S1 records pointing into page window. Obviously S1 record doesn't carry page number information. It is possible PROGHCS08 thinks S1 0x8000-0xBFFF records are PPAGE 0 records.

 

Also the question what PROGHCS08 dumps. Does it dump in S1 records CPU 16bits memory space, with some page mapped to 0x8000, or does it dump in S1 records only PPAGE=0? Since dump.s19 starts well below page window, from 0x2140, it seems in S1 records PROGHCS08 dumps 16bits memory space with some page (maybe default PPAGE=2) mapped to 0x8000? If so, then in dump.s19 there should S2 record pointing to 0x008000. But i see least S2 record address is 0x018000...

0 件の賞賛
返信

1,007件の閲覧回数
Davo
Contributor II

I contacted P&E technical support. They advised that I needed to address page 2 in assembler using $28000.  I tested this no working result. Further investigation with P&E revealed that CASM08 does not support address spaces beyond 64k.  It appears the command line programmer does support paged memory.

 

P&E were helpful in creating a customised flash programming algorithm for CPROG that would allow me to program $8000 to $BFFF into page2 of flash be default.  I will test this in the next few days and will post the results.

 

P&E advised that they will be updating CASM08 in the future to support expanded memory. 

 

Another day in the life of a firmware developer !

 

Thanks for all your help. 

 

David

 

0 件の賞賛
返信

1,007件の閲覧回数
tonyp
Senior Contributor II

Are you sure the programmer is not using the page:address scheme?  (I have been using this programmer myself for a long time but, strangely, I only had to load the range $8000-$BFFF through my own bootloader so I never had to find out how P&E's program treats this special range of addresses, and specifically the ambiguous case of $8000-$BFFF.)  So, you may have to ORG the table at $28000 (not $8000) to get it where you want.

0 件の賞賛
返信

1,007件の閲覧回数
kef
Specialist I

PROGHCS08 window shows the data in PPAGE 0, fifth address digit is 0. And your dump file doesn't include data for PPAGE 0. It dumps only PPAGEs 1 to 7 and nonpaged data from 0x20F0 to 0xFFFF. Data at banked address 0x08000 is not included.

 

Did you set up your Codewearrior? project as large or small? Hm, it seems CW6.3 doesn't allow to choose memory model. So you should force your data to PPAGE_0 segment. If you changed nonbanked ROM segments or created your own segment at 0x8000, then I think you need to tune burner file to remap data at 0x8000 to 0x28000.

0 件の賞賛
返信