Quantcast
Viewing all articles
Browse latest Browse all 22016

GCC error with -mcpu32 flag, CPU32 compiler needed

I am patching code into my car's ECU. This has a Motorola MC68376 processor, so I'm using the appropriate CPU32 instruction set.

I want to continue to write in assembly code so that I can explicitly manage control registers, RAM access and allocation, as well as copying code structures which are already in use.

My first patch was successfully compiled in EASy68k, but that program does not support the full instruction set for the CPU32. For example, the DIVS.L command is not supported, so I cannot take a quotient of a 32-bit value.

Thus, before writing my own compiler out of sheer incompetence with available tools, I'm looking for an easier path. I read that gcc has the capability to compile code for the CPU32, but I have failed to get it to work.

I'm using MinGW's gcc (6.3.0) and Eclipse (2020-03). I added the '-mcpu32' or '-march=cpu32' flags to the compiler call, according to:https://gcc.gnu.org/onlinedocs/gcc/M680x0-Options.html

Unfortunately this returns an error:

gcc: error: unrecognized command line option '-mcpu32'; did you mean '-mcpu='?

or

error: bad value (cpu32) for -march= switch

May I please have some advice for making this work? Does anyone know of a better CPU32 compiler that works with Eclipse?


Viewing all articles
Browse latest Browse all 22016

Trending Articles