8.4 Messages 1500 Thru 1999

(1500) invalid token in #if expression (Preprocessor)

There is a malformed preprocessor expression.
#define LABEL
#define TEST 0
#if (LABEL == TEST) // oops--LABEL has no replacement text

(1504) the PIC18 extended instruction set was enabled but is not supported by this compiler (Parser)

The MPLAB XC8 compiler does not support generation of code using the PIC18 extended instruction set. The extended instruction set configuration bit must always be disabled.
#pragma config XINST=ON  // oops--this must be disabled at all times

(1505) interrupts not supported by this device (Code Generator)

You have attempted to define an interrupt function for a device that does not support interrupts.
void interrupt myIsr(void)  // oops--nothing will trigger this
{ ... }

(1506) multiple interrupt functions (* and *) defined at interrupt level * (Code Generator)

More than one interrupt function has been defined for the same priority.
void interrupt low_priority
isr(void)
{ ... }
void interrupt low_priority	// oops--you can have two ISRs
loisr(void)				// with the same priority
{ ... }

(1507) asmopt state popped when there was no pushed state (Assembler)

The state of the assembler optimizers was popped in assembly code but there was no corresponding push.
movlw  20h
movwf  LATB
opt asmopt_pop; oops--there was never a state pushed

(1508) specifier “__ram” ignored (Parser)

This pointer-target specifier cannot be used with an ordinary variable and it will be ignored. Confirm that this definition was not meant to indicate a pointer type.
__ram int ip;   // oops -- was this meant to be a pointer?

(1509) specifier “__rom” ignored (Parser)

This pointer-target specifier cannot be used with an ordinary variable and it will be ignored. Confirm that this definition was not meant to indicate a pointer type.
const __rom int cip;   // oops -- was this meant to be a pointer?

(1510) non-reentrant function “*” appears in multiple call graphs and has been duplicated by the compiler (Code Generator)

This message indicates that the generated output for a function has been duplicated since it has been called from both main-line and interrupt code. It does not indicate a potential code failure. If you do not want function output duplicated, consider using the hybrid stack model (if possible), or restructure your source code.

(1511) stable/invariant mode optimizations no longer implemented; option will be ignored 
 (Driver)

This option is no longer available and has been ignored.

(1512) stable/invariant mode optimizations no longer implemented; specifier will be ignored (Code Generator)

This specifier is no longer available and has been ignored.

(1513) target “*” of pointer “*” not in the memory space specified by * (Code Generator)

The pointer assigned an address by this statement was defined using a pointer-target specifier. This assignment might be assigning addresses to the pointer that conflict with that memory space specifier.
__rom int * ip;
int foobar;
ip = &foobar;  // oops -- foobar is in data memory, not program memory

(1514) “__ram” and “__rom” specifiers are mutually exclusive (Parser)

Use of both the __ram and __rom pointer-target specifiers with the same pointer does not make sense. If a pointer should be able to represent targets in any memory space, do not use either of these specifiers.
// oops -- you can’t limit ip to only point to objects in ram and
// also only point to objects in rom
__ram __rom int * ip;

(1515) disabling OCG optimizations for this device is not permitted (Driver)

Due to memory limits, projects targeting some devices cannot be built. Ensure that the OCG category of optimization is enabled.

(1516) compiler does not support 64-bit integers on the target architecture

Due to memory restrictions, the current device cannot support 64-bit integers and a smaller integer will be used instead. Choose a type smaller than long long to suppress this warning.
long long int result;  // oops - this will not be 64-bits wide

(1517) peripheral library support only available for C90 (Driver)

The legacy peripheral library was build for the C90 standard and cannot reliably be used for other C standards.

(1518) * function call made with an incomplete prototype (*) (Code Generator)

A function has been called with the compiler not having seen a complete prototype for that function. Check for an empty parameter list in the declaration.
void foo();  // oops -- how will this call be encoded?
int main(void)
{
    foo();
}

(1519) note-psects will ignore optimisation-related psect flags (Assembler)

Psects using the note psect flag cannot be optimized and any additional psect flags which request optimization will be ignored. Psects using the note flag typically contain debug information not related to your project code.

(1520) malformed mapfile while generating summary: no space at position * (Driver)

While printing the memory summary after compilation, the psect information read in from the map file was malformed.

(1521) internal error encountered creating DWARF information; contact Microchip support with details (Cromwell)

This is an internal compiler error. Contact Microchip Technical Support with details.

(1522) RAM access bit operand not specified, assuming * (Assembler)

The assembly instruction is missing the RAM access operand and the assembler has made the stated assumption as to the instruction's destination location. Always use the RAM access bit to ensure the intended operation of your code is clearly stated.
	movwf input   ; oops - use for example movwf input,b to indicate banked access, etc

(1523) debug_source state popped when there was no pushed state (Assembler)

The state of the debug_source setting was popped but no previous value had been pushed.
DEBUG_SOURCE asm
    MY_UNLOCK_MACRO
DEBUG_SOURCE pop   ; oops - there was no prior push of the debug source state

(1524) unrecognized heap size "*" (Driver)

The argument to the -mheap option was not a decimal number or valid keyword (for example, auto).
xc8-cc -mcpu=18f4520 -mheap=0x100 main.c

Oops, did you mean to use -mheap=256 ?

(1525) selected language standard or device does not support a memory heap (Driver)

A heap has been specified on a device that does not support dynamic memory allocation, or the C90 language specification was selected with this option. Dynamic memory allocation is only supported with PIC18 or Enhanced Mid-range devices, and only when building with the C99 language standard.
xc8-cc -mcpu=12f509 -mheap=0x100 main.c

Oops, that device does not support dynamic memory allocation.

(1526) total software stack(s) and memory heap size specified (* bytes) is greater than available (* bytes) (Driver)

The size of the memory requested for the software stack and the heap exceeds the amount of data memory available on the selected device.
xc8-cc -mcpu=18f4520 main.c -mheap=1000 -mstack=reentrant:4000

Oops, that device does not implement 5000 bytes of data memory.

(1527) auto-sized software stack(s) and/or memory heap will share in * byte(s) of memory (Driver)

After allocation of static objects, the compiled stack, and any software stacks and/or heap that have a fixed size requested in the -mstack/-mheap options, any free memory is then divided up for those software stacks and/or heap that have used an auto size specification. If the amount of memory available (as indicated in the message) is very small, this warning indicates that use of the software stack/heap features might be restricted.

(1528) no memory can be allocated to software stack(s) and/or memory heap (Driver)

The compiler was unable to allocate memory to any of the software stacks and/or heap.

(1529) the -msmart-io-format option has no effect with the currently selected language standard and will be ignored (Driver)

The -msmart-io-format option can only be specified when using the C99 language standard, which has full support for smart IO functions.
xc8-cc -mcpu=18f4520 main.c -std=c90 -msmart-io-format=fmt="%d%c"

Oops, you cannot use the -msmart-io-format with the C90 language standard.

(1530) insufficient memory available to allocate to * (Driver)

The compiler was unable to allocate memory to the specified software stack/heap.

(1600) "*" argument : * (Hexmate)

There is an error in an argument to a Hexmate option. The message indicates the offending argument and the problem.

(1601) "*" argument : * (Hexmate)

There is a warning in an argument to a Hexmate option. The message indicates the offending argument and the potential problem.

(1602) contents of the hex-data (*) do not conform with the chosen output type (*) (Hexmate)

There is data to be written to the HEX file that is not valid for the particular HEX file format chosen, for example, data might be at an address too large for the supported format. Consider a different output format or check the source of the offending data.

(1604) Storage Area Flash has been enabled by the configuration bits; ensure this memory is not used for program code (Assembler)

This advisory indicates that a configuration bit setting in your code has enabled the storage area flash memory on this device. Storage area flash memory should not be used by any other part of the program, so it will need to be reserved using an option (e.g. -mreserve). Check your device data sheet for more information.
#pragma config SAFEN=ON  ;make sure ordinary program code does not use this space

(1605) Block Table Read Protection has been enabled by the configuration bits; this may affect variable initialization and reading constants in program memory (Assembler)

This advisory indicates that a configuration bit setting in your code has enabled the block table read protection feature. This feature can alter the way that program memory is read, possibly resulting in code failing. Check your device data sheet for more information.
#pragma config EBTRB=ON  ;remember this might affect reading program memory

(1606) w[no-]error option has been passed an invalid or missing message identifier (Hexmate)

The --werror option is missing a message number after the = character or has been passed something that is not a number.
hexmate --werror=off -format=inhx32 main.hex -ofinal.hex
Oops. You can't use off as a message number.