From a317b98bdf91fd30946928118bc068ee2176d78b Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 19 Nov 2006 13:41:31 +0000 Subject: [PATCH] Slight mods to comments in STR75X GCC port and demo files. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@54 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../SystemFiles/crt0_STR75x_FreeRTOS.s | 3 ++- Demo/ARM7_STR75x_GCC/serial/serial.c | 9 +++++++++ Demo/ARM7_STR75x_GCC/serial/serialISR.c | 8 ++++++++ Source/include/portable.h | 4 ++++ Source/portable/GCC/STR75x/port.c | 3 +-- Source/portable/GCC/STR75x/portISR.c | 17 ++++------------- Source/portable/IAR/STR75x/port.c | 2 +- 7 files changed, 29 insertions(+), 17 deletions(-) diff --git a/Demo/ARM7_STR75x_GCC/SystemFiles/crt0_STR75x_FreeRTOS.s b/Demo/ARM7_STR75x_GCC/SystemFiles/crt0_STR75x_FreeRTOS.s index 4b79ed5b1..f0a69a94e 100644 --- a/Demo/ARM7_STR75x_GCC/SystemFiles/crt0_STR75x_FreeRTOS.s +++ b/Demo/ARM7_STR75x_GCC/SystemFiles/crt0_STR75x_FreeRTOS.s @@ -1,7 +1,8 @@ /* This is the default Startup for STR75x devices for the GNU toolchain -It has been designed by ST Microelectronics and modified by Raisonance. +It has been designed by ST Microelectronics and modified by Raisonance +and FreeRTOS.org. You can use it, modify it, distribute it freely but without any waranty. diff --git a/Demo/ARM7_STR75x_GCC/serial/serial.c b/Demo/ARM7_STR75x_GCC/serial/serial.c index 5d1a47375..be4a987dd 100644 --- a/Demo/ARM7_STR75x_GCC/serial/serial.c +++ b/Demo/ARM7_STR75x_GCC/serial/serial.c @@ -34,6 +34,15 @@ BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0. */ + +/*----------------------------------------------------------- + * Components that can be compiled to either ARM or THUMB mode are + * contained in this file.c The ISR routines, which can only be compiled + * to ARM mode, are contained in serialISR.c. + *----------------------------------------------------------*/ + + + /* Library includes. */ #include "75x_uart.h" #include "75x_gpio.h" diff --git a/Demo/ARM7_STR75x_GCC/serial/serialISR.c b/Demo/ARM7_STR75x_GCC/serial/serialISR.c index 0efa6c667..a65568243 100644 --- a/Demo/ARM7_STR75x_GCC/serial/serialISR.c +++ b/Demo/ARM7_STR75x_GCC/serial/serialISR.c @@ -30,6 +30,14 @@ *************************************************************************** */ +/*----------------------------------------------------------- + * Components that can be compiled to either ARM or THUMB mode are + * contained in serial.c The ISR routines, which can only be compiled + * to ARM mode, are contained in this file. + *----------------------------------------------------------*/ + + + /* Library includes. */ #include "75x_uart.h" diff --git a/Source/include/portable.h b/Source/include/portable.h index 8b815353c..9d0dea101 100644 --- a/Source/include/portable.h +++ b/Source/include/portable.h @@ -113,6 +113,10 @@ #include "..\..\Source\portable\IAR\STR75x\portmacro.h" #endif +#ifdef STR75X_GCC + #include "..\..\Source\portable\GCC\STR75x\portmacro.h" +#endif + #ifdef STR91X_IAR #include "..\..\Source\portable\IAR\STR91x\portmacro.h" #endif diff --git a/Source/portable/GCC/STR75x/port.c b/Source/portable/GCC/STR75x/port.c index a5bb07beb..7e589a0b5 100644 --- a/Source/portable/GCC/STR75x/port.c +++ b/Source/portable/GCC/STR75x/port.c @@ -57,10 +57,9 @@ /*-----------------------------------------------------------*/ -/* Setup the watchdog to generate the tick interrupts. */ +/* Setup the TB to generate the tick interrupts. */ static void prvSetupTimerInterrupt( void ); - /*-----------------------------------------------------------*/ /* diff --git a/Source/portable/GCC/STR75x/portISR.c b/Source/portable/GCC/STR75x/portISR.c index a9c20d2f5..dadcf5d62 100644 --- a/Source/portable/GCC/STR75x/portISR.c +++ b/Source/portable/GCC/STR75x/portISR.c @@ -40,15 +40,10 @@ /* */ - /* Scheduler includes. */ #include "FreeRTOS.h" #include "task.h" -/* Constants required to handle interrupts. */ -#define portTIMER_MATCH_ISR_BIT ( ( unsigned portCHAR ) 0x01 ) -#define portCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 ) - /* Constants required to handle critical sections. */ #define portNO_CRITICAL_NESTING ( ( unsigned portLONG ) 0 ) @@ -91,13 +86,11 @@ void vPortISRStartFirstTask( void ) \ /* And return - correcting the offset in the LR to obtain the */ \ /* correct address. */ \ - "SUBS PC, LR, #4 \n\t" \ - ); \ + "SUBS PC, LR, #4 \n\t" \ + ); } /*-----------------------------------------------------------*/ -/* The preemptive scheduler is defined as "naked" as the full context is -saved on entry as part of the context switch. */ void vPortTickISR( void ) { /* Increment the RTOS tick count, then look for the highest priority @@ -148,11 +141,8 @@ void vPortTickISR( void ) } #endif /* THUMB_INTERWORK */ +/*-----------------------------------------------------------*/ -/* The code generated by the GCC compiler uses the stack in different ways at -different optimisation levels. The interrupt flags can therefore not always -be saved to the stack. Instead the critical section nesting level is stored -in a variable, which is then saved as part of the stack context. */ void vPortEnterCritical( void ) { /* Disable interrupts as per portDISABLE_INTERRUPTS(); */ @@ -168,6 +158,7 @@ void vPortEnterCritical( void ) portENTER_CRITICAL() has been called. */ ulCriticalNesting++; } +/*-----------------------------------------------------------*/ void vPortExitCritical( void ) { diff --git a/Source/portable/IAR/STR75x/port.c b/Source/portable/IAR/STR75x/port.c index c1332df58..909892565 100644 --- a/Source/portable/IAR/STR75x/port.c +++ b/Source/portable/IAR/STR75x/port.c @@ -56,7 +56,7 @@ /*-----------------------------------------------------------*/ -/* Setup the watchdog to generate the tick interrupts. */ +/* Setup the TB to generate the tick interrupts. */ static void prvSetupTimerInterrupt( void ); /* ulCriticalNesting will get set to zero when the first task starts. It -- 2.39.2