From: richardbarry Date: Wed, 13 Aug 2008 08:06:49 +0000 (+0000) Subject: Tidy up. X-Git-Tag: V5.1.2~245 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=009e27cde63255daec00082fa334fafa5310f2e1;p=freertos Tidy up. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@451 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h b/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h index a65da0f17..0881fdc52 100644 --- a/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h +++ b/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOSConfig.h @@ -66,7 +66,7 @@ #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 64000000 ) -#define configTICK_RATE_HZ ( ( portTickType ) 1000 ) +#define configTICK_RATE_HZ ( ( portTickType ) 200 ) #define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 160 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 40000 ) ) #define configMAX_TASK_NAME_LEN ( 12 ) @@ -78,6 +78,7 @@ #define configCHECK_FOR_STACK_OVERFLOW 2 #define configUSE_RECURSIVE_MUTEXES 1 #define configQUEUE_REGISTRY_SIZE 10 +#define configUSE_COUNTING_SEMAPHORES 0 #define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) diff --git a/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.c b/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.c index c45d2855c..d53ae91ce 100644 --- a/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.c +++ b/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/IntQueueTimer.c @@ -51,8 +51,8 @@ #include "IntQueueTimer.h" #include "IntQueue.h" -#define timerINTERRUPT1_FREQUENCY ( 2000UL ) -#define timerINTERRUPT2_FREQUENCY ( 2001UL ) +#define timerINTERRUPT1_FREQUENCY ( 1000UL ) +#define timerINTERRUPT2_FREQUENCY ( 1001UL ) #define timerPRESCALE_VALUE ( 2 ) void vInitialiseTimerForIntQueueTest( void ) diff --git a/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/Makefile b/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/Makefile index f28efe17c..5eeb74759 100644 --- a/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/Makefile +++ b/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/Makefile @@ -1,49 +1,85 @@ RM := rm -rf +############################################################################### +# List the directories that contain files to be built. +############################################################################### + +# These two directories contain the FreeRTOS.org kernel source files. FREERTOS_SOURCE_DIR=./../../../Source PORT_SOURCE_DIR=./../../../Source/portable/GCC/ColdFire_V2 + +# This directory contains the standard demo files that get included in every +# FreeRTOS.org demo. They define tasks that demonstrate the API usage and +# test the FreeRTOS.org port. COMMON_DEMO_SOURCE_DIR=./../../Common/Minimal + +# The lwIP stack source files. +LWIP_ROOT_DIR=./../../Common/ethernet/lwIP_130 + +VPATH= $(FREERTOS_SOURCE_DIR) : \ + $(PORT_SOURCE_DIR) : \ + $(COMMON_DEMO_SOURCE_DIR) : \ + $(FREERTOS_SOURCE_DIR)/portable/MemMang : \ + . : \ + ./ParTest : \ + ./serial + + +############################################################################### +# Define a few constants to be used during the build. +############################################################################### + OUTPUT_DIR=./bin CPU=528x -LINKER_SCRIPT=m5282evb-ram-hosted.ld +LINKER_SCRIPT=m5282evb-dram_code-rambar_data-hosted.ld OUTPUT_FILENAME=RTOSDemo.elf CC=m68k-elf-gcc AS=m68K-elf-as -VPATH=$(FREERTOS_SOURCE_DIR) : $(PORT_SOURCE_DIR) : $(COMMON_DEMO_SOURCE_DIR) : $(FREERTOS_SOURCE_DIR)/portable/MemMang : . : ./ParTest : ./serial - -OBJS = $(OUTPUT_DIR)/portasm.o \ - $(OUTPUT_DIR)/main.o \ - $(OUTPUT_DIR)/serial.o \ - $(OUTPUT_DIR)/comtest.o \ - $(OUTPUT_DIR)/flash.o \ - $(OUTPUT_DIR)/ParTest.o \ - $(OUTPUT_DIR)/BlockQ.o \ - $(OUTPUT_DIR)/blocktim.o \ - $(OUTPUT_DIR)/death.o \ - $(OUTPUT_DIR)/integer.o \ - $(OUTPUT_DIR)/PollQ.o \ - $(OUTPUT_DIR)/semtest.o \ - $(OUTPUT_DIR)/GenQTest.o \ - $(OUTPUT_DIR)/QPeek.o \ - $(OUTPUT_DIR)/recmutex.o \ - $(OUTPUT_DIR)/port.o \ - $(OUTPUT_DIR)/list.o \ - $(OUTPUT_DIR)/tasks.o \ - $(OUTPUT_DIR)/queue.o \ - $(OUTPUT_DIR)/heap_2.o \ - $(OUTPUT_DIR)/IntQueueTimer.o \ - $(OUTPUT_DIR)/IntQueue.o \ - $(OUTPUT_DIR)/FreeRTOS_Tick_Setup.o + + +############################################################################### +# List the files to include in the build. These files will be located from the +# VPATH defined above. +############################################################################### + +# The FreeRTOS.org source files. +FreeRTOS_OBJS= $(OUTPUT_DIR)/portasm.o \ + $(OUTPUT_DIR)/port.o \ + $(OUTPUT_DIR)/list.o \ + $(OUTPUT_DIR)/tasks.o \ + $(OUTPUT_DIR)/queue.o \ + $(OUTPUT_DIR)/heap_2.o + +# The demo app source files. +Demo_OBJS= $(OUTPUT_DIR)/main.o \ + $(OUTPUT_DIR)/serial.o \ + $(OUTPUT_DIR)/comtest.o \ + $(OUTPUT_DIR)/flash.o \ + $(OUTPUT_DIR)/ParTest.o \ + $(OUTPUT_DIR)/BlockQ.o \ + $(OUTPUT_DIR)/death.o \ + $(OUTPUT_DIR)/integer.o \ + $(OUTPUT_DIR)/PollQ.o \ + $(OUTPUT_DIR)/semtest.o \ + $(OUTPUT_DIR)/GenQTest.o \ + $(OUTPUT_DIR)/QPeek.o \ + $(OUTPUT_DIR)/recmutex.o \ + $(OUTPUT_DIR)/IntQueueTimer.o \ + $(OUTPUT_DIR)/IntQueue.o \ + $(OUTPUT_DIR)/FreeRTOS_Tick_Setup.o + +OBJS = $(FreeRTOS_OBJS) $(Demo_OBJS) C_DEPS = $(OBJS:.o=.d) +INCLUDE_PATHS= -I"$(FREERTOS_SOURCE_DIR)/include" \ + -I"include" \ + -I"$(COMMON_DEMO_SOURCE_DIR)/../include" \ + -I"$(PORT_SOURCE_DIR)" \ + -I./MCF5282 \ + -I. -CFLAGS= -I"$(FREERTOS_SOURCE_DIR)/include" \ - -I"include" \ - -I"$(COMMON_DEMO_SOURCE_DIR)/../include" \ - -I"$(PORT_SOURCE_DIR)" \ - -I./MCF5282 \ - -I. \ +CFLAGS= $(INCLUDE_PATHS) \ -D COLDFIRE_V2_GCC \ -O0 \ -fno-strict-aliasing \ @@ -63,6 +99,7 @@ CFLAGS= -I"$(FREERTOS_SOURCE_DIR)/include" \ -MT"$(@:%.o=%.d)" ASFLAGS= -m528x \ + -g3 \ --register-prefix-optional \ --bitwise-or diff --git a/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c b/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c index eb3f368ab..266280645 100644 --- a/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c +++ b/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/main.c @@ -76,7 +76,6 @@ #include "BlockQ.h" #include "death.h" #include "integer.h" -#include "blocktim.h" #include "flash.h" #include "partest.h" #include "semtest.h" @@ -101,8 +100,8 @@ error has been detected. */ #define mainCHECK_LED ( 3 ) /* Contest constants - there is no free LED for the comtest. */ -#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 ) -#define mainCOM_TEST_LED ( 5 ) +#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 ) +#define mainCOM_TEST_LED ( 5 ) /* Task priorities. */ #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 ) @@ -137,7 +136,6 @@ int main( void ) /* Start the standard demo tasks. */ vStartLEDFlashTasks( tskIDLE_PRIORITY ); vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY ); - vCreateBlockTimeTasks(); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY ); @@ -199,11 +197,6 @@ portTickType xLastExecutionTime; ulError |= 0x04UL; } - if( xAreBlockTimeTestTasksStillRunning() != pdTRUE ) - { - ulError |= 0x10UL; - } - if( xAreSemaphoreTasksStillRunning() != pdTRUE ) { ulError |= 0x20UL;