How generate a s19 with longword address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How generate a s19 with longword address

2,291 Views
eddv
Contributor I

Hi coleagues,

Can somebody help me this tricK? I need to generate a s19 file with 32 bits of address. In .list file, I get: just put   LLEN 32 on the file thatthe address in this file appear in 32bits, but, in s19 file, is put just the address needed. For example: if my code (or data table) start at $0100, the s19 uses 2bytes. If starts as $100000, the s19 file uses 24bytes to specify the address. If I put my data at $01000000, then compiler just put 3bytes in s19 file.

My question is: how force it to use 4bytes in s19 file?

Thanks by any help!

Labels (1)
Tags (1)
0 Kudos
9 Replies

946 Views
kef
Specialist I

Do you want burner to generate S3 records only? Try replacing in burner.bbl

  

    SRECORD=Sx

 

to

 

    SRECORD=S3

0 Kudos

946 Views
eddv
Contributor I

Thanks, kef, but...

I do it, but doesn´t work...  

The compiler act haw the sx mode is selected.

 

To generate in a file called "nonono.asm.sx"  (asm.sx type), is the same mode?

 

0 Kudos

946 Views
kef
Specialist I

What target we are tlking about? I just

1) created empty new XD64 project

2) opened burner.bbl file

3) In burner.bbl found two instances of SRECORD=Sx and replaced that to SRECORD=S3

4) hit make

 

Resulting S19 file (long S0 record removed). Please note 32bit addresses:

 

S3200000C000CF3100C6055B134A800BFE4A8000FE0000C015C0190000000000009D
S3070000FFFEC0003B
S32500FE800010EFC6555B3F585B3F20F7FEC011FDC00F270E35ED31EC3169700434FB310326F9
S31900FE8020F2FEC013EC31270BED31180A30700434F920F10A0A
S70500000000FA

 

 

Resulting GLO file:

 

S320007FC000CF3100C6055B134A800BFE4A8000FE0000C015C0190000000000001E
S307007FFFFEC000BC
S325007F800010EFC6555B3F585B3F20F7FEC011FDC00F270E35ED31EC3169700434FB31032678
S319007F8020F2FEC013EC31270BED31180A30700434F920F10A89
S70500000000FA

Message Edited by kef on 2009-12-02 07:00 PM
0 Kudos

946 Views
eddv
Contributor I

Hi kef,thank for your help!

Your last message help me, but not how I need:

 

Maybe explain in other way:

 

 

I need to compile a file that is just a table, to put it on a SD card, somethink like this:

 

 

Source file:

    LLEN   32         ; OK, in LIST file, 32 bits is ok.

        ORG   $10000000     ; need 32bits for address
    DC.B    $55

 

 

 Now, I add this file at "Sources" tree of CW, and click in it with mouse right button, and select Compile item.

 

 

The compiled s19 I can get now:  (with extension ".asm.sx")

 

 

S05300..... (header...)
S104000055A6  <--- here I want 32bits address  It must be S
S9030000FC


BUT:


they put my $55 byte at $00 00, not at $10 00 00 00 how I need.
I need a s19 file like    this:

...
S3061000000055XX , where XX is the normal check byte
    AABBCCDD - 4 byte address 

 

 

 

Maybe I doing something wrong....

 

 

 

0 Kudos

946 Views
eddv
Contributor I

My really big problem is that I cant generate a S19 file with 4bytes of address, where the address is higher than $00FFFFFF, in other words, when the address is $01xxxxxx or higher, the compiler generate a s19 with address $00xxxxxx -it cut out the MSByte.

Any helps are welcome!

 

0 Kudos

946 Views
kef
Specialist I
I see now. Linker seems to not support addresses above 2^24, emits L1408 warnings. But maybe you could setup bbl file so that some addresses <0x1000000 will be moved above >=0x1000000.
0 Kudos

946 Views
eddv
Contributor I

The problem seems to be is in assembler, maybe, because to solve this I learned to use the ahc12.exe, using without CW "skins", and they not generate S19 file correct too.

 

 

When my source is:

    LLEN   32
        ORG   $10000000
    DC.L    TiLEIT_000  ; just some labels to tables

    DC.L    TiLEIT_001
    DC.L    TiLEIT_002

...

 

 The s19 IGNORE a MSByte and generate this:

 

S0100000483A5C56696E6353782E70726D39
S325000000000300000000010A0000010C0000010E000001100000011200000114000001160060
S325000000200001180000011A0000011C0000011E0000012000000122000001240000012600BA
S325000000400001280000012A0000012C0000012E00000130000001320000013400000136001A
S325000000600001380000013A0000013C00000140000001420000014400000146000001480070
... [00 00 00 60] Wrong addr, must be 10 00 00 00.

 

 

and, tryng a lot, I see this: when I star from 24 bits and after, the address goes to 32bits (one byte more)

 

    LLEN   32
        ORG   $FFFFE0
    DC.L    TiLEIT_000 

    DC.L    TiLEIT_001
    DC.L    TiLEIT_002

...

 

 

The s19 continues from correct address and goes to $10000000-

s19:

S0100000483A5C56696E6353782E70726D39
S32500FFFFE00300000000010A0000010C0000010E000001100000011200000114000001160082
S325010000000001180000011A0000011C0000011E0000012000000122000001240000012600D9
S325010000200001280000012A0000012C0000012E000001300000013200000134000001360039
...   correct addr [01 00 00 20]!

 

I need to force they to always 32bits, but how?

0 Kudos

946 Views
CompilerGuru
NXP Employee
NXP Employee

For the S12 the EABI defined in ELF the addresses to consist of a 24 bit offset and a 8 bit part for the address space. That's why you wont get a >24 bit address when using an ELF file.

 

What you could do:

- use the offset method with the burner as pueraroposed bu Kef (if the whole address range you have to cover fits in 24 bit)

- Use some other tool to create the srecords. Could be another assembler or also some simple script (I did emit srecords in tcl in the past (don't have that script anymore), in the end the srecord format is so simple that they can easely be generated in language. You could also create a binary file and use the burner to convert it to an srecord.

 

BTW: Why do you want to create those srecords for?

 

Daniel

 

0 Kudos

946 Views
eddv
Contributor I

Hi,

Ok, how can I create a binary file with CW tools? 

BTW: My project has a XDQ512 that contain the program, and a SD CARD with 2GB, that contain the datas, images, etc... 

I will use a s19 to read it by one program that I made, and sent it for uC, and uC write the datas on SD card. I intend to usea s19 because its ease to read, but could be a binary file too, or another way to get te data compiled.

Any suggestion are welcome!

Eduardo Vilela

 

0 Kudos