From 291615d5908b3221099e62a85cecdb5ef34eb905 Mon Sep 17 00:00:00 2001 From: mahi Date: Tue, 22 Mar 2011 09:58:58 +0100 Subject: [PATCH] Fixed 5516it example temporarily. --- boards/mpc5516it/examples/simple/makefile | 3 ++- examples/build_example.mk | 9 ++++++++- scripts/rules.mk | 2 +- system/kernel/makefile | 4 ++-- system/kernel/semaphore.c | 2 ++ 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/boards/mpc5516it/examples/simple/makefile b/boards/mpc5516it/examples/simple/makefile index 8e2a609f..93b6f1d5 100644 --- a/boards/mpc5516it/examples/simple/makefile +++ b/boards/mpc5516it/examples/simple/makefile @@ -1,6 +1,6 @@ - +EXAMPLENAME=simple ROOTDIR?=../../../.. include $(ROOTDIR)/examples/build_example.mk @@ -15,3 +15,4 @@ endif + diff --git a/examples/build_example.mk b/examples/build_example.mk index 3ea6b2fb..a260cacc 100644 --- a/examples/build_example.mk +++ b/examples/build_example.mk @@ -1,9 +1,15 @@ +ifeq ($(EXAMPLENAME),) +$(error whyyyyyy) +endif + ifndef ROOTDIR $(error ROOTDIR is not set. This makefile is invoked the wrong way) endif +#export EXAMPLENAME + ifndef BOARDDIR # Assume in-tree-build boardpath=$(realpath $(CURDIR)/../..) @@ -22,6 +28,7 @@ else endif ifeq ($(ugh),1) + export example:=$(subst $(abspath $(CURDIR)/..)/,,$(CURDIR)) .PHONY: all clean @@ -46,7 +53,7 @@ ldcmdfile-y = linkscript_$(COMPILER).lcf vpath %.ldf $(ROOTDIR)/$(ARCH_PATH-y)/scripts # What I want to build -build-exe-y = $(example).elf +build-exe-y = $(EXAMPLENAME).elf endif diff --git a/scripts/rules.mk b/scripts/rules.mk index cf04c92b..22a9fd01 100644 --- a/scripts/rules.mk +++ b/scripts/rules.mk @@ -276,7 +276,7 @@ $(build-exe-y): $(dep-y) $(obj-y) $(sim-y) $(libitem-y) $(ldcmdfile-y) ifeq ($(CROSS_COMPILE),) $(Q)$(CC) $(LDFLAGS) -o $@ $(libpath-y) $(obj-y) $(lib-y) $(libitem-y) else - @echo LDFLAGS $(LDFLAGS) + @echo LDFLAGS $(LDFLAGS) @echo LD_FILE $(LD_FILE) $(Q)$(LD) $(LDFLAGS) $(LD_FILE) $(ldcmdfile-y) -o $@ $(libpath-y) $(LD_START_GRP) $(obj-y) $(lib-y) $(libitem-y) $(LD_END_GRP) $(LDMAPFILE) ifdef CFG_MC912DG128A diff --git a/system/kernel/makefile b/system/kernel/makefile index cc9c70c8..832cd726 100644 --- a/system/kernel/makefile +++ b/system/kernel/makefile @@ -59,13 +59,13 @@ asm_offset.h: asm_offset.c endif ifeq ($(COMPILER),cw) -# The "\r" in the awk is a little strang...sed and awk if that does not work +# The "\r" in the awk is a little strange...sed and awk if that does not work # sed -e '/.apa/!d' -e '/OBJ/!d' -e 's/\[//' 123.tmp | gawk '{ print "#define " $9 " " $4 }' %_offset.h: %_offset.c @echo " >> generating $@ from $<" $(Q)$(CC) -dis $(CFLAGS) $(addprefix -I,$(inc-y)) $(addprefix -D,$(def-y)) $< > 123.tmp - gawk '$$9 ~/.apa/ && $$0 ~/OBJ/ { gsub(/\r/,""); printf("#define %s %d\n",$$10,$$5-100) }' 123.tmp > $@ + $(Q)gawk '$$9 ~/.apa/ && $$0 ~/OBJ/ { gsub(/\r/,""); printf("#define %s %d\n",$$10,$$5-100) }' 123.tmp > $@ endif #VPATH += .. diff --git a/system/kernel/semaphore.c b/system/kernel/semaphore.c index 883c00f7..a5caedf0 100644 --- a/system/kernel/semaphore.c +++ b/system/kernel/semaphore.c @@ -46,6 +46,8 @@ * Mutex:es on the other hand will make other tasks run that shares the resource * but the priority of the task that take the mutex for the second time makes the * first task inherit the priority of that task. + * + * Resources is deadlock safe while mutex:es are not (circular lock dependencies) */ /* ----------------------------[includes]------------------------------------*/ -- 2.39.2