PIC24FJ256GA702 component not working query
Posted: Thu Jul 02, 2020 1:15 pm
Hello, I need help with this component. My previous projects have been 8 bit PICs so before starting work on a 16 bit program I selected the above and went to do a simple test to set the xtal osc and turn on 1 led. Surprisingly it failed to compile to hex in FC8 (tried FC7 but it doesn't have this component).
I opened a new project and with only "begin end" tried again with the same error as pasted below yet components either side of this family work fine.
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat "Flowcode1" "D:\temp\PIC24FJ256GA702\" "24FJ256GA702"
D:\temp\PIC24FJ256GA702>xc16-gcc -c -mcpu="24FJ256GA702" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "Flowcode1".c -o "Flowcode1".o
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
Flowcode1.c: In function 'main':
Flowcode1.c:81:1: error: 'ANSELA' undeclared (first use in this function)
Flowcode1.c:81:1: note: each undeclared identifier is reported only once for each function it appears in
Flowcode1.c:82:1: error: 'ANSELB' undeclared (first use in this function)
Error returned from [xc16-gcc.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1
I tried the others in this family PIC24FJ256GA704 & 705 and all fail. I am out of my depth but tried modifying the component to align with others that compile around the ANSEL statements
<start code='int main()\n{\n' />
<end code='\tmainendloop: goto mainendloop;\n\treturn 0;\n}\n\n' />
<init code='ANSELA = 0x0;\nANSELB = 0x0;\n' />
CHANGED to <init code='nANSELA = 0;\nANSELB = 0;\n\n' />
but same error msg so restored original
Is this component working correctly or am I doing something wrong (compiler)?
regards
Paul
I opened a new project and with only "begin end" tried again with the same error as pasted below yet components either side of this family work fine.
https://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat "Flowcode1" "D:\temp\PIC24FJ256GA702\" "24FJ256GA702"
D:\temp\PIC24FJ256GA702>xc16-gcc -c -mcpu="24FJ256GA702" -omf=coff -funsigned-char -fno-short-double -Os -I"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic16\BATCHF~1\..\support\h" -I"C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic16\BATCHF~1\" -std=gnu99 "Flowcode1".c -o "Flowcode1".o
Options have been disabled due to restricted license
Visit http://www.microchip.com/ to purchase a new key.
Flowcode1.c: In function 'main':
Flowcode1.c:81:1: error: 'ANSELA' undeclared (first use in this function)
Flowcode1.c:81:1: note: each undeclared identifier is reported only once for each function it appears in
Flowcode1.c:82:1: error: 'ANSELB' undeclared (first use in this function)
Error returned from [xc16-gcc.exe]
C:\Program Files (x86)\Flowcode\Common\Compilers\pic16\batchfiles\pic16_C30_comp.bat reported error code 1
I tried the others in this family PIC24FJ256GA704 & 705 and all fail. I am out of my depth but tried modifying the component to align with others that compile around the ANSEL statements
<start code='int main()\n{\n' />
<end code='\tmainendloop: goto mainendloop;\n\treturn 0;\n}\n\n' />
<init code='ANSELA = 0x0;\nANSELB = 0x0;\n' />
CHANGED to <init code='nANSELA = 0;\nANSELB = 0;\n\n' />
but same error msg so restored original
Is this component working correctly or am I doing something wrong (compiler)?
regards
Paul