4.23 public_equ Pragma
The IAR public_equ
pragma defines a public assembler symbol with the specified
value.
Suggested Replacement
There is no equivalent MPLAB XC8 pragma, but a similar task can be performed by adding in-line assembly.
Use the MPLAB XC8 asm
statement add the label and equate it to a
value.
Caveats
None
Examples
Consider migrating IAR code such
as:
#pragma public_equ="mySymbol",0x1000
to MPLAB XC8 code
similar
to:asm(".global sym\r\nmySymbol = 0x1000");
Further Information
See the In-line Assembly section in the MPLAB XC8 C Compiler User's Guide for AVR MCUs for more information on adding in-line assembly.