0
0

When I compile the OSAL code for Raspberry pi platform, I get this error:

gcc error: unrecognized command line option “-m32”

 

Any ideas would be appreciated.

Thanks,

Fred

 

  • You must to post comments
0
0

That switch tells a 64 bit system to build a 32 bit binary.  The Raspberry Pi is only 32 bit so that switch is neither required nor supported.  I assume you’re building on the Raspberry Pi itself and not cross compiling.  If so, the quickest solution is to just delete the -m32 switch from your PSP, which I’m assuming is the pc-linux PSP.  If you’re handy with the Makefile system, make it conditionally compile differently on a 32 bit system.  If not, just make sure you put the “-m32” back when you try building on a 64 bit PC.  If you’re cross compiling, just delete the “-m32” from your custom PSP.

FYI, the Raspberry Pi is a good platform to start getting used to cross compiling.  If there are any students out there playing with the Raspberry Pi, don’t get used to being able to compile on your embedded system.  Start learning how to setup and use a cross compiler.  I have a PSP specifically for cross compiling to the Raspberry Pi and one for the Beaglebone Black.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.