On Tue, Feb 18, 2025 at 3:04 AM Richard Biener via Gcc <gcc@gcc.gnu.org> wrote:
> On Tue, Feb 18, 2025 at 7:10 AM Dan via Gcc <gcc@gcc.gnu.org> wrote: > > > > Hello! > > > > I'm trying to compile for Texas Instruments (TI) C6000 Digital Signal > > Processor (DSP) using GCC. I'm aware that TI has its own compiler, but I > > want to use GCC. > > > > The documentation indicates that GCC has *some* support for C6x DSPs, as > > shown in this link: https://gcc.gnu.org/onlinedocs/gcc/C6X-Options.html > > > > However, when I run a simple command like gcc -c main.c -march=c674x > > -I/include -Tlinker.ld, it fails with this error: main.c:1:0: error: bad > > value (c674x) for -mtune= switch. > Did you build a toolchain including gcc from source or did you just use the "gcc" program used to build native programs? It looks like you need to build a cross tool chain for the tic6x-elf target which will produce a gcc named tic6x-elf-gcc. Richard's comments also apply but I'm not sure you were trying a gcc targeting the tic6x --joel > > > > I've read on forums that GCC 4.7 has *some* level of support for C6X > DSPs, > > but even after installing GCC 4.7.4, it still doesn't work. > > > > Some forums also mentioned a GCC-based toolchain developed by > CodeSourcery > > (later acquired by Mentor Graphics, and subsequently by Siemens EDA) that > > supported C6x DSPs. However, it's no longer available; I can't seem to > find > > any download links online. > > > > Could someone please advise on which GCC version is compatible with C6X > > DSPs? Any guidance would be greatly appreciated. > > All of them. Well, there's the c6x backend but it's not actively > maintained. > I don't see a -mtune switch for the port, so I do wonder whether you built > the compiler from source or got it from somewhere else. > > Richard. > > > > > > Thanks in advance! >