Hi again, Richard probably knows this but the gcc docs from the git master have this:
'-march=NAME' This specifies the name of the target architecture. GCC uses this name to determine what kind of instructions it can emit when generating assembly code. Permissible names are: 'c62x', 'c64x', 'c64x+', 'c67x', 'c67x+', 'c674x'. I decided to build a tic6xx-elf toolchain from the git masters of binutils-gdb, newlib, and gcc just to make sure it woudld build ok. It will build for C ok but when C++ is enabled, it fails with an assembler error. Even though I have never used this processor and have no plans to, went ahead and filed an issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118941 --joel On Tue, Feb 18, 2025 at 4:33 PM Joel Sherrill <joel.sherr...@gmail.com> wrote: > > > 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! >> >