I have an assembler project that compiles and links fine with MPLABX. Now I am trying to build it from the command line. Attempt to use the command line from MPLABX fails.
When I am calling:
C:\MiscStuffs>"C:\Program Files (x86)\Microchip\xc16\v1.11\bin"\xc16-ld.exe -p30F3012 --defsym __ICD2RAM=1 --report-mem -o Test4.elf -Map Test4.map Test4.o
I get:
C:\MiscStuffs\Test4.o(.text+0x12): In function __reset':
: undefined reference to
_PR2'
C:\MiscStuffs\Test4.o(.text+0x18): In function __reset':
: undefined reference to
_IEC0'
C:\MiscStuffs\Test4.o(.text+0x1c): In function __reset':
: undefined reference to
IC1CON'
....
And so on. When I remove -p30F3012
, it starts complaining that Memory region auxflash does not exist
. I tried putting wrong processor number. I get: Error: unknown processor 30F3712
. In other words, it understands what the current architecture is. But for some reason still cannot resolve addresses of the SFRs.
Should I specify any additional library? Is there any work around at all? If somebody managed to compile/link any assembler project with XC16, please, drop a line and the command line that you were using.