Hi
I'm using PIC24F for the first time and so I've installed xc16 (v1.31) and am trying to get going with my old code that was writen for xc8 (PIC18F). I've now spent hours on this and am getting nowhere fast. I'd really appreciate some pointers. I'm sure I'm treading old ground.
This is the first warning I'm getting which I believe shows that the xc16 libs haven't been read correctly. On the previous line I have the below, which is actually highlighted before I build saying it "Cannot find include file", but it doesn't error or warn in the build log
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Robin/MPLABXProjects/motorcontroller v3.X'
make -f nbproject/Makefile-default.mk dist/default/production/motorcontroller_v3.X.production.hex
make[2]: Entering directory 'C:/Users/Robin/MPLABXProjects/motorcontroller v3.X'
"C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe" main.c -o build/default/production/main.o -c -mcpu=24FV32KA302 -MMD -MF "build/default/production/main.o.d" -g -omf=elf -legacy-libc -O0 -msmart-io=1 -Wall -msfr-warn=off
lcd.h: In function 'Lcd_Cmd':
In file included from main.c:69:0:
lcd.h:30:6: warning: implicit declaration of function '__delay_ms'
However I've found __delay_ms is declared in ...xc16\v1.31\support\generic\h\libpic30.h, with the comment: "They depend on a user-supplied definition of FCY."
So I've started main.c with
But the problem persists. What should I check next?
Robin
I'm using PIC24F for the first time and so I've installed xc16 (v1.31) and am trying to get going with my old code that was writen for xc8 (PIC18F). I've now spent hours on this and am getting nowhere fast. I'd really appreciate some pointers. I'm sure I'm treading old ground.
This is the first warning I'm getting which I believe shows that the xc16 libs haven't been read correctly. On the previous line I have the below, which is actually highlighted before I build saying it "Cannot find include file", but it doesn't error or warn in the build log
Code:
#include <xc.h>
make[1]: Entering directory 'C:/Users/Robin/MPLABXProjects/motorcontroller v3.X'
make -f nbproject/Makefile-default.mk dist/default/production/motorcontroller_v3.X.production.hex
make[2]: Entering directory 'C:/Users/Robin/MPLABXProjects/motorcontroller v3.X'
"C:\Program Files (x86)\Microchip\xc16\v1.31\bin\xc16-gcc.exe" main.c -o build/default/production/main.o -c -mcpu=24FV32KA302 -MMD -MF "build/default/production/main.o.d" -g -omf=elf -legacy-libc -O0 -msmart-io=1 -Wall -msfr-warn=off
lcd.h: In function 'Lcd_Cmd':
In file included from main.c:69:0:
lcd.h:30:6: warning: implicit declaration of function '__delay_ms'
However I've found __delay_ms is declared in ...xc16\v1.31\support\generic\h\libpic30.h, with the comment: "They depend on a user-supplied definition of FCY."
So I've started main.c with
Code:
#define FCY 16000000UL
Robin
Last edited: