section in asm files

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

section in asm files

665 Views
mark99
Contributor I

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!

Labels (1)
0 Kudos
6 Replies

452 Views
CrasyCat
Specialist III

Hello

 

  Which version of CodeWarrior are you using?

  To retrieve that info:
    - Start CodeWarrior
    - Select Help -> About Freescale CodeWarrior
    - Click on "Install Products"
    - CodeWarrior version used is displayed on top in the Installed Products dialog.

I did try on a project for HCS12XEP100 on V5.1 and it works fine.

 

What do you mean exactly with  keyword 'IRQ_VECTOR_ROM section' doesn't work anymore?

Are you getting an assembly message?

Are you getting a linker message?

Are you not seeing the section in the .map file?

 

 

CrasyCat

0 Kudos

452 Views
mark99
Contributor I

Thank you for your answer. And sorry for the late reply...troubles in other projects...

 

> Which version of CodeWarrior are you using?

I'm using CodeWarrior S12(X) Version 5.1, build 10221

 

 

> What do you mean exactly with  keyword

> 'IRQ_VECTOR_ROM section' doesn't work

> anymore?

 

If I use 'IRQ_VECTOR_ROM section' the asm file will not be linked. I can't find the asm file in the map file. With 'org     $FD00' it works.

 

 

> Are you getting an assembly message?

No.

 

 

> Are you getting a linker message?

No.

 

 

> Are you not seeing the section in the

> .map file?

No.

 

Thank you for any hints!

Mark

0 Kudos

452 Views
CrasyCat
Specialist III

Hello

 

THere seem to be a problem in your project.

 

You need to submit a service request  for that to get one of our support engineer looking into that
Click here to submit a service request..
 
Make sure to attach  a project reproducing the issue and installed product information to the SR.
To make sure you provide all necessary project information, you can use the Pack and Go wizard.
  - Start the IDE
  - Open the Project
  - Select Help -> "Pack and Go"
  - Follow the instruction on the screen. That will generate a zip file containing all necessary
    information (including the installed product information).

 

CrasyCat

0 Kudos

452 Views
mark99
Contributor I

Hello

 

I created a new project for HCS12X, added the asm file and the prm file. It's the same problem as in the other project. What happens if you build the test project attached?

 

If you'll find the sections 'BW_VERSIOM_ROM' and 'IRQ_VECTOR_ROM' there must be a problem with my CodeWarrior installation.

 

Thanks a lot for your help!

0 Kudos

452 Views
kef
Specialist I

Unused objects from Firmware.asm are optimized out by linker. Try adding this to your PRM file

 

ENTRIES

  Firmware.asm.o:*

 END

0 Kudos

452 Views
mark99
Contributor I

You're write, thank you!!

 

I'm wondering that the linker optimizes out code like that.

 

Thanks a lot!

Mark

0 Kudos