From: richardbarry Date: Sun, 25 Aug 2013 17:07:56 +0000 (+0000) Subject: Create full Keil project for XMC boot kit (not yet tested). X-Git-Tag: V7.5.3~58 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bb0b6ee851576586407a49430599864479d91193;p=freertos Create full Keil project for XMC boot kit (not yet tested). git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2008 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/ParTest.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/ParTest.c index 9346703b8..fbad4ad47 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/ParTest.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/ParTest.c @@ -70,23 +70,83 @@ #include "FreeRTOS.h" #include "task.h" +/* Hardware includes. */ +#include + /* Standard demo include. */ #include "partest.h" +/* The port bits on which LEDs are connected. */ +static const unsigned long ulLEDBits[] = +{ + 1UL << 0, /* P0.0 */ + 1UL << 2, /* P0.2 */ + 1UL << 5, /* P0.5 */ + 1UL << 6, /* P0.6 */ + 1UL << 7 /* P0.7 */ +}; + +#define partstNUM_LEDS ( sizeof( ulLEDBits ) / sizeof( unsigned long ) ) + +/* Shift the LED bit into the correct position within the POW register to +perform the desired operation. */ +#define partstON_SHIFT ( 16UL ) +#define partstOFF_SHIFT ( 0UL ) + /*-----------------------------------------------------------*/ void vParTestInitialise( void ) { + /* Configure relevant port P0 to push pull output to drive LEDs. */ + + /* P0.0 */ + PORT0->IOCR0 &= ~( ( 0xFFUL << 0 ) ); + PORT0->IOCR0 |= ( 0x80UL << 0 ); + + /* P0.2 */ + PORT0->IOCR0 &= ~( ( 0xFFUL << 16 ) ); + PORT0->IOCR0 |= ( 0x80UL << 16 ); + + /* P0.5 */ + PORT0->IOCR4 &= ~( ( 0xFFUL << 8 ) ); + PORT0->IOCR4 |= ( 0x80UL << 8 ); + + /* P0.6 */ + PORT0->IOCR4 &= ~( ( 0xFFUL << 16 ) ); + PORT0->IOCR4 |= ( 0x80UL << 16 ); + + /* P0.7 */ + PORT0->IOCR4 &= ~( ( 0xFFUL << 24 ) ); + PORT0->IOCR4 |= ( 0x80UL << 24 ); } /*-----------------------------------------------------------*/ void vParTestSetLED( unsigned long ulLED, signed portBASE_TYPE xValue ) { + if( ulLED < partstNUM_LEDS ) + { + if( xValue == pdTRUE ) + { + /* Turn the LED on. */ + PORT0->OMR = ( ulLEDBits[ ulLED ] << partstON_SHIFT ); + } + else + { + /* Turn the LED off. */ + PORT0->OMR = ( ulLEDBits[ ulLED ] << partstOFF_SHIFT ); + } + } } /*-----------------------------------------------------------*/ void vParTestToggleLED( unsigned long ulLED ) { + if( ulLED < partstNUM_LEDS ) + { + /* Setting both the ON and OFF bits simultaneously results in the bit + being toggled. */ + PORT0->OMR = ( ulLEDBits[ ulLED ] << partstON_SHIFT ) | ( ulLEDBits[ ulLED ] << partstOFF_SHIFT ); + } } /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RTOSDemo.uvopt b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RTOSDemo.uvopt index 34468eb47..465ee288d 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RTOSDemo.uvopt +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RTOSDemo.uvopt @@ -112,7 +112,7 @@ 1 0 1 - 1 + 0 1 1 1 @@ -128,7 +128,7 @@ 1 0 0 - 1 + 0 @@ -142,25 +142,52 @@ BIN\UL2CM3.DLL + + 0 + DLGDARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + -T0 + 0 UL2CM3 UL2CM3(-O207 -S0 -C0 -FO7 -FN1 -FC800 -FD20000000 -FF0XMC1300_200 -FL032000 -FS010001000 - + + + 0 + 0 + 132 + 1 +
0
+ 0 + 0 + 0 + 0 + 0 + 0 + C:\E\Dev\FreeRTOS\WorkingCopy\FreeRTOS\Demo\CORTEX_M0_Infineon_Boot_Kits_IAR_Keil\startup_XMC1300.s + + +
+
0 0 1 - 0 + 1 0 0 0 0 - 0 + 1 0 0 0 @@ -175,7 +202,7 @@ 0 0 0 - 3 + 0 0 @@ -185,7 +212,7 @@ System - 0 + 1 0 0 0 @@ -195,10 +222,10 @@ 2 0 0 - 26 + 0 0 - 128 - 129 + 130 + 132 0 .\startup_XMC1300.s startup_XMC1300.s @@ -225,7 +252,7 @@ FreeRTOS source - 0 + 1 0 0 0 @@ -299,10 +326,10 @@ 1 0 0 - 0 + 9 0 - 1 - 1 + 265 + 279 0 ..\..\Source\portable\RVDS\ARM_CM0\port.c port.c @@ -329,7 +356,7 @@ Demo App Source - 0 + 1 0 0 0 @@ -339,10 +366,10 @@ 1 0 0 - 0 + 9 0 - 0 - 0 + 115 + 134 0 .\ParTest.c ParTest.c @@ -384,7 +411,7 @@ 3 12 - 1 + 5 0 0 0 @@ -392,6 +419,22 @@ 0 0 0 + .\FreeRTOSConfig.h + FreeRTOSConfig.h + 0 + 0 + + + 3 + 13 + 1 + 0 + 0 + 36 + 0 + 293 + 311 + 0 .\main-full.c main-full.c 0 @@ -399,8 +442,32 @@ 3 - 13 - 5 + 14 + 2 + 0 + 0 + 5 + 0 + 142 + 143 + 0 + .\RegTest.s + RegTest.s + 0 + 0 + + + + + Common Demo Tasks + 0 + 0 + 0 + 0 + + 4 + 15 + 1 0 0 0 @@ -408,8 +475,56 @@ 0 0 0 - .\FreeRTOSConfig.h - FreeRTOSConfig.h + ..\Common\Minimal\dynamic.c + dynamic.c + 0 + 0 + + + 4 + 16 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\Common\Minimal\recmutex.c + recmutex.c + 0 + 0 + + + 4 + 17 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\Common\Minimal\blocktim.c + blocktim.c + 0 + 0 + + + 4 + 18 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + ..\Common\Minimal\countsem.c + countsem.c 0 0 diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RTOSDemo.uvproj b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RTOSDemo.uvproj index 3738f4037..3fea34439 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RTOSDemo.uvproj +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RTOSDemo.uvproj @@ -119,7 +119,7 @@ 1 1 - 1 + 0 1 1 1 @@ -139,7 +139,7 @@ 1 0 - 1 + 0 @@ -162,12 +162,12 @@ 0 0 1 - 0 - -1 + 1 + 4096 1 BIN\UL2CM3.DLL - + "" () @@ -457,55 +457,45 @@ 1 .\main-blinky.c + + FreeRTOSConfig.h + 5 + .\FreeRTOSConfig.h + main-full.c 1 .\main-full.c - - - 2 - 0 - 0 - 0 - 0 - 0 - 2 - 2 - 2 - 2 - 11 - - - - - - 2 - 0 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 2 - 0 - 2 - 2 - - - - - - - - - - FreeRTOSConfig.h - 5 - .\FreeRTOSConfig.h + RegTest.s + 2 + .\RegTest.s + + + + + Common Demo Tasks + + + dynamic.c + 1 + ..\Common\Minimal\dynamic.c + + + recmutex.c + 1 + ..\Common\Minimal\recmutex.c + + + blocktim.c + 1 + ..\Common\Minimal\blocktim.c + + + countsem.c + 1 + ..\Common\Minimal\countsem.c diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RegTest.s b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RegTest.s index be93bb414..cf81df86d 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RegTest.s +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/RegTest.s @@ -1,80 +1,83 @@ -/* - FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd. - - VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that has become a de facto standard. * - * * - * Help yourself get started quickly and support the FreeRTOS * - * project by purchasing a FreeRTOS tutorial book, reference * - * manual, or both from: http://www.FreeRTOS.org/Documentation * - * * - * Thank you! * - * * - *************************************************************************** - - This file is part of the FreeRTOS distribution. - - FreeRTOS is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License (version 2) as published by the - Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - - >>! NOTE: The modification to the GPL is included to allow you to distribute - >>! a combined work that includes FreeRTOS without being obliged to provide - >>! the source code for proprietary components outside of the FreeRTOS - >>! kernel. - - FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available from the following - link: http://www.freertos.org/a00114.html - - 1 tab == 4 spaces! - - *************************************************************************** - * * - * Having a problem? Start by reading the FAQ "My application does * - * not run, what could be wrong?" * - * * - * http://www.FreeRTOS.org/FAQHelp.html * - * * - *************************************************************************** - - http://www.FreeRTOS.org - Documentation, books, training, latest versions, - license and Real Time Engineers Ltd. contact details. - - http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, - including FreeRTOS+Trace - an indispensable productivity tool, a DOS - compatible FAT file system, and our tiny thread aware UDP/IP stack. - - http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High - Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and middleware. - - http://www.SafeRTOS.com - High Integrity Systems also provide a safety - engineered and independently SIL3 certified version for use in safety and - mission critical applications that require provable dependability. - - 1 tab == 4 spaces! -*/ - - RSEG CODE:CODE(2) - thumb - - EXTERN ulRegTest1LoopCounter - EXTERN ulRegTest2LoopCounter - - PUBLIC vRegTest1Task - PUBLIC vRegTest2Task - -/*-----------------------------------------------------------*/ -vRegTest1Task - - /* Fill the core registers with known values. This is only done once. */ +;/* +; FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd. +; +; VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. +; +; *************************************************************************** +; * * +; * FreeRTOS provides completely free yet professionally developed, * +; * robust, strictly quality controlled, supported, and cross * +; * platform software that has become a de facto standard. * +; * * +; * Help yourself get started quickly and support the FreeRTOS * +; * project by purchasing a FreeRTOS tutorial book, reference * +; * manual, or both from: http://www.FreeRTOS.org/Documentation * +; * * +; * Thank you! * +; * * +; *************************************************************************** +; +; This file is part of the FreeRTOS distribution. +; +; FreeRTOS is free software; you can redistribute it and/or modify it under +; the terms of the GNU General Public License (version 2) as published by the +; Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. +; +; >>! NOTE: The modification to the GPL is included to allow you to distribute +; >>! a combined work that includes FreeRTOS without being obliged to provide +; >>! the source code for proprietary components outside of the FreeRTOS +; >>! kernel. +; +; FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY +; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +; FOR A PARTICULAR PURPOSE. Full license text is available from the following +; link: http://www.freertos.org/a00114.html +; +; 1 tab == 4 spaces! +; +; *************************************************************************** +; * * +; * Having a problem? Start by reading the FAQ "My application does * +; * not run, what could be wrong?" * +; * * +; * http://www.FreeRTOS.org/FAQHelp.html * +; * * +; *************************************************************************** +; +; http://www.FreeRTOS.org - Documentation, books, training, latest versions, +; license and Real Time Engineers Ltd. contact details. +; +; http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, +; including FreeRTOS+Trace - an indispensable productivity tool, a DOS +; compatible FAT file system, and our tiny thread aware UDP/IP stack. +; +; http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High +; Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS +; licenses offer ticketed support, indemnification and middleware. +; +; http://www.SafeRTOS.com - High Integrity Systems also provide a safety +; engineered and independently SIL3 certified version for use in safety and +; mission critical applications that require provable dependability. +; +; 1 tab == 4 spaces! +;*/ + + PRESERVE8 + THUMB + + + IMPORT ulRegTest1LoopCounter + IMPORT ulRegTest2LoopCounter + + EXPORT vRegTest1Task + EXPORT vRegTest2Task + + AREA |.text|, CODE, READONLY + +;/*-----------------------------------------------------------*/ +vRegTest1Task PROC + + ;/* Fill the core registers with known values. This is only done once. */ movs r1, #101 movs r2, #102 movs r3, #103 @@ -95,8 +98,8 @@ vRegTest1Task movs r0, #100 reg1_loop - /* Repeatedly check that each register still contains the value written to - it when the task started. */ + ;/* Repeatedly check that each register still contains the value written to + ;it when the task started. */ cmp r0, #100 bne reg1_error_loop cmp r1, #101 @@ -129,7 +132,7 @@ reg1_loop cmp r12, r0 bne reg1_error_loop - /* Everything passed, increment the loop counter. */ + ;/* Everything passed, increment the loop counter. */ push { r1 } ldr r0, =ulRegTest1LoopCounter ldr r1, [r0] @@ -137,21 +140,22 @@ reg1_loop str r1, [r0] pop { r1 } - /* Start again. */ + ;/* Start again. */ movs r0, #100 b reg1_loop reg1_error_loop - /* If this line is hit then there was an error in a core register value. - The loop ensures the loop counter stops incrementing. */ + ;/* If this line is hit then there was an error in a core register value. + ;The loop ensures the loop counter stops incrementing. */ b reg1_error_loop nop + ENDP -vRegTest2Task +vRegTest2Task PROC - /* Fill the core registers with known values. This is only done once. */ + ;/* Fill the core registers with known values. This is only done once. */ movs r1, #1 movs r2, #2 movs r3, #3 @@ -172,8 +176,8 @@ vRegTest2Task movs r0, #10 reg2_loop - /* Repeatedly check that each register still contains the value written to - it when the task started. */ + ;/* Repeatedly check that each register still contains the value written to + ;it when the task started. */ cmp r0, #10 bne reg2_error_loop cmp r1, #1 @@ -206,7 +210,7 @@ reg2_loop cmp r12, r0 bne reg2_error_loop - /* Everything passed, increment the loop counter. */ + ;/* Everything passed, increment the loop counter. */ push { r1 } ldr r0, =ulRegTest2LoopCounter ldr r1, [r0] @@ -214,14 +218,15 @@ reg2_loop str r1, [r0] pop { r1 } - /* Start again. */ + ;/* Start again. */ movs r0, #10 b reg2_loop reg2_error_loop - /* If this line is hit then there was an error in a core register value. - The loop ensures the loop counter stops incrementing. */ + ;/* If this line is hit then there was an error in a core register value. + ;The loop ensures the loop counter stops incrementing. */ b reg2_error_loop nop + ENDP END diff --git a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/main-full.c b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/main-full.c index 74bfa5aff..3f38cd058 100644 --- a/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/main-full.c +++ b/FreeRTOS/Demo/CORTEX_M0_Infineon_Boot_Kits_IAR_Keil/main-full.c @@ -139,7 +139,8 @@ multiple of this. */ #define mainFLASH_TIMER_BASE_RATE ( 200UL / portTICK_RATE_MS ) /* The LED toggle by the check timer. */ -#define mainCHECK_LED ( 3 ) +#define mainCHECK_LED ( 1 ) + /*-----------------------------------------------------------*/ /*