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?
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
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.
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,};