"@" symbol addressing

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

"@" symbol addressing

513 Views
JaseMachine
Contributor I

Hi, I'm having trouble finding any information on the use of the "@" symbol to provide a specific address for a variable as it is used in the provided header. Is there some reference material that describes its properties in detail?

Labels (1)
0 Kudos
3 Replies

331 Views
CrasyCat
Specialist III

Hello

 

  - Which CPU are you targeting (HC08, HC12, Coldfire, ..)
  - Which version of CodeWarrior are you using?

  As far as I know @ modifier to allocate a variable at a specific address is supported on HCS08 and Coldfire V1 only.

 

  It is documented in MCU_HCS08_Compiler.pdf. There is a section called "Global Variable Address Modifier (@address)".

 

 

CrasyCat

0 Kudos

331 Views
JaseMachine
Contributor I

Thank you! Sorry I didn't mention I was using the HC08 and MCF51QE with both v6 and v10 Codewarrior (migrating). I tried looking in the Coldfire compiler reference and returned no results, thanks for pointing me to the HC08 reference. 

0 Kudos

331 Views
FridgeFreezer
Senior Contributor I

It works fine for me in CW7.2 for CFV2 (MCF52259), as seen in Freescale's own bootloader example:

//***********************************************// User Entry vectors for bootloader#include "bootloader.h"extern asm void asm_startmeup(void);const uint8 _UserEntry[] @ USER_ENTRY_ADDRESS = {  0x4E,  0x71,  //asm NOP(0x4E71)  0x4E,  0xF9  //asm JMP(0x4EF9)           };void  (* const _UserEntry2[])()@(USER_ENTRY_ADDRESS+4)={  asm_startmeup,};

 

0 Kudos