Assembler errors compiling jollicube code for Photon [SOLVED]

I get the following errors when compiling my code in both particle build and in local build with make:

/tmp/ccrAt6FT.s: Assembler messages:
/tmp/ccrAt6FT.s:4279: Error: ARM register expected -- `mov __tmp_reg__,r0'
/tmp/ccrAt6FT.s:4280: Error: ARM register expected -- `lsl __tmp_reg__'
/tmp/ccrAt6FT.s:4281: Error: bad arguments to instruction -- `ror r0'
/tmp/ccrAt6FT.s:4282: Error: ARM register expected -- `lsl __tmp_reg__'
/tmp/ccrAt6FT.s:4283: Error: bad arguments to instruction -- `ror r0'
/tmp/ccrAt6FT.s:4284: Error: ARM register expected -- `lsl __tmp_reg__'
/tmp/ccrAt6FT.s:4285: Error: bad arguments to instruction -- `ror r0'
/tmp/ccrAt6FT.s:4286: Error: ARM register expected -- `lsl __tmp_reg__'
/tmp/ccrAt6FT.s:4287: Error: bad arguments to instruction -- `ror r0'
/tmp/ccrAt6FT.s:4288: Error: ARM register expected -- `lsl __tmp_reg__'
/tmp/ccrAt6FT.s:4289: Error: bad arguments to instruction -- `ror r0'
/tmp/ccrAt6FT.s:4290: Error: ARM register expected -- `lsl __tmp_reg__'
/tmp/ccrAt6FT.s:4291: Error: bad arguments to instruction -- `ror r0'
/tmp/ccrAt6FT.s:4292: Error: ARM register expected -- `lsl __tmp_reg__'
/tmp/ccrAt6FT.s:4293: Error: bad arguments to instruction -- `ror r0'
/tmp/ccrAt6FT.s:4294: Error: ARM register expected -- `lsl __tmp_reg__'
/tmp/ccrAt6FT.s:4295: Error: bad arguments to instruction -- `ror r0'
make[1]: *** [../build/target/user/platform-6jollicube.o] Error 1
make: *** [user] Error 2
Error: Could not compile. Please review your code.

Can anyone give me any hints on how to track down what is causing this? The code is port to Photon of this jolliCube demo program. So far I have only made minor changes to get this far.

Locally my version of gcc is:

arm-none-eabi-gcc.exe (GNU Tools for ARM Embedded Processors) 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 227977]

and the firmware branch is ‘latest’. Note that I can successfully compile the firmware with the default ‘tinker’ app.

thanks,
Chris

I found the cause, there is embedded assembler in the code (‘bitswap’ function) which of course is not compatible with the processor in the Photon. This code is not actually used, so commenting it out solved the problem.

1 Like