Cross compiling propeller-load, success and problems.
Heater.
Posts: 21,230
I have been cross-compiling the loader from proogcc for targets such as the MIPS based router boxed running OpenWRT, the Raspberry Pi and Emscripten (I'd really like to see a Chrome App programming a Propeller!).
So far these compiles work although I have not tested the resulting loaders yet.
Here is my procedure:
There are couple of issues with this:
1) The Makefile contains "CC=gcc" which I have to remove in order to get the cross-compiler used.
2) Without some modifications the build fails with:
Of course, the ./bin/linux/bin2c has just been built for the MIPS and so does not run.
Currently I get around that by building for x86, copying bin2c to /usr/bin, and removing the $BINDIR from in front of the bin2C commands in the Makefile. Or some variant of that.
No urgency but it would be nice if this worked out of the box.
So far these compiles work although I have not tested the resulting loaders yet.
Here is my procedure:
$ export PATH=$PATH:/home/heater/openwrt/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin $ OS=linux CC=mipsel-openwrt-linux-gcc make
There are couple of issues with this:
1) The Makefile contains "CC=gcc" which I have to remove in order to get the cross-compiler used.
2) Without some modifications the build fails with:
binary obj/propeller/p2loader.bin ./bin/linux/bin2c: 1: ./bin/linux/bin2c: Syntax error: "(" unexpected Makefile:278: recipe for target 'obj/linux/p2loader.c' failed make: *** [obj/linux/p2loader.c] Error 2
Of course, the ./bin/linux/bin2c has just been built for the MIPS and so does not run.
Currently I get around that by building for x86, copying bin2c to /usr/bin, and removing the $BINDIR from in front of the bin2C commands in the Makefile. Or some variant of that.
No urgency but it would be nice if this worked out of the box.
Comments
I'm using the default branch. It already has some changes in it for using the UART's, together with a GPIO on ARM and other SoCs like the Raspi.
In the top level make file there is:
I take that as meaning that in the loader directory I can do: However that produces a x86 loader executable not a MIPS one.
In the loader Makefile we have: So I don't see how my build can ever work out of the box.
Brilliant! That is just the little make detail I needed.
$ make OS=linux TOOLCC=mipsel-openwrt-linux-uclibc-gcc
Does indeed create a MIPS executable.
It is possible I did once get confused because we end up with a bin directory with both x86 and MIPS binaries in it: Never mind all is good now.