Markus Forrer

section in asm files

Discussion created by Markus Forrer on Jan 9, 2012
Latest reply on Jan 19, 2012 by Markus Forrer

In the last project for HCS12 I used the following mechanism to build firmware with and without bootware:

 

prm:

---

 

SEGMENTS

//*

    ROM_FD00        = NO_INIT     DATA_NEAR IBCC_NEAR   0xFD00 TO   0xFDFF;     // bootware identification string

    ROM_FFFA        = NO_INIT     DATA_NEAR IBCC_NEAR   0xFFFA TO   0xFFFF;     // interrupt vectors

/*/

    ROM_FD00        = READ_ONLY   DATA_NEAR IBCC_NEAR   0xFD00 TO   0xFDFF;     // for use without bootware

    ROM_FFFA        = READ_ONLY   DATA_NEAR IBCC_NEAR   0xFFFA TO   0xFFFF;     // for use without bootware

//*/

END

 

PLACEMENT

    BW_VERSIOM_ROM              INTO ROM_FD00;

    IRQ_VECTOR_ROM              INTO ROM_FFFA;

END

 

 

asm:

---

 

BootBlockSize:  equ     $2000

 

; bootware version string location

 

BW_VERSIOM_ROM  section

 

; interrupt jump table for firmware without bootware

JCOPFail        jmp [ COPFail       - BootBlockSize, pcr ]

JClockFail:     jmp [ ClockFail     - BootBlockSize, pcr ]

JReset:         jmp [ Reset         - BootBlockSize, pcr ]

  

; interrupt table for firmware without bootware

IRQ_VECTOR_ROM  section

COPFail:        dc.w    JCOPFail

ClockFail:      dc.w    JClockFail

Reset:          dc.w    JReset

 

It seems the keyword 'IRQ_VECTOR_ROM section' doesn't work anymore with HCS12X. I have to use 'org $FFFA' instead.

 

Any idea why?

 

Thanks a lot!

Outcomes