PropGCC Build on RaspberryPi
SRLM
Posts: 5,045
Hi all,
I'm getting the following error when I build. Any idea what is wrong?
I'm getting the following error when I build. Any idea what is wrong?
... ... ... src/loader.c: In function WriteFileToSDCard: src/loader.c:1091:9: warning: format %ld expects argument of type long int, but argument 2 has type size_t [-Wformat] src/loader.c:1098:5: warning: format %ld expects argument of type long int, but argument 2 has type size_t [-Wformat] ../../build/loader/obj/linux/loader.o ../../build/loader/obj/linux/lmm-image.o src/xmm-image.c: In function BuildExternalImage: src/xmm-image.c:57:18: warning: variable initSectionTable set but not used [-Wunused-but-set-variable] ../../build/loader/obj/linux/xmm-image.o ../../build/loader/obj/linux/pex-image.o ../../build/loader/obj/linux/loadelf.o ../../build/loader/obj/linux/packet.o ../../build/loader/obj/linux/PLoadLib.o ../../build/loader/obj/linux/p1image.o ../../build/loader/obj/linux/p2image.o mkdir -p ../../build/loader/obj/propeller propeller-elf-gcc ../../build/loader/obj/propeller/p2loader.o cc ../../build/loader/obj/propeller/p2loader.bin bin2c ../../build/loader/obj/linux/p2loader.c ../../build/loader/obj/linux/p2loader.o propeller-elf-gcc ../../build/loader/obj/propeller/p2booter.o cc ../../build/loader/obj/propeller/p2booter.bin bin2c ../../build/loader/obj/linux/p2booter.c ../../build/loader/obj/linux/p2booter.o propeller-elf-gcc ../../build/loader/obj/propeller/p2flasher.o cc ../../build/loader/obj/propeller/p2flasher.bin bin2c ../../build/loader/obj/linux/p2flasher.c ../../build/loader/obj/linux/p2flasher.o ../../build/loader/obj/linux/config.o ../../build/loader/obj/linux/expr.o src/system.c: In function xbAddProgramPath: src/system.c:133:5: warning: implicit declaration of function readlink [-Wimplicit-function-declaration] ../../build/loader/obj/linux/system.o ../../build/loader/obj/linux/port.o /opt/parallax/bin/bstc.linux: 1: /opt/parallax/bin/bstc.linux: Syntax error: "(" unexpected make: *** [../../build/loader/obj/linux/serial_helper.binary] Error 2 rm ../../build/loader/obj/propeller/p2loader.bin ../../build/loader/obj/propeller/p2flasher.o ../../build/loader/obj/linux/p2flasher.c ../../build/loader/obj/propeller/p2flasher.bin ../../build/loader/obj/propeller/p2booter.o ../../build/loader/obj/linux/p2booter.c ../../build/loader/obj/propeller/p2booter.bin ../../build/loader/obj/propeller/p2loader.o ../../build/loader/obj/linux/p2loader.c make: Leaving directory `/home/pi/propgcc/propgcc/loader' loader make failed real 738m43.857s user 496m14.640s sys 48m58.480s
Comments
OpenSpin has what we need now. We need to specify -p to enable the preprocessor though.
I think Heater was doing this by commenting bstc.linux commands and adding .dat files from another build.
I did manage to build the loader on the Pi as Jazzed says.
First do a build on your PC.
Hack the loaders Make file on the Pi so that it does not complain about the lack of bst.
Copy the dat and bin files over to the pi, you will have to find which directories they belong in as I've forgotten.
By the time you get to that error you should have propgcc binaries in /opt/parallax so you don't need to run rebuild.sh again.
You can build the loader just by doing:
$ cd loader
$ source setenv.sh
$ make
Trick is I have the propgcc directory on my PC and mounted as an NFS share on the Pi. Much faster than using the SD card.
I now have propellergcc_v1_0_0_2075 installed in /opt:)
Now to try and remember how I built the loader.
Don't forget when the rebuild.sh script bombs out it still has not built gdb, spinsim and gdbstub if you need them. I never bothered.
Getting the loader to build on the Pi is a nice little puzzle.
It would be nice if the loader Makefile would create all the *.binary and *.dat files and leave them somewhere where you can find them. But no, it deletes at least flash_loader.binary before it's done.
So what I did was:
1) Modify the Makefile on the PC build so that it copies these files somewhere nice after creation with bstc. Basically go through the Make file and add a command to copy the output file on every use of $(BSTC). For example:
2) Move all those dat and binary files to the Pi.
3) On the Pi replace /opt/parallax/bin/bstc.linux with a script of the same name that does nothing.
4) Now run make on the pi and copy any files it complains about missing to wherever it says they should be and run make again. Eventually it will complete.
5) Run "make install"
5) Copy all the *.dat files to /opt/parallax/propeller_load
This could all be streamlined but as the guys are going to do away with bst soon I'm not bothering.
Next up is to merge my old Raspi UART changes into the loader so that we can connect a Prop directly to the GPIO to program it. No USB/Serial adapter required.
It should "just work" with the right parameters... I've been too busy to try it with the build.
dgately
Yes, openSpin works just fine on the Pi.
Is it OK to post builds of SimpleIDE for the Pi to the net now? There are Pi users who have expressed an interest.
I have not tried rebuilding it on the Pi for an age, what's the current best branch?
Heater I've looked at the Linux build briefly this morning.
There is more to do before it will be easy to build and distribute.
Heater, do you think RPi could be forced to use a RAM disk instead of SDCARD for file-system?
But why?
Because it's unbearably slow otherwise. Just thinking out loud mostly.