Pinguino Forum

Full Version: bootloader compile fails
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Cannot compile bootloader with v4 or v5 using `pinguino-boot` commit #dcd44fb8 (`pinguino-compilers` commit #62db5158)

Running on 4.13.7-1-ARCH

Have tried
* sdcc 3.6.0 (arch) and 3.5.5 (pinguino-compilers)
* gpasm 1.5.0 (arch) and 1.4.3 (pinguino-compilers)

Output v4:

Code:
$ make --makefile=Makefile.linux PROC=18f45k50 OSC=INTOSC COMP=SDCC SDCCDIR=/home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin/
***********************************************
\033[1mPinguino_Bootloader_v4.18.6_SDCC_18f45k50_INTOSC\033[0m
***********************************************
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//sdcpp -nostdinc -Wall -std=c99 -DVENDORID=0x04D8 -DPRODUCTID=0xFEAA -DCHIP=18f45k50 -DAPPSTART=0x0C00 -DSTRING=1 -DSPEED=0 -DLOW_SPEED=1 -DHIGH_SPEED=0 -DVOLTAGE=0 -DCRYSTAL=INTOSC -DMAJOR_VERSION=4 -DMINOR_VERSION=18 -DBOOT_USE_DEBUG=0 -DBOOT_USE_LOWPOWER=0 -DBOOT_USE_LARGE_EP=0 -DBOOT_USE_HID=0 -DBOOT_USE_UART=0 -DBOOT_USE_CDC=0 -DBOOT_USE_BULK=1 -D__18f45k50 -D__SDCC_PIC18F45K50 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=3_5_5 -D__SDCC_VERSION_MAJOR=3 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=5 -D__SDCC_REVISION=9410 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/non-free/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/non-free/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include  src/usb.c 
src/usb.c:496: warning 196: pointer target lost const qualifier
src/usb.c:165: warning 18: Initializer different levels of indirections
from type 'const-unsigned-char code* const fixed'
  to type 'const-unsigned-char generic* const code'
src/usb.c:165: warning 18: Initializer different levels of indirections
from type 'const-unsigned-char code* const fixed'
  to type 'const-unsigned-char generic* const code'
src/usb.c:165: warning 18: Initializer different levels of indirections
from type 'const-unsigned-char code* const fixed'
  to type 'const-unsigned-char generic* const code'
src/usb.c:165: warning 18: Initializer different levels of indirections
from type 'const-unsigned-char code* const fixed'
  to type 'const-unsigned-char generic* const code'
src/usb.c:165: error 4: 'fopen' failed on file 'obj/usb.asm'
make: *** [Makefile.linux:310: obj/usb.o] Error 1


output v5:


Code:
$ make --makefile=Makefile.linux PROC=18f45k50 OSC=INTOSC COMP=SDCC SDCCDIR=/home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin/
***********************************************
\033[1mPinguino_Bootloader_v5.0.0_SDCC_18f45k50_INTOSC\033[0m
***********************************************
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//sdcpp -nostdinc -Wall -std=c99 -DVENDORID=0x04D8 -DPRODUCTID=0xFEAA -DCHIP=18f45k50 -DAPPSTART=0x0C00 -DSTRING=1 -DSPEED=0 -DLOW_SPEED=1 -DHIGH_SPEED=0 -DVOLTAGE=0 -DCRYSTAL=INTOSC -DMAJOR_VERSION=5 -DMINOR_VERSION=0 -DBOOT_USE_DEBUG=0 -DBOOT_USE_LOWPOWER=0 -DBOOT_USE_LARGE_EP=1 -DBOOT_USE_HID=0 -DBOOT_USE_UART=0 -DBOOT_USE_CDC=0 -DBOOT_USE_BULK=1 -D__18f45k50 -D__SDCC_PIC18F45K50 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=3_5_5 -D__SDCC_VERSION_MAJOR=3 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=5 -D__SDCC_REVISION=9410 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/non-free/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/non-free/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include  src/usb.c 
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//gpasm -w0 -D__STACK_MODEL_SMALL -o obj/usb.o -c obj/usb.asm
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//sdcpp -nostdinc -Wall -std=c99 -DVENDORID=0x04D8 -DPRODUCTID=0xFEAA -DCHIP=18f45k50 -DAPPSTART=0x0C00 -DSTRING=1 -DSPEED=0 -DLOW_SPEED=1 -DHIGH_SPEED=0 -DVOLTAGE=0 -DCRYSTAL=INTOSC -DMAJOR_VERSION=5 -DMINOR_VERSION=0 -DBOOT_USE_DEBUG=0 -DBOOT_USE_LOWPOWER=0 -DBOOT_USE_LARGE_EP=1 -DBOOT_USE_HID=0 -DBOOT_USE_UART=0 -DBOOT_USE_CDC=0 -DBOOT_USE_BULK=1 -D__18f45k50 -D__SDCC_PIC18F45K50 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=3_5_5 -D__SDCC_VERSION_MAJOR=3 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=5 -D__SDCC_REVISION=9410 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/non-free/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/non-free/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include  src/vectors.c 
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//gpasm -w0 -D__STACK_MODEL_SMALL -o obj/vectors.o -c obj/vectors.asm
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//sdcpp -nostdinc -Wall -std=c99 -DVENDORID=0x04D8 -DPRODUCTID=0xFEAA -DCHIP=18f45k50 -DAPPSTART=0x0C00 -DSTRING=1 -DSPEED=0 -DLOW_SPEED=1 -DHIGH_SPEED=0 -DVOLTAGE=0 -DCRYSTAL=INTOSC -DMAJOR_VERSION=5 -DMINOR_VERSION=0 -DBOOT_USE_DEBUG=0 -DBOOT_USE_LOWPOWER=0 -DBOOT_USE_LARGE_EP=1 -DBOOT_USE_HID=0 -DBOOT_USE_UART=0 -DBOOT_USE_CDC=0 -DBOOT_USE_BULK=1 -D__18f45k50 -D__SDCC_PIC18F45K50 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=3_5_5 -D__SDCC_VERSION_MAJOR=3 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=5 -D__SDCC_REVISION=9410 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/non-free/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//../share/sdcc/non-free/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include  src/main.c 
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//gpasm -w0 -D__STACK_MODEL_SMALL -o obj/main.o -c obj/main.asm
obj/main.asm:17:Error[181]   CONFIG Directive Error: Setting not found for 18f45k50 processor: "nPWRTEN"
obj/main.asm:20:Error[181]   CONFIG Directive Error: Setting not found for 18f45k50 processor: "nLPBOR"
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin//gpasm -w0 -D__STACK_MODEL_SMALL -o obj/main.o -c obj/main.asm returned errorcode 256
make: *** [Makefile.linux:326: obj/main.o] Error 1
Hi,
Version 5 is only for boards with 2 buttons (Pinguino Torda).
Version 4 is the right one for your Pinguino 45K50.

I've updated the Pinguino bootloader source code on github to v4.18.7.
Please, update your copy and tell me if it's better.

The compile command in your case should be : 
make --makefile=Makefile.linux COMP=SDCC PROC=18F45K50 OSC=INTOSC


Regards,
Regis
cool, thanks. I now get a similar error for v4 as I did for v5. Something changed at least. That's good Smile

I'm adding the "SDCCDIR" variable to my makefile args. Is that enough for everything that needs to be accessed? I don't have anything in /opt/ etc.....

Code:
$ make --makefile=Makefile.linux COMP=SDCC PROC=18F45K50 OSC=INTOSC SDCCDIR=/home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin
***********************************************
\033[1mPinguino_Bootloader_v4.18.7_SDCC_18f45k50_INTOSC\033[0m
***********************************************
+ /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin/sdcpp -nostdinc -Wall -std=c99 -DVENDORID=0x04D8 -DPRODUCTID=0xFEAA -DCHIP=18f45k50 -DAPPSTART=0x0C00 -DSTRING=1 -DSPEED=0 -DLOW_SPEED=1 -DHIGH_SPEED=0 -DVOLTAGE=0 -DCRYSTAL=INTOSC -DMAJOR_VERSION=4 -DMINOR_VERSION=18 -DDEVPT_VERSION=7 -DBOOT_USE_DEBUG=0 -DBOOT_USE_LOWPOWER=0 -DBOOT_USE_LARGE_EP=1 -DBOOT_USE_HID=0 -DBOOT_USE_UART=0 -DBOOT_USE_CDC=0 -DBOOT_USE_BULK=1 -D__18f45k50 -D__SDCC_PIC18F45K50 -D__STACK_MODEL_SMALL -obj-ext=.o -D__SDCC_USE_NON_FREE -D__SDCC_ALL_CALLEE_SAVES -D__SDCC=3_5_5 -D__SDCC_VERSION_MAJOR=3 -D__SDCC_VERSION_MINOR=5 -D__SDCC_VERSION_PATCH=5 -D__SDCC_REVISION=9410 -D__SDCC_pic16 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin/../share/sdcc/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin/../share/sdcc/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/include -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin/../share/sdcc/non-free/include/pic16 -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include/pic16 -isystem /home/lash/data/src/ext/pinguino/pinguino-compilers/linux64/p8/bin/../share/sdcc/non-free/include -isystem /dvpt/pinguino/git-copy/pinguino-compilers/linux64/p8/share/sdcc/non-free/include  src/usb.c 
src/usb.c:162: error 4: 'fopen' failed on file 'obj/usb.asm'
make: *** [Makefile.linux:349: obj/usb.o] Error 1
I'll check it out but you know that your PIC18F45K50 (if purchased from the Pinguino Shop) comes with a pre-installed USB bootloader ? You don't have to compile and burn it.
Ah, also the version you assemble and solder yourself?

In any case, I'd like to be able to burn baby burn.
(23-10-2017, 09:51 AM)Ah, also the version you assemble and solder yourself? Wrote: [ -> ]Yes.