[Tinyos8051wg-commit] SF.net SVN: tinyos8051wg:[1088] trunk/diku
Status: Alpha
Brought to you by:
mleopold
From: <mle...@us...> - 2009-09-26 17:57:22
|
Revision: 1088 http://tinyos8051wg.svn.sourceforge.net/tinyos8051wg/?rev=1088&view=rev Author: mleopold Date: 2009-09-26 17:57:12 +0000 (Sat, 26 Sep 2009) Log Message: ----------- SDCC memory setup for CC2430 was incomplete Modified Paths: -------------- trunk/diku/common/apps/BlinkNoTimerTask/BlinkNoTimerTaskC.nc trunk/diku/common/tools/compression/average trunk/diku/common/tools/compression/frequency.cc trunk/diku/mcs51/support/make/cc2430em.target trunk/diku/mcs51/support/make/mcs51/CC2430-F128.bat trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl trunk/diku/mcs51/support/make/mcs51/mcs51.rules trunk/diku/mcs51/support/make/nano.target trunk/diku/mcs51/tos/chips/mcs51/pins/HplMcs51GeneralIOC.nc trunk/diku/tiny15four/support/make/tiny15four.extra Added Paths: ----------- trunk/diku/common/lib/compression/compressor.h Removed Paths: ------------- trunk/diku/common/lib/compression/compressor.h trunk/diku/common/tools/compression/frequency Modified: trunk/diku/common/apps/BlinkNoTimerTask/BlinkNoTimerTaskC.nc =================================================================== --- trunk/diku/common/apps/BlinkNoTimerTask/BlinkNoTimerTaskC.nc 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/common/apps/BlinkNoTimerTask/BlinkNoTimerTaskC.nc 2009-09-26 17:57:12 UTC (rev 1088) @@ -49,28 +49,26 @@ task void delay(); event void Boot.booted() { - call Leds.led0On(); - call Leds.led1On(); - call Leds.led2On(); + call Leds.led0Off(); + call Leds.led1Off(); + call Leds.led2Off(); post delay(); } task void delay() { - uint16_t i,j; - - for (i=0 ; i<0x1FFU ; i++) { - for (j=0 ; j<0xA0 ; j++) { + uint16_t i,j; + for (i=0 ; i<0x1FFU ; i++) { + for (j=0 ; j<0xA0 ; j++) { + } } + post toggle(); } - post toggle(); - post delay(); - } task void toggle() { - call Leds.led0Toggle(); call Leds.led1Toggle(); call Leds.led2Toggle(); + post delay(); } } Deleted: trunk/diku/common/lib/compression/compressor.h =================================================================== --- trunk/diku/common/lib/compression/compressor.h 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/common/lib/compression/compressor.h 2009-09-26 17:57:12 UTC (rev 1088) @@ -1 +0,0 @@ -link lz77.h \ No newline at end of file Added: trunk/diku/common/lib/compression/compressor.h =================================================================== --- trunk/diku/common/lib/compression/compressor.h (rev 0) +++ trunk/diku/common/lib/compression/compressor.h 2009-09-26 17:57:12 UTC (rev 1088) @@ -0,0 +1 @@ +link lz77.h \ No newline at end of file Property changes on: trunk/diku/common/lib/compression/compressor.h ___________________________________________________________________ Added: svn:special + * Modified: trunk/diku/common/tools/compression/average =================================================================== (Binary files differ) Deleted: trunk/diku/common/tools/compression/frequency =================================================================== (Binary files differ) Modified: trunk/diku/common/tools/compression/frequency.cc =================================================================== --- trunk/diku/common/tools/compression/frequency.cc 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/common/tools/compression/frequency.cc 2009-09-26 17:57:12 UTC (rev 1088) @@ -1,6 +1,8 @@ #include <stdio.h> #include <iostream> #include <queue> +#include <string.h> +#include <stdlib.h> uint32_t *raw[5]; uint32_t *diffs[5]; Modified: trunk/diku/mcs51/support/make/cc2430em.target =================================================================== --- trunk/diku/mcs51/support/make/cc2430em.target 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/cc2430em.target 2009-09-26 17:57:12 UTC (rev 1088) @@ -1,5 +1,6 @@ PLATFORM = cc2430em MCS51_KEIL_SCRIPT=CC2430-F128.bat +SDCC_CFLAGS_MEM=--xram-loc 0xE000 --xram-size 0x1F00 ifdef PLATFORM PFLAGS += -D__$(PLATFORM)__ -D__cc2430__ Modified: trunk/diku/mcs51/support/make/mcs51/CC2430-F128.bat =================================================================== --- trunk/diku/mcs51/support/make/mcs51/CC2430-F128.bat 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/mcs51/CC2430-F128.bat 2009-09-26 17:57:12 UTC (rev 1088) @@ -10,7 +10,7 @@ rem C:\Keil\C51\BIN\C51.EXE "app.c" LARGE PRINT(.\app.lst) OPTIMIZE(0,SIZE) OBJECT(.\app.obj) rem Compile app.c to app.obj -C:\Keil\C51\BIN\C51.EXE "app.c" LARGE PRINT(.\app.lst) OBJECT(.\app.obj) SYMBOLS +C:\Keil\C51\BIN\C51.EXE "app.c" LARGE PRINT(.\app.lst) OBJECT(.\app.obj) SYMBOLS DEBUG CODE rem Link startup.obj/app.obj and convert to hex rem C:\Keil\C51\BIN\BL51.EXE "startup.obj", "app.obj" TO "app" PRINT (app.map) XDATA( 0XE000-0XFF00 ) RAMSIZE(256) REGFILE(app.reg) Modified: trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/mcs51/mangleAppC.pl 2009-09-26 17:57:12 UTC (rev 1088) @@ -370,7 +370,7 @@ # are a nono... # Remove empty attributes (a leftover from reentrant and interrupt handling). - s{(__attribute(?:__)?\s*\(\(\)\))}{}g; + s{(__attribute(?:__)?\s*\(\(.*\)\))}{}g; if (! (m{^.*/\*} || # /* style comment m{^.*//})){ # // style comment Modified: trunk/diku/mcs51/support/make/mcs51/mcs51.rules =================================================================== --- trunk/diku/mcs51/support/make/mcs51/mcs51.rules 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/mcs51/mcs51.rules 2009-09-26 17:57:12 UTC (rev 1088) @@ -12,12 +12,17 @@ NCC = ncc SDCC = sdcc -# hmm.. should be --model-large, but that seems to fail # --std-sdcc99 allows inline +# Additional interesting options include +# --nogcse: In case of overflow of "*_sloc" in the DSEG area +# --nooverlay: If function pointers are used + ifndef SDCC_CFLAGS - SDCC_CFLAGS = -mmcs51 --model-large --no-c-code-in-asm --std-sdcc99 + SDCC_CFLAGS = -mmcs51 --std-sdcc99 --model-large --no-c-code-in-asm --out-fmt-ihx --main-return endif +# --short-is-8bit + BUILDDIR = build/$(PLATFORM) MAIN_EXE = $(BUILDDIR)/APP MAIN_SREC = $(BUILDDIR)/main.srec @@ -131,8 +136,7 @@ .PHONY: sdcc sdcc: mangle - $(SDCC) $(SDCC_CFLAGS) $(APP_C) -o$(BUILDDIR)/app - packihx $(BUILDDIR)/app > $(BUILDDIR)/app.hex + $(SDCC) $(SDCC_CFLAGS) $(SDCC_CFLAGS_MEM) $(SDCC_CFLAGS_EXTRA) $(APP_C) -o$(BUILDDIR)/app.hex @echo "Segment sizes" @grep -A 1 "OSEG" $(BUILDDIR)/app.sym @grep -A 1 "SSEG" $(BUILDDIR)/app.sym Modified: trunk/diku/mcs51/support/make/nano.target =================================================================== --- trunk/diku/mcs51/support/make/nano.target 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/support/make/nano.target 2009-09-26 17:57:12 UTC (rev 1088) @@ -1,5 +1,6 @@ PLATFORM = nano MCS51_KEIL_SCRIPT=CC2430-F128.bat +SDCC_CFLAGS_MEM=--xram-loc 0xE000 --xram-size 0x1F00 # Check if we are using the 802.15.4 library. ifneq ($(filter $(MAKECMDGOALS),tiny15four),) Modified: trunk/diku/mcs51/tos/chips/mcs51/pins/HplMcs51GeneralIOC.nc =================================================================== --- trunk/diku/mcs51/tos/chips/mcs51/pins/HplMcs51GeneralIOC.nc 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/mcs51/tos/chips/mcs51/pins/HplMcs51GeneralIOC.nc 2009-09-26 17:57:12 UTC (rev 1088) @@ -71,7 +71,7 @@ inline async command bool name.get() { return ( pin != 0); } \ inline async command void name.set() { pin = 1; } \ inline async command void name.clr() { pin = 0; } \ - async command void name.toggle() { atomic { pin = ~pin; } } \ + async command void name.toggle() { atomic { pin = (pin)?0:1; } } \ inline async command bool name.isInput() { IS_IO_PIN_INPUT(pin_dir, pin_dir_bit); } \ inline async command bool name.isOutput() { IS_IO_PIN_OUTPUT(pin_dir, pin_dir_bit); } \ inline async command void name.makeInput() { MAKE_IO_PIN_INPUT (pin_dir, pin_dir_bit); } \ Modified: trunk/diku/tiny15four/support/make/tiny15four.extra =================================================================== --- trunk/diku/tiny15four/support/make/tiny15four.extra 2009-09-26 14:53:58 UTC (rev 1087) +++ trunk/diku/tiny15four/support/make/tiny15four.extra 2009-09-26 17:57:12 UTC (rev 1088) @@ -34,6 +34,12 @@ NESC_FLAGS=-Wnesc-data-race -Wnesc-async -Wno-nesc-fnptr -Wnesc-combine +# Using SDCC for the 8051 platform requires additional arguements +# to disable the wird "runtime stack" and a wierd local variable location +# optimization that seems to fill up the "DSEG" area + +SDCC_CFLAGS_EXTRA=--nogcse --nooverlay + # Get includes from the platform.t15f file for the chosen platform. include $(TINY15FOUR_DIR)/tos/platforms/$(PLATFORM)/platform.t15f This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |