[Tinyos-help] porting tinyos on 32bit MCU

santosh dwivedi santosh at iiita.ac.in
Tue Mar 29 00:53:04 PST 2005

Hi Cory,
Many thanks for ur comment, previous problem is fixed now but got into new
When i compiled the Blink Initial Error was
arm-elf-gcc: installation problem, cannot exec `cc1': No such file or
So I copied cc1 from C:\cygwin\lib\gcc-lib\i686-pc-cygwin\3.3.3 in arm-elf
installation directory (though i was aware that its not proper way)

NOw error "cc1: error:bad value (arm7tdmi) for -mcpu= switch Error" is
coming ...
below is make output
What is purpose of CC1 and how it is invoked by arm-lef-gcc ?
Do I need to customize CC1 for arm ?

$ make tms470
mkdir -p build/tms470
    compiling Blink to a tms470 binary
ncc -o build/tms470/main.exe -Os -finline-limit=100000 -fnesc-target=env
f-gcc -mcpu=arm7tdmi -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all
0 -fnesc-cfile=build/tms470/app.c -board=micasb -DDELUGE_LEDS
Blink" -DIDENT_PROGRAM_NAME_BYTES="66,108,105,110,107,0"
dL -DIDENT_UNIX_TIME=0x4247b1b4L -I/opt/tinyos-1.x/tos/lib/CC2420Radio
Blink.nc -lm

cc1: error: bad value (arm7tdmi) for -mcpu= switch
<commandline>: failed to preprocess /opt/tinyos-1.x/tos/system/tos.h
cc1: error: bad value (arm7tdmi) for -mcpu= switch
<commandline>: failed to preprocess Blink.nc
make: *** [exe0] Error 1

Please suggest what how to proceed further.

Thanks and Regards:
Santosh kumar dwivedi

> Hi Santosh,
> For other readers, note the file is named .platform not .PLATEFORM.
> Santosh, you say you have this line in your .platform file
>     "-fnesc-target=env",
> But if you look at the command line given to the compiler, you instead see
> this
>     -fnesc-target=tms470
> Fix your platform file to actually read env instead of tms470.  Until
> you patch nesc yourself to understand tms470, you must use target env
> to specify your platform.  As David pointed out, see
> tinyos-1.x/doc/nesc/envtarget.html for more details.

More information about the Tinyos-help mailing list