user6754053
user6754053

Reputation:

arm-none-eabi-ld cannot find -mcpu=cortex-m3

There is another question with similar naming but it was never resolved.

I installed arm-none-eabi gcc and binutils from the GNU Arm Embedded PPA on Ubuntu. This toolchain normally works fine.

Today however, in my Makefile, I link with -march=armv7-m -mcpu=cortex-m3 as some of the options. This immediately causes ld to fail like this:

$ arm-none-eabi-ld -mcpu=cortex-m3 -march=armv7-m -Tcm3.ld # and some more options
arm-none-eabi-ld: unrecognised emulation mode: arch=armv7-m
Supported emulations: armelf

What have I done wrong? I can't seem to find any information about this!


I've also tested this with my other toolchain (CodeSourcery, March 2011). That toolchain normally works, but fails now too.

Should I be linking with gcc not ld?

Upvotes: 1

Views: 1715

Answers (1)

user6754053
user6754053

Reputation:

It appears that linking with gcc rather than ld solves the problem. I can even pass in the linker script without having to use -Wl,-T.

I'm still open as to why ld didn't work in the first place.

Upvotes: 1

Related Questions