Re: compiling a simple "hello world example" Microchip PIC32 ( march is 24ks) fails...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 12 Mar 2019 at 18:33, Branko <brane221122@xxxxxxxxx> wrote:
>
> I'd like to use my system gcc if possible to compile for such simple
> micro ( no OS, no infrastructure, need barebone implementation).
>
>
> I'm running Gentoo on x86_64, with gcc-8.3.0

Then your system compiler can only compile for x86_64 and x86.

>
>
> So I cobbled up one three line example and within it just main functioin
> that does nothing, except returns.
>
>
> Then I tried "gcc -march=24kc main.c".
>
>
> But compiler fails with unknown architecture, even though 24ks is listed
> under MIPS.

But your system compiler targets x86_64.

A given build of GCC targets a single CPU architecture. Yours targets
x86_64, not MIPS.

> It outputs a list of suppported arches, and all of them are just within
> x86/x86_64 world. No ARM, not Power, nothing else.
>
>
> How should this be done ?
>
>
> I don't think about going crosscompile as the compiler will run on my
> host machine, while it's results would run on the micro...

That's the definition of a cross compiler, and is what you need to do.

You'll have to get a MIPS cross-compiler that runs on your host
machine, or build one yourself.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux