Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22002

Error when I compile 'hello-world' example from Contiki

$
0
0

I have installed the Contiki OS sources, and the ARM GCC compiler by doing brew install arm-none-eabi-gcc. However, when I try to run the hello world example in Contiki's example folder using the command make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 hello-world.bin CPU_FAMILY=cc26xx, I get the following error message:

  CC        ../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.carm-none-eabi-gcc: error: unrecognized -march target: core2arm-none-eabi-gcc: note: valid arguments are: armv4 armv4t armv5t armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8-m.base armv8-m.main armv8-r iwmmxt iwmmxt2arm-none-eabi-gcc: error: missing argument to '-march='arm-none-eabi-gcc: error: unrecognized command line option '-mssse3'make: *** [obj_srf06-cc26xx/ccfg.o] Error 1

I triple-checked that the ARM GCC compiler is accessible from the terminal by doing arm-none-eabi-gcc --version, and I can see that it is properly installed:

arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]Copyright (C) 2019 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

So I am really not sure what might be wrong here. Can anyone help?

My operating system is macOS Mojave Version 10.14.6.

UPDATE: The makefile is given in the example folder (from contiki):

CONTIKI_PROJECT = hello-worldall: $(CONTIKI_PROJECT)CONTIKI = ../..include $(CONTIKI)/Makefile.include

UPDATE 2: By adding V=1 in the command, my output is:

arm-none-eabi-gcc -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -DCONTIKI=1 -DCONTIKI_TARGET_SRF06_CC26XX=1 -DNETSTACK_CONF_WITH_IPV6=1 -DUIP_CONF_IPV6_RPL=1 -DBOARD_SENSORTAG=1 -DBACKDOOR_IOID=0x00000000 -I../../cpu/cc26xx-cc13xx/lib/cc26xxware -I../../cpu/cc26xx-cc13xx/lib/cc26xxware/driverlib -I../../cpu/cc26xx-cc13xx/lib/cc26xxware/inc -mcpu=cortex-m3 -mthumb -mlittle-endian -ffunction-sections -fdata-sections -fshort-enums -fomit-frame-pointer -fno-strict-aliasing -Wall -std=c99 -O2  -I. -I../../platform/srf06-cc26xx/. -I../../platform/srf06-cc26xx/sensortag/cc2650 -I../../platform/srf06-cc26xx/sensortag -I../../platform/srf06-cc26xx/common -I../../cpu/cc26xx-cc13xx/. -I../../cpu/cc26xx-cc13xx/dev -I../../cpu/cc26xx-cc13xx/rf-core -I../../cpu/cc26xx-cc13xx/rf-core/api -I../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files -I../../cpu/cc26xx-cc13xx/../arm/common/dbg-io -I../../core/dev -I../../core/lib -I../../core/net -I../../core/net/llsec -I../../core/net/mac -I../../core/net/rime -I../../core/net/rpl -I../../core/sys -I../../core/cfs -I../../core/ctk -I../../core/lib/ctk -I../../core/loader -I../../core/. -I../../core/sys -I../../core/dev -I../../core/lib -I../../core/net/ipv6 -I../../core/net/ip -I../../core/net/rpl -I../../cpu/cc26xx-cc13xx/lib/cc26xxware/driverlib -I../../core/net -I../../core/net/mac -I../../core/net/mac/contikimac -I../../core/net/llsec -I../../platform/srf06-cc26xx/ -I../.. -DCONTIKI_VERSION_STRING=\"Contiki-3.x-3345-g32b5b17\"-include "contiki-conf.h" -c ../../cpu/cc26xx-cc13xx/lib/cc26xxware/startup_files/ccfg.c -o obj_srf06-cc26xx/ccfg.o

UPDATE 3: If I do unset CFLAGS, I get a new error message:

/usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: hello-world.elf section `.interp' will not fit in region `FLASH_CCFG'/usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: region `FLASH_CCFG' overflowed by 9120 bytes/usr/local/Cellar/arm-none-eabi-gcc/9-2019-q4-major/gcc/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol ad_strip_dylibs; defaulting to 0000000000000000collect2: error: ld returned 1 exit statusmake: *** [hello-world.elf] Error 1rm obj_srf06-cc26xx/startup_gcc.o hello-world.co obj_srf06-cc26xx/fault-handlers.o

Viewing all articles
Browse latest Browse all 22002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>