Error: Unknown instruction 'fcache #(ShiftOutDataEnd322 - ShiftOutDataStart322) '
DavidZemon
Posts: 2,973
in Propeller 1
I get the following errors when compiling with PropGCC 2344 from a Raspberry Pi 2
The assembled file is attached, and this is the command that is being invoked
pi@raspberrypi:~/software/PropWare/bin $ /opt/parallax/bin/propeller-elf-gcc -v Using built-in specs. COLLECT_GCC=/opt/parallax/bin/propeller-elf-gcc COLLECT_LTO_WRAPPER=/opt/parallax/libexec/gcc/propeller-elf/4.6.1/lto-wrapper Target: propeller-elf Configured with: ../../propgcc/gcc/configure --target=propeller-elf --prefix=/opt/parallax --disable-nls --disable-libssp --disable-lto --disable-shared --with-pkgversion=propellergcc_v1_0_0_2344 --with-bugurl=http://code.google.com/p/propgcc/issues Thread model: single gcc version 4.6.1 (propellergcc_v1_0_0_2344)
The assembled file is attached, and this is the command that is being invoked
/opt/parallax/bin/propeller-elf-gcc -save-temps -Os -m32bit-doubles -Wall -std=gnu++0x -fno-exceptions -fno-rtti -fno-threadsafe-statics -mcog -I/home/pi/software/PropWare -o CMakeFiles/PropWare_cog.dir/__/__/printer/printer.cpp.obj -c /home/pi/software/PropWare/PropWare/printer/printer.cpp
Comments
One solution would be to just skip -mcog for PropWare builds. Another would be to wrap any inline assembly using fcache with #ifndef __PROPELLER_COG__ (and perhaps provide an alternate implementation in the event that __PROPELLER_COG__ is defined, which means that -mcog is in effect).
Here's the file compiled from my Ubuntu 15.10 x64 machine with a recent version of GCC 4 from my build server.
Definitely agreed. But yes, the one on Ubuntu assembles without error. I can provide the pre-processed C++ file tonight if that would help you debug this. Didn't think about that this morning or else I would have already.
(1) Your raspberry pi assembler was out of date, and didn't have the fcache macro
(2) The up to date assembler allowed fcache even in cog mode
I've added errors for use of LMM macros in non-lmm mode, so your Ubuntu builds should error now as they should.
I'm not sure why your raspberry pi assembler was old. Are cross-builds working OK?
I just grabbed that from SimpleIDE. I think I tried the Pi build from my server a couple weeks ago and it didn't work. I'll give it another go tonight.
And so an example fcache function looks something like this:
@ersmith,
Is this something that would be helpful to have in propeller.h?