Hey all. I have a problem that is driving me nuts. I'm building MQX 3.6 on a CF52256 using CW 10.
My problem is this: I want to get access to a couple of Linker-defined variables in my 'user_config.h' so I can redefine the FlashX available size in terms of those values. Below is the simple code I'm trying to add:
extern unsigned char __FLASHX_START_ADDR; // defined in .lcf file
extern unsigned char __FLASHX_END_ADDR; // defined in .lcf file
#define FLASHX_START_ADDR ((uint_32)__FLASHX_START_ADDR)
#define FLASHX_END_ADDR ((uint_32)__FLASHX_END_ADDR)
// this is the end result I'm trying to achieve
#define BSPCFG_FLASHX_SIZE ( FLASHX_END_ADDR - FLASHX_START_ADDR )
The problem I'm having is after the PSP project has compiled the code, the Assembler pukes on those two lines at the top... the 'extern' declarations, with the following error:
Undefined macro or opcode: extern
That makes no sense to me whatsoever, since the BSP project will compile and assemble just fine, and it certainly uses this 'user_config.h' file all over the place. I've compared the Assembler settings between the two projects (BSP and PSP) and find no differences.
Anybody know what is going on? Please help!