Pic 24FJ128GB202 no compile to hex
Posted: Mon Jan 25, 2021 12:07 am
Hi,
Its the first time i have tried to use this chip. (24FJ128GB202), usually i have used the 24HJ128GP502.
I created an empty project and attempted to build to Hex file.
I get a compile error as below
Obviously its connected to the 'AD1PCFG'
//------------------------------------------
int main()
{
AD1PCFG = 0xffff;
mainendloop: goto mainendloop;
return 0;
}
//------------------------------------------
NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Launching the compiler...
C:\Program Files (x86)\Flowcode\Compilers\pic16\batchfiles\pic16_C30_comp.bat "no build project" "C:\Users\andos\Documents\Flowcode\" "24FJ128GB202"
C:\Users\andos\Documents\Flowcode>xc16-gcc -c -mcpu="24FJ128GB202" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\Flowcode\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\Flowcode\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "no build project".c -o "no build project".o
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
no build project.c: In function 'main':
no build project.c:72:1: error: 'AD1PCFG' undeclared (first use in this function)
no build project.c:72:1: note: each undeclared identifier is reported only once for each function it appears in
Error returned from [xc16-gcc.exe]
C:\Program Files (x86)\Flowcode\Compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 0x1
Autoclose turned off
FINISHED
Thanks in advance
Andy
Its the first time i have tried to use this chip. (24FJ128GB202), usually i have used the 24HJ128GP502.
I created an empty project and attempted to build to Hex file.
I get a compile error as below
Obviously its connected to the 'AD1PCFG'
//------------------------------------------
int main()
{
AD1PCFG = 0xffff;
mainendloop: goto mainendloop;
return 0;
}
//------------------------------------------
NOT FOR COMMERCIAL USE
https://www.flowcode.co.uk
Launching the compiler...
C:\Program Files (x86)\Flowcode\Compilers\pic16\batchfiles\pic16_C30_comp.bat "no build project" "C:\Users\andos\Documents\Flowcode\" "24FJ128GB202"
C:\Users\andos\Documents\Flowcode>xc16-gcc -c -mcpu="24FJ128GB202" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\Flowcode\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\Flowcode\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "no build project".c -o "no build project".o
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
no build project.c: In function 'main':
no build project.c:72:1: error: 'AD1PCFG' undeclared (first use in this function)
no build project.c:72:1: note: each undeclared identifier is reported only once for each function it appears in
Error returned from [xc16-gcc.exe]
C:\Program Files (x86)\Flowcode\Compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 0x1
Autoclose turned off
FINISHED
Thanks in advance
Andy