Do you really need mplabx "that much"? For my part, I'm very happy with Code::blocks for edition/building, then I import the .hex file into mplab and debug the assembly. You're on linux, so maybe mplabx has this "hex import" function?


PS: the only change needed with sdcc is to change the "rel" extension to "o" in the advanced compiler settings. I should report this to codeblocks.

Le 27/08/2012 19:27, Antonio Todo Bom a écrit :
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 

# build
build: .build-post

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

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

# clean
clean: .clean-post

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

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

# clobber
clobber: .clobber-post

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

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

# all
all: .all-post

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

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

# help
help: .help-post

# 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

Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

sdcc-devel mailing list