I'll improve the error message... David Gay
On Sun, Jun 13, 2010 at 11:37 PM, Jordi Soucheiron <jsouchei...@dexmatech.com> wrote: > I found this kind of error several times when I was messing with the > compiler options. It took me a while to realize where the error was. I agree > that some work should be put into making this kind of errors less obscure. > On the other hand I guess that only a few developers are experiencing this > kind of problems (I don't really think that many people need to be playing > with the compiler flags as we do). > Jordi Soucheiron > Software Engineer > > DEXMA > Parc Tecnològic la Salle > Sant Joan de la Salle, 42 > 08022 Barcelona > t/f: [+34] 93 181 01 95 > www.dexmatech.com > jsouchei...@dexmatech.com > 2010/6/13 Eric Decker <cire...@gmail.com> >> >> I'm working with TinyOS on various msp430 based cpus and various mspgcc >> toolchains. And have run into an interesting problem with nesc. I'd like >> to request that the error handling for this particular problem be changed so >> that the nature of the error is a little less obtuse. >> >> Baseline: >> >> I'm running the Zolertia tool chain which is a mspgcc 3.2.3 modified to >> support lots of new TI chips. The 2618 works, the 5438 doesn't. This tool >> chain supports the -mdata-64k and -mcode-64k toolchain switches to restrict >> code and data to < 64K. The 2618 only has 8K of ram and the code base is >> currently around 32K so limiting to < 64K has many advantages. Also until >> recently we were using threads and threads doesn't support the new chips >> (needs chip dependent code to handle bigger registers). >> >> The support/make/mm4.target file includes PFLAG += -mdata-64k -mcode-64k >> >> This works great. >> >> >> Recently, I've started working with Peter Bigot's mspgcc4 toolchain >> because it has good working support for the 5438 which we are in the process >> of transitioning to. Much better power consumption plus even more >> peripherals. Yum. >> >> However, the toolchain doesn't support -mdata-64k or -mcode-64k. And >> when I fire up a tinyos compile I get the following: >> >> make debug mm4 && msp430-jtag -e build/mm4/main.exe >> BUILD: 22 >> mkdir -p build/mm4 >> compiling mmC to a mm4 binary >> ncc -o build/mm4/main.exe -O1 -g -fnesc-no-inline -DFAKE_SURFACE -DXWAIT >> -DDEFAULT_EAVES=TRUE -DGPS_TEST -DGPS_LEAVE_UP -DGPS_STAY_UP -DGPS_RO >> -DGPS_COMM_EMIT_29 -D_BUILD=22 -I/home/cire/mm/t2_mm/include >> -I/home/cire/mm/t2_mm/tos/platforms/mm4 >> -I/home/cire/mm/t2_mm/tos/platforms/mm -I/home/cire/mm/t2_mm/tos/system >> -I/home/cire/mm/t2_mm/tos/interfaces -mdisable-hwmul -mdata-64k -mcode-64k >> -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=mm4 >> -fnesc-cfile=build/mm4/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 >> -DIDENT_APPNAME=\"mmC\" -DIDENT_USERNAME=\"cire\" -DIDENT_HOSTNAME=\"zot\" >> -DIDENT_USERHASH=0x11dce1bdL -DIDENT_TIMESTAMP=0x4c149f53L >> -DIDENT_UIDHASH=0xcf776613L mmC.nc -lm >> nesc1: internal error: couldn't define builtin macros - exiting >> make: *** [exe0] Error 1 >> >> >> Now I know for sure that the above error is being caused by the -mdata-64k >> and -mcode-64k because when I remove them the compile works fine. And I'm >> getting much tighter code being generated. My build goes down from 33652 >> bytes to 26286 bytes. (This is unoptimized sizes). >> >> >> >> So my request is this.... Can you make the internal error be a bit more >> discriptive of what is going wrong? It isn't exactly clear what the >> connection is between internal macros and -m switches to the compiler are. >> Luckily I had an intuitive leap as to what was going on so was able to >> narrow it down. >> >> >> eric >> >> -- >> Eric B. Decker >> Senior (over 50 :-) Researcher >> >> >> >> _______________________________________________ >> Tinyos-devel mailing list >> tinyos-de...@millennium.berkeley.edu >> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel >> > > _______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help