Hi Mr. Neider,

Yes, my problem is that I'm using MPLABX as IDE, since piklab doesn't supports 18F24K22 yet, neither pickit3. Otherwise I would prefer to use piklab.

So, to create a SDCC project at MPLABX is a little confusing. :/
It creates a Makefile, but not so fine.

Really, even I including <stdio.h> and <usart.h> that headers are not found, therefore I included
-I /usr/local/share/sdcc/non-free/include/pic16 -I /usr/local/share/sdcc/include/pic16
at command line.

Now, headers are loaded, but, at linking time, libraries are not found.

I think something is missing here (part of making report):

"/usr/local/bin/sdcc"  --debug-ralloc -Wl-c -Wl-m --use-non-free --verbose -V --pstack-model=small -I /usr/local/share/sdcc/include/pic16 -I /usr/local/share/sdcc/non-free/include/pic16 -mpic16 -p18f24k22 build/default/production/main.o build/default/production/board.o build/default/production/globalvars.o build/default/production/isr.o  -odist/default/production/impc2-sdcc.X.production.cof

Am I right?


I would be grateful if you could help me about, because I never tried using MPLABX and its Makefile.

Below all making report and after, the Makefile created by MPLABX.


-------------------------------

make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entrando no diretório `/home/sysop/games/impc2/impc2-sdcc.X'
make  -f nbproject/Makefile-default.mk dist/default/production/impc2-sdcc.X.production.hex
make[2]: Entrando no diretório `/home/sysop/games/impc2/impc2-sdcc.X'
mkdir -p dist/default/production 
"/usr/local/bin/sdcc"  --debug-ralloc -Wl-c -Wl-m --use-non-free --verbose -V --pstack-model=small -I /usr/local/share/sdcc/include/pic16 -I /usr/local/share/sdcc/non-free/include/pic16 -mpic16 -p18f24k22 build/default/production/main.o build/default/production/board.o build/default/production/globalvars.o build/default/production/isr.o  -odist/default/production/impc2-sdcc.X.production.cof 
Processor: 18f24k22
sdcc: Calling linker...
+ "/usr/local/bin/gplink" -I"/usr/local/bin/../share/sdcc/lib/pic16" -I"/usr/local/share/sdcc/lib/pic16" -I"/usr/local/bin/../share/sdcc/non-free/lib/pic16" -I"/usr/local/share/sdcc/non-free/lib/pic16"  -c -m  -w -r -o "dist/default/production/impc2-sdcc.X.production.cof"  "build/default/production/main.o" "build/default/production/board.o" "build/default/production/globalvars.o" "build/default/production/isr.o"  crt0i.o "libdev18f24k22.lib" "libsdcc.lib" 
message: using default linker script "/usr/local/share/gputils/lkr/18f24k22.lkr"
error: missing definition for symbol "_usart_open", required by "build/default/production/main.o"
+ "/usr/local/bin/gplink" -I"/usr/local/bin/../share/sdcc/lib/pic16" -I"/usr/local/share/sdcc/lib/pic16" -I"/usr/local/bin/../share/sdcc/non-free/lib/pic16" -I"/usr/local/share/sdcc/non-free/lib/pic16"  -c -m  -w -r -o "dist/default/production/impc2-sdcc.X.production.cof"  "build/default/production/main.o" "build/default/production/board.o" "build/default/production/globalvars.o" "build/default/production/isr.o"  crt0i.o "libdev18f24k22.lib" "libsdcc.lib"  returned errorcode 256
make[2]: ** [dist/default/production/impc2-sdcc.X.production.hex] Erro 1
make[2]: Saindo do diretório `/home/sysop/games/impc2/impc2-sdcc.X'
make[1]: ** [.build-conf] Erro 2
make[1]: Saindo do diretório `/home/sysop/games/impc2/impc2-sdcc.X'
make: ** [.build-impl] Erro 2



------------------------------------



# Environment 
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib


# build
build: .build-post

.build-pre:
# Add your pre 'build' code here...

.build-post: .build-impl
# Add your post 'build' code here...


# clean
clean: .clean-post

.clean-pre:
# Add your pre 'clean' code here...

.clean-post: .clean-impl
# Add your post 'clean' code here...


# clobber
clobber: .clobber-post

.clobber-pre:
# Add your pre 'clobber' code here...

.clobber-post: .clobber-impl
# Add your post 'clobber' code here...


# all
all: .all-post

.all-pre:
# Add your pre 'all' code here...

.all-post: .all-impl
# Add your post 'all' code here...


# help
help: .help-post

.help-pre:
# Add your pre 'help' code here...

.help-post: .help-impl
# Add your post 'help' code here...



# include project implementation makefile
include nbproject/Makefile-impl.mk

# include project make variables
include nbproject/Makefile-variables.mk