Compare commits

...

1175 Commits

Author SHA1 Message Date
Richard Barry
82862bb153 2011-04-08 19:42:54 +00:00
Richard Barry
a70c881207 Remove shadowed variable name. 2011-04-08 19:40:44 +00:00
Richard Barry
89bf1cf24f Update headers for Version 7.0.0 release. 2011-04-08 18:30:58 +00:00
Richard Barry
7ca26d943a Prepare for V7.0.0 release. 2011-04-08 12:06:33 +00:00
Richard Barry
e5696339e7 Remove unused header files from the STM32 discovery board library configuration file. 2011-04-08 12:00:48 +00:00
Richard Barry
37de268af4 Cosmetic work towards MISRA compliance statement pre release of V7. 2011-04-05 20:19:54 +00:00
Richard Barry
a1842621eb Remove unused library files from the STM32F100 TrueStudio project. 2011-04-05 13:41:35 +00:00
Richard Barry
87b622e0e8 Just change some of the comments in the STM32F100RB TrueStudio main.c file. 2011-04-05 09:46:43 +00:00
Richard Barry
8fc0c27ea5 Ensure that the configMAX_SYSCALL_INTERRUPT_PRIORITY setting works with all possible values. 2011-04-05 09:45:42 +00:00
Richard Barry
9133ceb44d Added STM32 discovery board simple demo project. 2011-04-04 18:54:14 +00:00
Richard Barry
3baaba8800 Rename the SmartFusion Debug build configuration to be the Blinky debug configuration as so far it only includes the basic simple demo. 2011-04-03 20:50:19 +00:00
Richard Barry
19bc9c8a48 Update the SmartFusion SoftConsole directory structure to include the webserver files. 2011-04-03 20:45:09 +00:00
Richard Barry
f74e406997 Add SmartFusion/SoftConsole demo. At the moment only the blinky configuration is included. The full configuration will be added soon. 2011-04-03 19:02:58 +00:00
Richard Barry
0e62058edb Added some trace macros into the timers.c file. 2011-04-01 18:45:44 +00:00
Richard Barry
afe9c0face Minor updates to the PIC32 MPLAB project to prevent it dumping .o files everywhere. 2011-04-01 18:19:34 +00:00
Richard Barry
8bd2d2f682 Add a #if ( configUSE_TIMERS ) conditional compilation constant in to allow the software timers source file to be included in a build that is not configured to use timers without resulting in linker errors. 2011-03-31 14:09:21 +00:00
Richard Barry
876caa2967 Replace portLONG with long, portCHAR with char, and portSHORT with short. 2011-03-27 18:51:55 +00:00
Richard Barry
85096f6159 Replace portLONG with long, portCHAR with char, and portSHORT with short. 2011-03-27 18:50:11 +00:00
Richard Barry
eeeb001d86 Removed the needs-lock SVN attribute from the PIC32 demo project file and workspace file. 2011-03-27 08:13:59 +00:00
Richard Barry
d8bab825bc Add a portNOP() implementation and relax the stack alignment requirements in the IAR MSP430X port layer. 2011-03-26 19:07:38 +00:00
Richard Barry
ce3d65938d Change the priorities used by the RX/RSK/Renesas demo application to ensure they can be used when configASSERT() is defined. Previously the priorities meant assert would have been called because one of the priorities used was above ( configMAX_PRIORITIES - 1 ). 2011-03-26 18:44:42 +00:00
Richard Barry
5421388be5 Change the priorities used by the RX/RSK/GCC demo application to ensure they can be used when configASSERT() is defined. Previously the priorities meant assert would have been called because one of the priorities used was above ( configMAX_PRIORITIES - 1 ). 2011-03-26 15:48:35 +00:00
Richard Barry
fdac74427d Change the priorities used by the RX/RSK/IAR demo application to ensure they can be used when configASSERT() is defined. Previously the priorities meant assert would have been called because one of the priorities used was above ( configMAX_PRIORITIES - 1 ). 2011-03-26 13:41:10 +00:00
Richard Barry
04c5d88e9d Change the priorities used by the RX/RDK/IAR demo application to ensure they can be used when configASSERT() is defined. Previously the priorities meant assert would have been called because one of the priorities used was above ( configMAX_PRIORITIES - 1 ). 2011-03-26 12:19:18 +00:00
Richard Barry
53b611d97a Change the priorities used by the RX/RDK/Renesas demo application to ensure they can be used when configASSERT() is defined. Previously the priorities meant assert would have been called because one of the priorities used was above ( configMAX_PRIORITIES - 1 ). 2011-03-26 11:33:54 +00:00
Richard Barry
89f0b2c0be Change the priorities used by the RX/RDK/GCC demo application to ensure they can be used when configASSERT() is defined. Previously the priorities meant assert would have been called because one of the priorities used was above ( configMAX_PRIORITIES - 1 ). 2011-03-26 10:35:16 +00:00
Richard Barry
ead29065e0 Allow the intqHIGHER_PRIORITY definition to be modified outside of the IntQueue.c file. 2011-03-26 10:00:29 +00:00
Richard Barry
eb16629f11 Update comments only in the MSP430X IAR main.c and serial.c files. 2011-03-24 19:37:18 +00:00
Richard Barry
c85523f870 Finalise MSP430X CCS4 port and demo. 2011-03-14 07:26:50 +00:00
Richard Barry
329c36c6bc Update the MSP430X CCS4 port layer. 2011-03-12 14:59:44 +00:00
Richard Barry
15c46025ab Update TimerDemo.c so it can be used with the CCS4 compiler without generating errors or warnings. 2011-03-12 14:58:09 +00:00
Richard Barry
0ced5cc699 Update the CCS4 MSP430X demo files. 2011-03-12 14:56:14 +00:00
Richard Barry
d53e65ed82 Tidy up timers API documentation comments. 2011-03-10 11:02:31 +00:00
Richard Barry
8a3fa98a2f Continue work on timers module documentation. 2011-03-09 13:49:35 +00:00
Richard Barry
0e133bc0fc Minor comment addition to queue.h. 2011-03-05 17:47:53 +00:00
Richard Barry
553a8389cc Start the documentation of the timer API functions and macros. About 50% done so far. 2011-03-05 17:46:55 +00:00
Richard Barry
a9558864b7 Update PIC24 project for use with the latest Microchip tools. 2011-03-01 15:18:46 +00:00
Richard Barry
605155cbcd Set configUSE_16_BIT_TICKS back to is proper (not test) configuration. 2011-02-28 17:58:09 +00:00
Richard Barry
06899603f3 Add the timer module demo code to the MSVC Win32 simulator demo. 2011-02-28 17:52:14 +00:00
Richard Barry
7b0841b1e9 Check in the timer module test/demo task. 2011-02-28 16:14:49 +00:00
Richard Barry
3f10f92340 Correct the configUSE_16_BIT_TICKS usage in the Win32 simulator port layer. 2011-02-28 16:12:55 +00:00
Richard Barry
95b2901ba6 Correct the configUSE_16_BIT_TICKS usage in the GCC Coldfire port layer. 2011-02-28 16:11:26 +00:00
Richard Barry
cb238fc1fa Finish off timers implementation. 2011-02-28 16:10:08 +00:00
Richard Barry
3c6ae51faf Finish off timers implementation. 2011-02-28 16:09:19 +00:00
Richard Barry
0c95f33e9f Finilise timers testing. 2011-02-27 13:08:44 +00:00
Richard Barry
2c1a85c90c Add some assertion points to timers.c. 2011-02-22 20:43:17 +00:00
Richard Barry
8b5a004be1 Continue testing timers module. Still a work in progress. 2011-02-21 10:52:36 +00:00
Richard Barry
8a9fb9554d Continue testing timers module. Still a work in progress. 2011-02-21 09:38:33 +00:00
Richard Barry
5c98d0eb7c Updates to timers.c related to module testing. 2011-02-20 11:05:54 +00:00
Richard Barry
efc3ba9d73 Updates to timers.c related to module testing. 2011-02-20 10:59:58 +00:00
Richard Barry
50dcd0c682 Move one of the configASSERT() statements in tasks.c to be inside the if() that checks whether the stack should grow up or down. 2011-02-18 17:40:30 +00:00
Richard Barry
7759f7c973 Spell check comments in TimerDemo.c. 2011-02-18 15:59:02 +00:00
Richard Barry
58a700b8f7 WIN32 simulator port: Allow the configTICK_RATE_HZ to be increased without making the sleep time in the simulated timer peripheral too small. 2011-02-14 13:49:50 +00:00
Richard Barry
412c2cc9a7 Add some configASSERT() calls. 2011-02-14 13:47:50 +00:00
Richard Barry
38821bf732 Continue work on the new timer implementation test application. Nearly complete. 2011-02-14 10:54:00 +00:00
Richard Barry
7d76fd568f Continue work on the new timer implementation test application. Nearly complete. 2011-02-14 10:52:52 +00:00
Richard Barry
b4ff4820cb Continue work on the new timer implementation. Nearly complete. 2011-02-14 10:51:18 +00:00
Richard Barry
07a2021676 Add ISR safe timer API. 2011-02-12 13:53:25 +00:00
Richard Barry
3ba433ed39 Continue adding some tick interrupt overflow protection to the timers module. This is not tested yet and still a work in progress. 2011-02-11 16:17:37 +00:00
Richard Barry
7ee534e4c2 Add some tick interrupt overflow protection to the timers module. This is not tested yet and still a work in progress. 2011-02-10 19:09:35 +00:00
Richard Barry
671ca2724e A bit of modularisation performed on the TimerDemo.c file - still a work in progress. 2011-02-10 19:08:14 +00:00
Richard Barry
0552fc86bf Commit before update to include overflow list functionality. 2011-02-10 17:20:36 +00:00
Richard Barry
f9148de3cc Add the timer demo/test task creating to the WIN32-MSVC/main.c file. 2011-02-09 19:30:44 +00:00
Richard Barry
8c9d8bcf0d Add constants to required to use the new timers implementation and the timer demo task/test task to the Win32 MSVC demo FreeRTOSConfig.h file. 2011-02-09 19:29:46 +00:00
Richard Barry
aceb8db846 Start creating a demo task/test task for the new timer implementation. Still a work in progress. 2011-02-09 19:28:21 +00:00
Richard Barry
91f0fc9cdd Minor updates to the core header files required by the new timer implementation. 2011-02-09 19:26:33 +00:00
Richard Barry
559532329d Minor updates to the queue.c and tasks.c core files required to support the new timers implementation. 2011-02-09 19:21:58 +00:00
Richard Barry
9d9b00b669 Correction to the draft timers module. Still a work in progress. 2011-02-09 19:20:12 +00:00
Richard Barry
7b97fe26c7 Remove the needs lock property. 2011-02-09 15:30:23 +00:00
Richard Barry
1cfa8cd9d8 Remove the needs lock property. 2011-02-09 15:27:26 +00:00
Richard Barry
8db5ded4b3 Continue work on the timers module. 2011-02-09 10:47:23 +00:00
Richard Barry
896d8c5d94 Continue work on the timers module. 2011-02-09 10:46:45 +00:00
Richard Barry
4a5f1529d0 Continue work on timers module - work in progress. 2011-02-08 16:21:15 +00:00
Richard Barry
812632fd1c Start an optional timers module implementation. 2011-02-08 15:21:31 +00:00
Richard Barry
4d2adb720b Start an optional timers module implementation. 2011-02-08 15:20:29 +00:00
Richard Barry
f5e7f9957c Change clock_time_t from a fixed unsigned long to portTickType so it works ok when configUSE_16_BIT_TICKS is set to 1. 2011-02-07 11:58:19 +00:00
Richard Barry
a5820e2b2a Make changes required for MISRA 2004 compliance. 2011-02-06 18:47:57 +00:00
Richard Barry
c26b230d28 Some time and code size optimisations. 2011-02-06 15:44:56 +00:00
Richard Barry
1374a17f73 Change occurrences of "Cortex M3" to "Cortex-M3". 2011-02-05 16:49:17 +00:00
Richard Barry
a22c519f5d Change occurrences of "Cortex M3" to "Cortex-M3". 2011-02-05 16:47:27 +00:00
Richard Barry
80a942e964 Change the case of an include file and a file name in the makefile for the SAM7X Eclipse demo to ensure it can be built on Linux. 2011-01-30 17:55:50 +00:00
Richard Barry
46c4d33d28 Add some comments to the PIC32 demos that the IPL setting in an ISR prototype has no effect if the FreeRTOS assembly wrapper is being used. 2011-01-29 15:49:42 +00:00
Richard Barry
14472a9499 Set the software interrupt priority to use configKERNEL_INTERRUPT_PRIORITY rather than being hard coded to 1. 2011-01-29 15:42:51 +00:00
Richard Barry
fc56459b46 Update the dsPIC MPLAB demo for use with the latest 3.25 version of the compiler. 2011-01-25 16:30:24 +00:00
Richard Barry
381785b968 Update the PIC24 MPLAB demo for use with the latest 3.25 version of the compiler. 2011-01-25 16:24:22 +00:00
Richard Barry
27effd446c Update the dsPIC MPLAB demo for use with the latest 3.25 version of the compiler. 2011-01-25 15:56:09 +00:00
Richard Barry
d89c43c7aa Update the PIC32 project to better structure the files in the MPLAB project window, and test that it works with the latest V1.12 C32 compiler. 2011-01-25 15:26:53 +00:00
Richard Barry
0079d00fec Remove unreferenced variables from main.c for the PSoC 5 demos. 2011-01-25 10:16:20 +00:00
Richard Barry
063a1538c7 Remove the memory hole in the linker MSP430X/IAR linker script that was a left over from the TI User Experience demo (which required the hole). 2011-01-19 16:40:55 +00:00
Richard Barry
6bf111e94a Update the MSP430X/IAR demo project to support the medium data model. 2011-01-18 20:34:38 +00:00
Richard Barry
c679af3ba8 Update the MSP430X/IAR port layer to support the medium data model. 2011-01-18 20:33:35 +00:00
Richard Barry
bc87cc4cb7 Tidy up the IAR MSP430X demo serial.c file. 2011-01-18 19:55:13 +00:00
Richard Barry
334e0e2e70 Update to V6.1.1 2011-01-14 20:40:41 +00:00
Richard Barry
139b80f57e Update to V6.1.1 2011-01-14 20:31:45 +00:00
Richard Barry
6fac5cfd4c Update to V6.1.1 2011-01-14 20:25:54 +00:00
Richard Barry
96ab89d253 Update to V6.1.1 2011-01-14 20:22:24 +00:00
Richard Barry
399d8c47c7 Second phase of changing the directory that starts Cortex, with one that starts CORTEX. 2011-01-14 18:45:00 +00:00
Richard Barry
7004e0308a Second phase of changing the directory that starts Cortex, with one that starts CORTEX. 2011-01-14 18:44:23 +00:00
Richard Barry
a7b2373bcc First phase of changing the directory that starts Cortex, with one that starts CORTEX. 2011-01-14 18:42:44 +00:00
Richard Barry
5cc153cfb1 First phase of changing the directory that starts Cortex, with one that starts CORTEX. 2011-01-14 18:40:20 +00:00
Richard Barry
9e00460ce1 Update the RX600 HEW projects to use the new J-Link DLL. 2011-01-14 18:34:29 +00:00
Richard Barry
7a337142ff Increase the stack sizes in the IAR / MSP430X demo. 2011-01-13 19:08:36 +00:00
Richard Barry
fb18eeb96c Make the generation of run time stats percentages more efficient. 2011-01-13 19:04:57 +00:00
Richard Barry
411364dab6 Add the .align, .asmfunc and .endasmfunc directives to the CCS MSP430X port layer. 2011-01-13 10:36:42 +00:00
Richard Barry
749edf57e7 Make the tick ISR entry function use the __raw attribute in the IAR MSP430X port layer. 2011-01-13 10:28:40 +00:00
Richard Barry
6b661d03a5 Remove unnecessary calls to fflush() in MSP430X/IAR demo. 2011-01-13 10:27:06 +00:00
Richard Barry
01f4b87dba Increase the MCLK frequency to 25MHz in the IAR MSP430X demo. 2011-01-12 12:33:38 +00:00
Richard Barry
89669ae861 Increase the MCLK frequency to 25MHz in the CCS MSP430X demo. 2011-01-12 12:32:33 +00:00
Richard Barry
7676ec0b66 Make use of the .align assembler directive in the reg test asm file of the MSP430X/CCS demo. 2011-01-12 12:15:03 +00:00
Richard Barry
4b895698ca Rename the UART ISR in the MSP430X/CCS demo to match the UART actually being used. 2011-01-12 12:13:26 +00:00
Richard Barry
1b04552233 Make use of the EVEN assembler directive in the IAR MSP430X port layer. 2011-01-12 10:00:13 +00:00
Richard Barry
10bc087ef9 Make use of the EVEN assembler directive in the reg test asm file of the MSP430X/IAR demo. 2011-01-12 09:58:51 +00:00
Richard Barry
5a0782e3a8 Set the low power mode entered in the idle hook to 3 in the MSP430X/IAR demo. 2011-01-12 09:58:08 +00:00
Richard Barry
8d33f44809 Rename the UART ISR in the MSP430X/IAR demo to match the UART actually being used. 2011-01-12 09:56:56 +00:00
Richard Barry
dccbf6a271 Ensure the MSp430X IAR project only has main.c open when the workspace is opened. 2011-01-06 11:18:06 +00:00
Richard Barry
6f4805423f Set the STM32L152 compiler options to use the tiny printf formatter. 2011-01-06 11:11:43 +00:00
Richard Barry
e4f2ba1913 Introduce option that permits a smaller printf() library to be used when sizeof( int ) == sizeof( long ) in cases where formatted strings are used to present run time stats information. 2011-01-06 11:10:51 +00:00
Richard Barry
7a71523712 Replace the function that returns the current run time counter value with a macro for easier inlining. 2011-01-06 10:50:31 +00:00
Richard Barry
d493958052 Change the #error text in croutine.h only. 2011-01-06 10:49:20 +00:00
Richard Barry
95080a22f2 Introduce the portALT_GET_RUN_TIME_COUNTER_VALUE macro as an alternative to portGET_RUN_TIME_COUNTER_VALUE to make inlining of the run time stats functions easier. 2011-01-06 10:08:07 +00:00
Richard Barry
f57fa8bf72 Replace the function that returns the current run time counter value with a macro for easier inlining. 2011-01-06 10:06:09 +00:00
Richard Barry
12949b4507 Replace the function that returns the current run time counter value with a macro for easier inlining. 2011-01-06 09:55:05 +00:00
Richard Barry
25bc4acc6a Update the run time stats generation algorithm for the MSP430X IAR port. 2011-01-05 20:20:17 +00:00
Richard Barry
6331341d97 Minor formatting changes to the Keil and RVDS PSoC5 demos. 2011-01-05 14:16:28 +00:00
Richard Barry
ad3207a226 Minor formatting changes to the GCC PSoC demo. 2011-01-05 14:10:14 +00:00
Richard Barry
17e1e7dfd3 A little extra commenting added to the Cortex M3 port layers. 2011-01-05 13:36:35 +00:00
Richard Barry
3ff33205eb Added PSoC5 demo applications. 2011-01-04 17:40:27 +00:00
Richard Barry
b77d801de0 Remove the queue registry from the MSP430X CCS port as the state viewer plug in does not work in CCS. 2011-01-04 14:37:53 +00:00
Richard Barry
50cc4026db Allow the register test asm code in the CCS4 MSP430X demo to use any data model. 2011-01-04 14:36:35 +00:00
Richard Barry
20ddcce965 Allow the MSP430X IAR port layer to skip pre-loading all register values for created tasks. 2011-01-04 14:32:52 +00:00
Richard Barry
9a24d4a37f Convert the CCS4 MSP430X port layer to permit large and small data models, and large and small code models. 2011-01-03 16:48:59 +00:00
Richard Barry
2c894e0f55 Add build configurations for small data model and small code model tests to the MSP430X CCS4 demo project. 2011-01-03 16:41:42 +00:00
Richard Barry
16daa60de7 Tidy up the run time stats generation in the MSP430X IAR port. 2011-01-03 12:06:49 +00:00
Richard Barry
b41417d89b Add a small data model build configuration to the IAR MSP430X demo project. 2011-01-03 11:43:34 +00:00
Richard Barry
d195639bc1 Start to adjust to support both small and large memory models in the MSP430X IAR port layer. 2011-01-03 11:31:41 +00:00
Richard Barry
19fcd2d505 Start to adjust to support both small and large memory models in the MSP430X IAR demo. 2011-01-03 11:30:11 +00:00
Richard Barry
4059be7918 Minor updates to the MSP430X CCS4 and IAR port layers.
Change the sprintf() in prvGenerateRunTimeStatsForTasksInList() to accept unsigned long instead of unsigned int parameters so it works on 16bit devices too.
2011-01-02 18:35:52 +00:00
Richard Barry
1b96233cf1 Minor updates to the MSP430X CCS4 demo application. 2011-01-02 18:31:30 +00:00
Richard Barry
2b92b7a5d9 Minor updates to the MSP430X CCS4 demo application. 2011-01-02 18:19:12 +00:00
Richard Barry
947524522b Minor updates to the MSP430X IAR demo application. 2011-01-02 18:17:22 +00:00
Richard Barry
8d532ab4a7 Ensure that main() is always placed in low memory in the CCS4 MSP430X port. 2011-01-01 20:57:17 +00:00
Richard Barry
811413d95a Ensure that main() is always placed in low memory in the IAR MSP430X port. 2011-01-01 20:56:23 +00:00
Richard Barry
a9b61c4e00 Add warning line into the CCS4/MSP430X project to prompt the use of the CreateProjectDirectoryStructure.bat batch file. 2011-01-01 17:35:20 +00:00
Richard Barry
ab56e7ccbb Formatting only. 2011-01-01 17:24:46 +00:00
Richard Barry
304495350c Remove unnecessary ';' characters from a couple of macro definitions in the IAR MSP430X port layer. 2011-01-01 17:24:03 +00:00
Richard Barry
a6132cbbad Add MSP430X CCS4 port layer. 2011-01-01 17:23:00 +00:00
Richard Barry
2cf5546e11 Add MSP430X CCS4 demo project. 2011-01-01 17:22:05 +00:00
Richard Barry
34f15ddecd Prepare the MSP430X IAR demo for release. 2011-01-01 11:27:48 +00:00
Richard Barry
eb94f856a8 Add the debugger settings to the MSP430X IAR demo directory. 2011-01-01 09:32:55 +00:00
Richard Barry
0249ad47f4 Continue work on the MSP430X demo - still a work in progress. 2011-01-01 09:23:37 +00:00
Richard Barry
7bc73115a5 Add TI library files necessary to build MSP430X demo. Still a work in progress. 2010-12-31 18:56:23 +00:00
Richard Barry
b236356621 Continue development of the MSP430X port layer for IAR. Still a work in progress. 2010-12-31 17:55:52 +00:00
Richard Barry
b54a5232c6 Continue work on the MSP430X demo - still a work in progress. 2010-12-31 17:54:29 +00:00
Richard Barry
ae6380f70b Continue to develop the MSP430X IAR demo project - still a work in progress. 2010-12-31 14:51:15 +00:00
Richard Barry
df4e7ceba0 Continue to develop the MSP430X IAR demo project - still a work in progress. 2010-12-30 14:01:21 +00:00
Richard Barry
38055abf18 Change vTickISR() to vPortTickISR() in the MSP430X IAR port layer. 2010-12-30 14:00:30 +00:00
Richard Barry
98720fb72e Start to write the MSP430X demo. 2010-12-29 22:07:52 +00:00
Richard Barry
96e499775a Create directory to hold the MSP430X demo. 2010-12-29 22:06:46 +00:00
Richard Barry
a109f862a7 Rename a function in the STM32L demo to conform to the coding standard for private functions. 2010-12-29 22:05:28 +00:00
Richard Barry
c7a110a853 Tidy up the port layer for the MSP430X IAR port - still a work in progress. 2010-12-29 18:46:02 +00:00
Richard Barry
0a31276719 Continue development of MSP430X port. 2010-12-29 14:35:40 +00:00
Richard Barry
e7e623f853 Continue development of MSP430X port. 2010-12-28 18:40:12 +00:00
Richard Barry
b20be831b7 Start work on official MSP430X port layer for IAR. 2010-12-28 15:22:17 +00:00
Richard Barry
c83d421388 Finish the STM32L152 demo application. 2010-12-23 19:41:05 +00:00
Richard Barry
f6a1714b46 Added two missing STM32 peripheral drivers from the STM32L152 demo project. 2010-12-23 17:10:24 +00:00
Richard Barry
ecc01bdbe8 Comment and spell check the STM32L152 demo project. 2010-12-23 17:04:34 +00:00
Richard Barry
556fc15e99 Enter sleep mode in the idle task. 2010-12-23 11:24:14 +00:00
Richard Barry
52b4c95301 Complete the STM32L152 demo application functionality - it is still to be 'productionised'. 2010-12-23 11:03:07 +00:00
Richard Barry
7fd1d847fb Modify vTaskGetRunTimeStats() to ensure the current run time total is obtained from within a critical section. This allows greater flexibility in how the run time counter value is maintained. 2010-12-23 10:40:13 +00:00
Richard Barry
a67c624894 Add an cpsie i before the SVC call that starts the scheduler. This is just in case the C start up code leaves interrupts globally disabled. 2010-12-23 10:39:02 +00:00
Richard Barry
6046eea342 Allow RX YRDK demos to work with Rev1 and Rev3 boards, and with any web browser. 2010-12-22 15:18:30 +00:00
Richard Barry
7b9a3e0707 Added a few system files to the repository for the STM32L152 demo. 2010-12-21 16:34:38 +00:00
Richard Barry
9c507b93d7 Continued development on STM32L152 demo. 2010-12-21 16:09:34 +00:00
Richard Barry
7243d65797 Still updating the STM32L demo project - still a work in progress. 2010-12-20 12:14:45 +00:00
Richard Barry
d26c31e518 Still updating the STM32L demo project - still a work in progress. 2010-12-19 23:19:02 +00:00
Richard Barry
c015ea5cfe Developing STM32L152 demo - still a work in progress. 2010-12-19 20:31:41 +00:00
Richard Barry
69d1fc1a13 Starting point for the STM32L152 demo application added. Very much a work in progress. 2010-12-19 19:20:56 +00:00
Richard Barry
ed2a5c4ed0 Updated comments only on Demo/Common/Minimal/recmutex.c 2010-12-10 16:33:14 +00:00
Richard Barry
71fd1adbad Removed the nonsensical parameter from the traceTASK_CREATE_FAILED() macro in tasks.c. 2010-12-08 20:25:24 +00:00
Richard Barry
dc8f964534 Edited the #error message to remove the " marks from the middle of the string.
Used a conditional compilation around the task tag related functions to loosen the strict header file inclusion ordering.
2010-12-08 18:59:30 +00:00
Richard Barry
14dbfbb861 Removed the nonsensical parameter from the traceTASK_CREATE_FAILED() macro in tasks.c. 2010-12-08 18:58:01 +00:00
Richard Barry
5347d4fa8f Change the terminology from 'pseudo' to 'simulated' in the Win32 port layer. 2010-12-08 17:10:25 +00:00
Richard Barry
1677ec5c60 Update the Red Suite LPC1768 project and source to use the latest version of the tools. 2010-11-25 13:21:39 +00:00
Richard Barry
19cdcbd681 Delete the now obsolete syscalls.c file from the Red Suite LPC17xx demo. 2010-11-24 20:53:55 +00:00
Richard Barry
9fa197fa9c Update the CMSIS files included in the Red Suite LPC17xx demo. 2010-11-24 20:53:02 +00:00
Richard Barry
93b74b6f8d Remove the 'death' tasks from the demo as on Win2K and WinXP the behaviour of the TerminateThread() function is such that resources leak and eventually the 'death' tests will fail. 2010-11-22 16:11:16 +00:00
Richard Barry
97ce25072a Remove the 'death' tasks from the demo as on Win2K and WinXP the behaviour of the TerminateThread() function is such that resources leak and eventually the 'death' tests will fail. 2010-11-22 16:10:42 +00:00
Richard Barry
f3dbcaf725 Added in the 'death' tasks to the MingW Win32 demo. 2010-11-22 10:46:54 +00:00
Richard Barry
853250260c Added in the 'death' tasks to the Win32 MSVN demo. 2010-11-22 10:40:43 +00:00
Richard Barry
ab9bf58818 Win32 port:
Separate out the interrupt handlers into separate functions so they can be installed into the array of interrupt handlers.
Reverse the priorities of the pseudo interrupt handler and tick generate threads so the extra hand shaking event can be removed.
2010-11-22 10:38:43 +00:00
Richard Barry
0ecde20ab3 Lowered the thread priorities used by the Win32 port, and added in a method to delete tasks in the Win32 port. 2010-11-22 09:52:36 +00:00
Richard Barry
a3c26cad3d Update to MSVC Win32 demo project file. 2010-11-21 21:00:46 +00:00
Richard Barry
b09733cdfc Added the MingW/Eclipse project for the new Win32 port. 2010-11-21 20:59:57 +00:00
Richard Barry
ba18beae47 Greatly simplified the Win32 port by only allowing threads to run on a single CPU core. 2010-11-21 20:55:04 +00:00
Richard Barry
6b9379ee87 Greatly simplified the Win32 port by only allowing threads to run on a single CPU core. 2010-11-21 20:53:13 +00:00
Richard Barry
d50618f375 Remove unused definitions from the Win32 demo main.c file. 2010-11-21 14:50:43 +00:00
Richard Barry
bbcdcb0ba1 Just changed the comments only for the Win32 port.c file. 2010-11-21 14:36:36 +00:00
Richard Barry
abadea4557 Updated the Win32 MSVC demo files. 2010-11-21 14:35:36 +00:00
Richard Barry
37b6fb5773 Changed vPortCheckCorrectThreadIsRunning() in the Win32 port layer to use the Win32 thread ID rather than its handle. 2010-11-21 14:06:23 +00:00
Richard Barry
60bea08b22 Added the traceTAKE_MUTEX_RECURSIVE_FAILED() macro. 2010-11-21 11:35:48 +00:00
Richard Barry
2fc309624b Added vPortCheckCorrectThreadIsRunning() function to the Win32 port layer to trap when Windows is not running the correct thread and try and catch it. 2010-11-21 11:34:12 +00:00
Richard Barry
1ae93fbb63 Add in a missing initialisation to zero for a variable in recmutex.c. Should not really make any difference as the variable should be cleared to zero by the C start up code anyway. 2010-11-20 14:37:25 +00:00
Richard Barry
e867904a89 Remove the trace lines from the Win32 port.c. 2010-11-20 14:20:09 +00:00
Richard Barry
ab2eb016c1 Work on Win32 port layer - removing the need to store the critical section nesting count as part of the Win32 thread context. 2010-11-19 22:37:02 +00:00
Richard Barry
8133188eee Win32 port.c - working ok in co-operative mode, but pre-emptive thread scheduling still problematic. 2010-11-18 16:41:44 +00:00
Richard Barry
a49f0aa88a Spell check Win32 port.c only. 2010-11-16 10:33:50 +00:00
Richard Barry
0de50e377c Added in more demo apps to the Win32 demo. 2010-11-15 22:30:47 +00:00
Richard Barry
c30b4242bb Replace waitable timer with sleep function in Win32 port layer. 2010-11-15 22:29:28 +00:00
Richard Barry
93b07f3db7 Updated Win32 port layer so that end of interrupt events are only sent to threads that are actually waiting for them. 2010-11-15 20:23:08 +00:00
Richard Barry
9a0b608591 Start of new Win32 emulator project. Currently working but not well tested, and does not include a method for shutting down the generated processes. 2010-11-14 21:01:50 +00:00
Richard Barry
7a623479dd Start of new Win32 emulator project. Currently working but not well tested, and does not include a method for shutting down the generated processes. 2010-11-14 21:00:36 +00:00
Richard Barry
3b6ed5341f Update the IP address copy macro so it never relies on any byte alignment. 2010-11-08 21:59:23 +00:00
Richard Barry
86e6ede04c Update to FreeRTOS V6.1.0 release candidate. 2010-09-23 18:07:41 +00:00
Richard Barry
4778bd45e7 Update to FreeRTOS V6.1.0 release candidate. 2010-09-23 16:36:25 +00:00
Richard Barry
7ce7d21ca8 Allow tasks to be suspended immediately after creation - provided the scheduler is not running.
Add API function that allows the tick count to be queried from an interrupt.
2010-09-23 13:54:37 +00:00
Richard Barry
ad451e8b70 Remove the .dep file from the IAR RX project. The file should not have been included in the first place. 2010-09-23 13:41:47 +00:00
Richard Barry
fd5aeffadd Replace the hard coded interrupt priorities with the configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY definitions in the IAR RX port layer. 2010-09-23 13:39:45 +00:00
Richard Barry
bdef78d6a2 Prepare the RX GNU demo application for release. 2010-09-23 13:14:34 +00:00
Richard Barry
f352dc846b Replace the hard coded interrupt priorities with the configKERNEL_INTERRUPT_PRIORITY and configMAX_SYSCALL_INTERRUPT_PRIORITY definitions in the IAR RX port layer. 2010-09-23 13:13:26 +00:00
Richard Barry
66c1a9b76d Replace asm wrappers to interrupt handlers with functions that use the interrupt attribute. 2010-09-22 22:03:40 +00:00
Richard Barry
c92128869d Replace asm wrappers to interrupt handlers with functions that use the interrupt attribute. 2010-09-22 22:02:54 +00:00
Richard Barry
eea2ab0385 Back only. 2010-09-22 21:31:33 +00:00
Richard Barry
8c8efdcc4e Back only. 2010-09-22 21:29:57 +00:00
Richard Barry
b4d26652b9 Start process of changing project name to include RDK in its title to place of RSK. 2010-09-22 13:00:51 +00:00
Richard Barry
f4aa3f61e1 Start process of changing project name to include RDK in its title to place of RSK. 2010-09-22 12:59:42 +00:00
Richard Barry
45fad778a4 Start to iron out the mods required in switching from the RX RSK hardware to the RDK hardware. 2010-09-22 12:57:57 +00:00
Richard Barry
17add98d2f Starting point for the RX RDK version of the demo app. 2010-09-22 12:48:21 +00:00
Richard Barry
07006b001e Prepare the RSK RX demo for conversion to run on the RDK. 2010-09-22 09:25:13 +00:00
Richard Barry
828d8df74e Start to change the GNURX project name to use RSK in place of MDK. 2010-09-22 09:16:08 +00:00
Richard Barry
270a06fb9a Start to change the GNURX project name to use RSK in place of MDK. 2010-09-22 09:14:55 +00:00
Richard Barry
edfeb212ae Change the RX/GCC memory map to move the stacks further away from the .data section. 2010-09-22 08:32:22 +00:00
Richard Barry
296c1eabfc Formatting only. 2010-09-21 21:11:42 +00:00
Richard Barry
f052e7c00f When creating a task - move where the task handle is assigned to the function parameter from after the critical section. This allows the handle to be assigned to a global variable, and the global variable to be access by the task being created should the task being created execute immediately that the critical section is exited. 2010-09-21 21:10:41 +00:00
Richard Barry
1ec24e1d46 Remove possibility of having multiple definitions of DEBUG in uip_arp.c. 2010-09-21 21:06:16 +00:00
Richard Barry
b2238eb8c0 Update the RX GCC port - optimised build is working, unoptimised not. 2010-09-21 21:04:39 +00:00
Richard Barry
1c56717a0f RX GCC port - Introduce macros that perform the interrupt entry and exit manually, then move the asm code back as naked functions within the port.c file. 2010-09-20 20:02:48 +00:00
Richard Barry
0ef04cd7bd RX GCC port - Introduce macros that perform the interrupt entry and exit manually, then move the asm code back as naked functions within the port.c file. 2010-09-20 20:01:00 +00:00
Richard Barry
c788ecec17 Rename MDK to RSK for the RX ports. 2010-09-20 11:20:51 +00:00
Richard Barry
0615862c9e Temporarily revert the AVR32 port back to the V6.0.5 files. Work will continue on the reverted files following the next release. 2010-09-20 11:16:19 +00:00
Richard Barry
ef35a4aab1 Temporarily revert the AVR32 port back to the V6.0.5 files. Work will continue on the reverted files following the next release. 2010-09-20 11:11:34 +00:00
Richard Barry
18f5af7195 Temporarily revert the AVR32 port back to the V6.0.5 files. Work will continue on the reverted files following the next release. 2010-09-20 11:08:39 +00:00
Richard Barry
8f6f5820aa 2010-09-20 10:44:40 +00:00
Richard Barry
d7d63dbe77 2010-09-20 10:43:23 +00:00
Richard Barry
47354eddcb Update SAM3U project to use new flash loader settings. 2010-09-18 14:05:49 +00:00
Richard Barry
55c6e20370 Update to build with C99. 2010-09-18 13:41:28 +00:00
Richard Barry
feecfc5319 Update the definition of __inline to build with C99. 2010-09-18 13:33:52 +00:00
Richard Barry
25f980aabe Update the definition of __inline to build with C99. 2010-09-18 13:24:26 +00:00
Richard Barry
d27e63a8ca Update the definition of __inline to build with C99. 2010-09-18 13:20:52 +00:00
Richard Barry
59204f7720 Commit the RX IAR projects ready for release. 2010-09-14 15:35:38 +00:00
Richard Barry
e77c5ca723 Commit the RX Renesas/HEW projects ready for release. 2010-09-14 15:35:00 +00:00
Richard Barry
84394bf0a9 Commit the RX IAR projects ready for release. 2010-09-14 13:57:49 +00:00
Richard Barry
2a44b5641d Commit the RX IAR projects ready for release. 2010-09-14 13:48:11 +00:00
Richard Barry
0723a674f2 First version of IAR project for RX RDK added. 2010-09-13 10:39:40 +00:00
Richard Barry
5f95494dff FreeTCPIP - remove compiler warnings. 2010-09-12 21:06:00 +00:00
Richard Barry
f43bd20a6d Tidy up the RDK/Renesas/RX port to get rid of compiler warnings, and correct some of the variable naming. 2010-09-12 21:02:55 +00:00
Richard Barry
2cf67be590 Tidy up the MDK/Renesas/RX port to get rid of compiler warnings, and correct some of the variable naming. 2010-09-12 21:01:29 +00:00
Richard Barry
9c3e8b0228 Add in web server to RX/IAR demo application. 2010-09-12 20:56:04 +00:00
Richard Barry
c7fbe1d601 Some re-formatting of uip.c. 2010-09-10 18:45:22 +00:00
Richard Barry
2641267c85 Some re-formatting of uip.c. 2010-09-10 18:40:31 +00:00
Richard Barry
904e22b667 Include pack struct macros for RX architecture. 2010-09-09 19:47:24 +00:00
Richard Barry
e4c8a7957f Prepare RX RDK project for release. 2010-09-09 19:43:56 +00:00
Richard Barry
3780491aeb Prepare RX MDK project for release. 2010-09-09 18:31:16 +00:00
Richard Barry
23ca0009e3 Update the RX MDK demo to include the web server. Minor tidy up to the RDK version too. 2010-09-09 16:26:42 +00:00
Richard Barry
2fca46e3e4 Changed buffer configuration in Ethernet driver for RX RDK port. 2010-09-09 09:54:18 +00:00
Richard Barry
ccf36aeed4 Removed the critical section that was left in by mistake. Also changed the delay period while waiting for the Ethernet semaphore. Both in the RX RDK demo. 2010-09-09 09:41:52 +00:00
Richard Barry
a91ec6efe7 Updated compiler version for RX RDK demo and completed initial web server demo. Still some tidying up to do. 2010-09-09 08:39:10 +00:00
Richard Barry
a4893aed60 Start to configure the uIP demo for the RX RDK hardware. ping is working, but thus far the web server is not. 2010-09-05 20:06:30 +00:00
Richard Barry
2e0af9b6e6 Add low level Ethernet driver files to the RX RDK project. 2010-09-04 18:29:56 +00:00
Richard Barry
f14011feb3 All relating to the RX600 RDK demo - which is still a work in progress:
Change LED numbers to match silk screen.
Include Ethernet port pin configuration in HardwareSetup().
Convert EMAC.c to be correct for the RX (was based on SH2A file).
Add uIP task creation into main.c.
2010-09-04 18:20:45 +00:00
Richard Barry
817859005a Removed files/directories that were accidentally added to the wrong base directory. 2010-09-02 09:14:39 +00:00
Richard Barry
ee077a6b9a Starting point for the RDK webserver files added. 2010-09-02 09:13:14 +00:00
Richard Barry
659a27800f Starting point for the RDK webserver files added. 2010-09-02 09:06:39 +00:00
Richard Barry
0363b47c66 Correct some of the LED usage in the RX demos - where apparently two wrongs did make a right. 2010-08-31 18:14:37 +00:00
Richard Barry
a47ead46e8 Start of project for the RDK board. Not yet complete. 2010-08-31 18:11:19 +00:00
Richard Barry
bb26ea557f Some changes to the RX/Renesas main-full.c file to tidy up a bit. 2010-08-29 18:05:06 +00:00
Richard Barry
c1dca1a069 Added a critical section around the call to vTaskIncrementTick() in all the RX ports. 2010-08-29 17:57:32 +00:00
Richard Barry
9f83e74cb1 Work on the RX62N IAR demo, which is now functional. 2010-08-29 17:15:14 +00:00
Richard Barry
50b4b6619d Minor tidying up of IntQueue.c to prevent compiler warnings. No functional difference. 2010-08-29 17:13:46 +00:00
Richard Barry
5c75dd907e Update the IAR RX62N port files, which are now functional. 2010-08-29 17:12:12 +00:00
Richard Barry
a418d78163 Start point for RX62N port layer for IAR - not necessarily complete yet. 2010-08-29 14:12:05 +00:00
Richard Barry
7768a4e02c Starting point for an IAR RX62N project - not yet a working project. 2010-08-29 14:10:58 +00:00
Richard Barry
9af437a3a9 Simply tidy up the bracketing of a couple of expressions in tasks.c. 2010-08-29 07:25:09 +00:00
Richard Barry
c4217432f2 Update RX GCC port - including extracting all inline asm into separate asm file. 2010-08-29 07:24:30 +00:00
Richard Barry
23b1023a7a Remove the Renesas RX project that had the old directory name. This has been updated so the board the project uses in the name of the demo directory. 2010-08-29 07:23:06 +00:00
Richard Barry
ddf4f4eb1e Check in the RX/GCC demo for backup purposes - this is not yet a working project. 2010-08-29 07:19:34 +00:00
Richard Barry
0fcac53cf8 Continued work on the RX62N GCC demo - just a work in progress currently. 2010-08-26 16:01:58 +00:00
Richard Barry
314b692440 Create starting point for RX62N GCC port. Just a work in progress at the moment. 2010-08-26 15:59:25 +00:00
Richard Barry
1ee62d835d Create starting point for GNURX RX62N HEW project. 2010-08-25 16:06:53 +00:00
Richard Barry
8c5b77635e Add a -1 to the calculation of the compare match value. 2010-08-23 15:59:07 +00:00
Richard Barry
ac19e40336 Just tidy up the RX port files. 2010-08-22 18:28:48 +00:00
Richard Barry
a33e3b3979 Corrected comment in SH2A demo project main.c. 2010-08-22 11:46:36 +00:00
Richard Barry
4b8e4c7520 Continue development, plus add Blinky build configuration. 2010-08-22 11:45:24 +00:00
Richard Barry
cfc3911721 Changed RX project directory structure and name. 2010-08-22 08:44:51 +00:00
Richard Barry
9391d8a186 Continue development on RX port - work in progress. 2010-08-22 08:32:09 +00:00
Richard Barry
68201d2f99 Added a lot more standard demo tasks to the RX demo. 2010-08-20 19:42:40 +00:00
Richard Barry
cc7c4acf02 Added IntQueue demo/test to the RX demo. 2010-08-20 19:11:56 +00:00
Richard Barry
27683e7360 Implemented portYIELD_FROM_ISR() for RX port. 2010-08-20 19:10:42 +00:00
Richard Barry
4b3cf6221b Continue work on RX600 port - work in progress. 2010-08-18 20:36:44 +00:00
Richard Barry
810f45a61c Continue work on RX600 port - work in progress - add the actual context switch function. 2010-08-18 20:36:00 +00:00
Richard Barry
64fc1907ec Continue work on RX600 port - work in progress. 2010-08-18 13:31:12 +00:00
Richard Barry
df410c7e27 Continue work on RX600 port - work in progress. 2010-08-18 13:29:12 +00:00
Richard Barry
49c5f327fc Add new file to RX demo. 2010-08-16 10:40:33 +00:00
Richard Barry
383f0b0f2f Continue work on RX600 port - work in progress. Added the SET/CLEAR from ISR macros. 2010-08-13 17:49:15 +00:00
Richard Barry
21898cc9d9 Continue work on RX600 port - work in progress. 2010-08-13 17:38:50 +00:00
Richard Barry
6052827afe Continue work on RX600 port - work in progress. 2010-08-13 17:37:36 +00:00
Richard Barry
3e4eb6e7ae Continue work on RX600 port - work in progress. 2010-08-13 10:21:54 +00:00
Richard Barry
fc050c4ab9 Continue work on RX600 port - work in progress. 2010-08-13 07:17:30 +00:00
Richard Barry
c8e98a097e Starting point for new port - a project that will build, but as yet no implementation. 2010-08-12 13:22:25 +00:00
Richard Barry
b2929dc036 Starting point for new port - a project that will build, but as yet no implementation. 2010-08-12 13:19:52 +00:00
Richard Barry
e854ebf1f5 Just tidy up indentation in SuperH port.c. 2010-08-11 17:56:33 +00:00
Richard Barry
8f6e5062d4 Changed how the calculation of xFreeBytesRemaining is performed in the case where a block of RAM is split before being returned to the callee. 2010-07-20 18:46:12 +00:00
Richard Barry
65d501d718 Continue development of STM32 Rowley demo. 2010-07-07 11:48:04 +00:00
Richard Barry
28b5ea32a4 Add in a basic USART driver and echo test task. 2010-07-06 21:12:01 +00:00
Richard Barry
4ab0313273 Continue work on new AVR32 port and demo. 2010-06-21 14:57:05 +00:00
Richard Barry
47cfc16aa0 Add batch file that generates the local directory structure to allow the new AVR32 UC3 demo to be build using an Eclipse managed make project. 2010-06-13 17:34:45 +00:00
Richard Barry
8405dbe3d5 Create an updated AVR32 UC3A project. 2010-06-13 14:10:42 +00:00
Richard Barry
d31b403659 Create an updated AVR32 UC3A project. 2010-06-13 14:05:36 +00:00
Richard Barry
52ceb8de51 Create an updated AVR32 UC3A project. 2010-06-13 14:02:53 +00:00
Richard Barry
025b08cddf Create an updated AVR32 UC3A project. 2010-06-13 14:01:59 +00:00
Richard Barry
7bee13dfdc Removed outdated AVR32 demo. 2010-06-13 13:57:47 +00:00
Richard Barry
357f7fe56a Removed outdated AVR32 demo. 2010-06-13 13:55:37 +00:00
Richard Barry
1b2d31eac4 Removed outdated AVR32 demo. 2010-06-13 13:54:06 +00:00
Richard Barry
d09fcd3abe Removed outdated AVR32 demo. 2010-06-13 13:53:05 +00:00
Richard Barry
61dc1e332a Removed outdated AVR32 demo. 2010-06-13 13:52:31 +00:00
Richard Barry
c63be7c451 Just updated the version string #define. 2010-06-13 13:41:18 +00:00
Richard Barry
e03f239692 Work in progress - checked in for backup only. 2010-06-07 15:24:50 +00:00
Richard Barry
02db572328 Renamed ParTest.c to ParTest_MSBSTM32.c so an alternative ParTest can also be included. 2010-06-07 14:31:13 +00:00
Richard Barry
5472e527b5 Added STM32 Rowley demo. 2010-06-04 14:45:49 +00:00
Richard Barry
fa73924b8d Add Cortus port to produce V6.0.5. 2010-05-17 18:16:17 +00:00
Richard Barry
f89b22f9d1 Add Cortus port to produce V6.0.5. 2010-05-17 18:12:16 +00:00
Richard Barry
6818a478c6 Add Cortus port to produce V6.0.5. 2010-05-17 18:06:11 +00:00
Richard Barry
9a54446449 Add Cortus port to produce V6.0.5. 2010-05-17 18:00:27 +00:00
Richard Barry
c73b3dc304 Add Cortus port to produce V6.0.5. 2010-05-17 15:41:58 +00:00
Richard Barry
4a5ea9e237 Add exit() function just to prevent loads of the standard library from being included in the build. 2010-05-17 14:52:27 +00:00
Richard Barry
18d6c565e6 Corrected mistake in sample code for xCoRoutineCreate(). 2010-05-01 01:35:52 +00:00
Richard Barry
1aca141247 Update comments at head of Cortus demo files to show correct version number. 2010-03-30 13:01:00 +00:00
Richard Barry
a2b1a64ba1 Finish off the Cortus demo application:
+ Add a traceTASK_SWITCHED_OUT macro as part of the RegTest.c.
+ Add task to test the saving and restoring of the interrupt mask.
+ Change the serial port interrupt handlers to use naked functions.
2010-03-29 14:04:11 +00:00
Richard Barry
f4d8802850 Modify Cortus save and restore macros to save and restore the entire context, so as not to rely on anything the compiler is doing. 2010-03-29 14:01:36 +00:00
Richard Barry
1ae4ae2348 Deleted the commented out naked attribute. 2010-03-28 17:48:00 +00:00
Richard Barry
0821d5201e Rename the portRESTORE_CONTEXT_REDUCED macro to portRESTORE_CONTEXT. 2010-03-28 17:46:57 +00:00
Richard Barry
afe2d4fc38 Simplify the Cortus port - removing the interrupt stack and interrupt nesting capability. 2010-03-28 17:44:06 +00:00
Richard Barry
f8b7288033 Continue work on Cortus demo. 2010-03-26 20:28:19 +00:00
Richard Barry
c848059d5f Work in progress on the Cortus port. 2010-03-26 20:27:10 +00:00
Richard Barry
a671be77bf Add the regtest tasks to the Cortus demo. 2010-03-26 12:43:00 +00:00
Richard Barry
b492b7eb89 Minor formatting and name changes only. 2010-03-26 10:03:32 +00:00
Richard Barry
a93c8d6659 Add Cortus demo. 2010-03-24 11:24:21 +00:00
Richard Barry
e65ab7222c Add directory for Cortus demo. 2010-03-24 11:22:36 +00:00
Richard Barry
1aed974822 Change name of constant to match coding standard. 2010-03-24 11:06:33 +00:00
Richard Barry
0d8229a087 The start of an APS3 port. 2010-03-19 14:22:34 +00:00
Richard Barry
2596728679 Initialised xFreeBytesRemaining where it is declared so xPortGetFreeHeapSize() returns a valid value even before the heap has been initialised. 2010-03-19 09:45:12 +00:00
Richard Barry
808bb8e159 Update the V6.0.4. The primary difference being that the unsupported demos have now been removed from the download, and instead placed in their own forums. 2010-03-14 11:55:16 +00:00
Richard Barry
71b23456fd Remove log file which should not have been part of the repository. 2010-03-14 11:33:11 +00:00
Richard Barry
c4a14fc1ef Added back the Unsupported_Demos directory, but this time containing just a .txt file with a link to the page that describes how the demos can be obtained. 2010-03-14 11:27:28 +00:00
Richard Barry
3382b13855 Remove the unsupported demos directory. The files it contains are now available at http://interactive.freertos.org. 2010-03-13 20:39:49 +00:00
Richard Barry
73ee7479e4 Correct spelling in comment. 2010-03-13 20:37:16 +00:00
Richard Barry
c981185506 Very first demo for the Energy Micro EFM32 added. 2010-03-13 19:20:19 +00:00
Richard Barry
8fc041a994 Update to use V2 of the CPU support pack from Rowley. 2010-03-11 13:29:05 +00:00
Richard Barry
85e6e01995 Removed unused files. 2010-02-25 16:36:32 +00:00
Richard Barry
e262d95404 Ready for V6.0.3 release. 2010-02-25 13:41:09 +00:00
Richard Barry
ec0f5ed043 Tidy up SuperH port a bit ready for release. 2010-02-18 13:34:46 +00:00
Richard Barry
450e344455 Tidy up SuperH port a bit ready for release. 2010-02-18 13:23:00 +00:00
Richard Barry
e35180acd9 Tidy up SuperH port a bit ready for release. 2010-02-18 13:21:33 +00:00
Richard Barry
9b27b75715 Continue work on the SH2A port. 2010-02-15 17:16:38 +00:00
Richard Barry
04c48138a8 Change path to included header files so they are now included from the apps directory. 2010-02-15 17:15:10 +00:00
Richard Barry
b25f24cb75 Continue work on SH2A demo. 2010-02-15 17:13:58 +00:00
Richard Barry
0978152144 Add back in the uip_arch.h header file. 2010-02-15 14:47:29 +00:00
Richard Barry
804d39fb69 Another two header files added back having been previously removed. 2010-02-13 22:08:45 +00:00
Richard Barry
d60032cec3 Not much more than a reformatted uIP so far - this will eventually replace the FreeRTOS-uIP files. 2010-02-13 21:15:28 +00:00
Richard Barry
7c54dfea37 Add back in header file that was mistakenly removed prior to previous check in. 2010-02-13 21:01:26 +00:00
Richard Barry
90ec8c2b57 Added file required to build demo. 2010-02-13 21:00:16 +00:00
Richard Barry
92ae2d0724 Update SuperH port to include WEB server. 2010-02-13 18:57:15 +00:00
Richard Barry
bbe10cf550 Add new files to the SuperH project. 2010-02-12 15:27:07 +00:00
Richard Barry
2ce61bafdc Not to be added for the next release, so removed to avoid confusion. 2010-02-01 13:38:03 +00:00
Richard Barry
416fcd3a3d Change case of name for consistency with other lwIP directories. 2010-01-25 19:04:45 +00:00
Richard Barry
073e831bcf Added latest lwIP source. 2010-01-25 12:54:55 +00:00
Richard Barry
06c89adf1e Remove the .bak files that were accidentally added to the repository. 2010-01-24 21:05:15 +00:00
Richard Barry
61dacf99ab 2010-01-24 21:04:32 +00:00
Richard Barry
ef57fa8947 Start of new demo added. Still a long way to go. 2010-01-24 21:00:36 +00:00
Richard Barry
9849c9ccab General tidy up of SH files. 2010-01-17 16:32:43 +00:00
Richard Barry
99cc14b365 General tidy up of SH files. 2010-01-17 16:32:06 +00:00
Richard Barry
73b49130c6 Just updated comments. 2010-01-17 15:45:37 +00:00
Richard Barry
8dd9c7dfd9 Moved the definitions of pvPortMallocAligned() and pvPortFreeAligned() to freertos.h. 2010-01-17 14:22:55 +00:00
Richard Barry
ebffeb7ae4 Added flop support. 2010-01-17 13:14:23 +00:00
Richard Barry
094945625d Add flop support. 2010-01-17 13:12:54 +00:00
Richard Barry
65b947b50f Still a work in progress. Checking in for backup only. 2010-01-16 17:09:39 +00:00
Richard Barry
b75ec97ea9 Still a work in progress. Checking in for backup only. 2010-01-16 17:07:44 +00:00
Richard Barry
b60eba005a Change interrupt mask in yield function. 2010-01-16 11:40:41 +00:00
Richard Barry
559e2a850f Still a work in progress. Need to add flop support. 2010-01-15 17:20:09 +00:00
Richard Barry
188a2c0cc1 Still a work in progress. Need to add flop support. 2010-01-15 17:18:47 +00:00
Richard Barry
1aa471d0ec Work in progress. 2010-01-14 12:24:29 +00:00
Richard Barry
68074c03d6 Work in progress. 2010-01-14 12:23:07 +00:00
Richard Barry
c99f3c55cd Update to V6.0.2. 2010-01-09 14:48:45 +00:00
Richard Barry
4f59d550c6 Update to V6.0.2. 2010-01-09 14:31:39 +00:00
Richard Barry
f902211804 Update resource files for latest IAR releases. 2010-01-09 14:03:33 +00:00
Richard Barry
b016c8bfb5 Update IAR version used. 2010-01-08 19:08:53 +00:00
Richard Barry
bf9b20e6b8 Change "SWI" to "SWI 0". 2010-01-08 14:25:12 +00:00
Richard Barry
ac94fdddf1 Again, just corrected some comments. 2010-01-08 14:21:33 +00:00
Richard Barry
a3cb76d07a Corrected a comment. 2010-01-08 14:20:30 +00:00
Richard Barry
2dc8e16e68 Corrected a couple of comments. 2010-01-08 14:19:35 +00:00
Richard Barry
e170cdef52 Skeleton for new port added. 2009-12-28 15:06:11 +00:00
Richard Barry
bc0e754d87 Work in progress for backup only. 2009-12-27 22:20:42 +00:00
Richard Barry
dbb3361ed9 Start a new demo for a new SH2A port. 2009-12-27 09:55:16 +00:00
Richard Barry
0840882d46 Change PIC32 stack byte alignment from 4 to 8. 2009-12-10 18:17:37 +00:00
Richard Barry
50ab249849 Added yet another type cast to the else if clause in xTaskCheckForTimeOut. This is to ensure it works correctly on ALL 16 bit compilers (hopefully). 2009-11-23 11:18:07 +00:00
Richard Barry
0bcacda16b vTaskList() now works for architectures where the stack grows up from low memory. 2009-11-23 10:43:04 +00:00
Richard Barry
e439365343 Added configQUEUE_REGISTRY_SIZE definition. 2009-11-23 10:24:50 +00:00
Richard Barry
c0fae3b4dd Changes in the comments only. 2009-11-23 10:23:31 +00:00
Richard Barry
d41bc9028e Updated to work with the latest compiler - changed the .mac file and updated the linker script. 2009-11-22 21:38:51 +00:00
Richard Barry
9ec30de7f4 Update Cortex M3 ports to ensure 8 byte alignment. 2009-11-15 21:47:15 +00:00
Richard Barry
db87c0ac06 Correct byte alignment on CM3 port layers. 2009-11-15 15:01:59 +00:00
Richard Barry
a9625ce462 Change the function that sets up the initial stack on CM3 ports to account for the post decrement used by the MCU when it alters the stack on the way into/out of interrupts. 2009-11-14 19:02:12 +00:00
Richard Barry
a06c91fcc1 Fixed typo. 2009-11-13 20:57:51 +00:00
Richard Barry
7c09eb2da7 Correct cut and paste comment error. 2009-10-25 10:33:01 +00:00
Richard Barry
eb89065789 Update the Posix simulator to contain more features. 2009-10-15 11:59:20 +00:00
Richard Barry
a75aec78ed Correct the auto reload value. 2009-10-15 11:57:49 +00:00
Richard Barry
0db3b5c258 Correct the auto reload value. 2009-10-15 11:56:48 +00:00
Richard Barry
26bf0da04e Change to the file headers only. 2009-10-13 11:05:41 +00:00
Richard Barry
aedbbb8a5c Change to the file headers only. 2009-10-13 10:57:25 +00:00
Richard Barry
11ed4d6fba Change to the file headers only. 2009-10-13 10:54:32 +00:00
Richard Barry
7dbf3304b3 Tidy up only. 2009-10-13 09:17:39 +00:00
Richard Barry
e00afda1b1 Correct compiler warnings when a certain configuration is set in FreeRTOSConfig.h. 2009-10-13 09:12:30 +00:00
Richard Barry
8560e094f2 Formatting only. 2009-10-13 09:11:17 +00:00
Richard Barry
8bbd6c243e Place #error string in quotes. 2009-10-11 22:33:58 +00:00
Richard Barry
dc5c2a5371 Add same additional tests and demos as already in the Rowley version. 2009-10-11 22:31:20 +00:00
Richard Barry
d80bf5e055 Remove unused definitions. 2009-10-11 22:25:59 +00:00
Richard Barry
2c761c6626 Add a few more tests and demos. 2009-10-11 11:53:07 +00:00
Richard Barry
448f83eb43 Add a few more tests and demos. 2009-10-11 09:30:12 +00:00
Richard Barry
9557f14233 Add missing cast where one of the static MPU blocks are configured. 2009-10-10 18:45:46 +00:00
Richard Barry
16612fb796 Removed the needs-lock property. 2009-10-10 18:44:47 +00:00
Richard Barry
cacf4036b9 Correct type on comment. 2009-10-10 18:43:18 +00:00
Richard Barry
7c927d69d5 Add the tests performed by prvOldStyleUserModeTask(). 2009-10-10 18:41:14 +00:00
Richard Barry
9c349886af Add clobber lists to inline asm code. 2009-10-06 08:48:34 +00:00
Richard Barry
d3f5c5348c Change where the free heap space variable is initialised. 2009-10-06 08:46:22 +00:00
Richard Barry
205b0dd863 Add clobber list to asm sections to allow use with higher optimisation. 2009-10-05 20:26:11 +00:00
Richard Barry
176aafbe00 Add portBYTE_ALIGNMENT definition to PC demos. 2009-10-05 12:17:50 +00:00
Richard Barry
e90ba3e57f Add xPortGetFreeHeapSize() function. 2009-10-05 11:16:38 +00:00
Richard Barry
9468e36040 Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
2009-10-05 11:10:48 +00:00
Richard Barry
f625cf929a Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
2009-10-05 11:01:09 +00:00
Richard Barry
23a5a73219 Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
2009-10-05 10:57:40 +00:00
Richard Barry
4322b8d649 Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
2009-10-05 10:28:54 +00:00
Richard Barry
64c701aff7 Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
2009-10-05 10:23:06 +00:00
Richard Barry
7f0c4ef656 Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
2009-10-05 10:08:35 +00:00
Richard Barry
506dd1b7c8 Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
2009-10-05 09:46:11 +00:00
Richard Barry
26f0258688 Remove unnecessary use of portLONG, portCHAR and portSHORT. 2009-10-04 18:34:36 +00:00
Richard Barry
804d114420 Add PRIVILEGED_FUNCTION qualifiers to port files. 2009-10-04 18:18:32 +00:00
Richard Barry
334bd8b66c Remove files accidentally added to repository. 2009-10-04 18:01:57 +00:00
Richard Barry
ee5608ddc2 Tidy up, starting to get ready for next release. 2009-10-04 17:59:49 +00:00
Richard Barry
a7462db433 Update to fit using later Keil version. 2009-10-04 14:56:54 +00:00
Richard Barry
1b3ceba83f Just remove compiler warning. 2009-10-04 10:59:01 +00:00
Richard Barry
2b2324a7e7 Add R32C contributed port. 2009-10-04 10:08:25 +00:00
Richard Barry
8c5f57a134 Correct spelling mistake only. 2009-10-03 19:57:25 +00:00
Richard Barry
d138104369 Reinstate privileged only RAM region when a task is running that does not otherwise make use of the MPU. 2009-10-03 19:56:09 +00:00
Richard Barry
5eeea3373f First Red Suite project for FreeRTOS MPU. 2009-10-03 18:53:16 +00:00
Richard Barry
c9b5c1332a Formatting only. 2009-09-30 20:18:36 +00:00
Richard Barry
b5f93ce546 Update to latest Rowley version. 2009-09-30 20:17:17 +00:00
Richard Barry
cf717acaae First version that includes the FreeRTOS-MPU implementation. 2009-09-30 20:16:26 +00:00
Richard Barry
291ea26bfe First version that includes the FreeRTOS-MPU implementation. 2009-09-30 20:12:31 +00:00
Richard Barry
6b7397ee92 Prepare for V6. 2009-09-29 20:11:12 +00:00
Richard Barry
b7da8d7a1b Remove the portBYTE_ALIGNMENT_MASK definitions as they are now in the common portable.h file. 2009-09-29 20:07:44 +00:00
Richard Barry
ad441634f0 Allow auto switching between creating tasks in ARM mode and THUMB mode. 2009-09-29 20:03:55 +00:00
Richard Barry
afaa3321ba Allow auto switching between creating tasks in ARM mode and THUMB mode. 2009-09-29 20:03:09 +00:00
Richard Barry
b500ab8be2 Allow auto switching between creating tasks in ARM mode and THUMB mode. 2009-09-29 20:02:16 +00:00
Richard Barry
2cb1578b30 Set ARM byte alignment to 8. 2009-09-29 20:01:17 +00:00
Richard Barry
2d958d3d2c Set ARM byte alignment to 8. 2009-09-29 19:58:05 +00:00
Richard Barry
98ed4f2a20 Update for V6. 2009-09-29 19:49:54 +00:00
Richard Barry
7dacae2ae9 New file added for V6. 2009-09-29 19:40:13 +00:00
Richard Barry
c3473a1e49 Update to latest Rowley version. 2009-09-29 19:37:19 +00:00
Richard Barry
3c09399524 Ensure the user is forced to select an option through the use of a #error directive. 2009-09-29 19:34:04 +00:00
Richard Barry
1f12f80eb7 Ensure compiles using latest Yagarto. 2009-09-29 19:32:27 +00:00
Richard Barry
a961f6daa3 Just checking in a file that was automatically updated by the IDE. 2009-09-29 19:30:14 +00:00
Richard Barry
13f92818a7 Update to latest IAR version. 2009-09-29 18:19:22 +00:00
Richard Barry
bb17e05f63 Update to latest IAR version. 2009-09-29 18:18:47 +00:00
Richard Barry
a9f422ed7c Update to latest IAR version. 2009-09-29 18:14:14 +00:00
Richard Barry
b0f9c55325 Update to latest IAR version. 2009-09-29 18:13:38 +00:00
Richard Barry
87c8d2f87a Update to latest IAR version. 2009-09-29 17:46:10 +00:00
Richard Barry
b7e0d0753a Update to latest IAR version. 2009-09-29 17:29:33 +00:00
Richard Barry
46b1b9f99d Update to latest IAR version. 2009-09-29 04:55:49 +00:00
Richard Barry
c5c32913c9 Inline the asm function in the ISR wrapper. 2009-09-28 18:50:32 +00:00
Richard Barry
e30b39e09f Auto updated file by the IDE. 2009-09-28 18:25:48 +00:00
Richard Barry
00462893c9 Use noinline attribute on C portion of asm functions, increase warning level and fix warnings output by new level. 2009-09-28 18:23:17 +00:00
Richard Barry
75c6804bb1 Test with latest IAR and Keil versions. 2009-09-28 18:15:32 +00:00
Richard Barry
07990a8c0c Added a couple of extra compiler options better for use with the latest Yagarto release. 2009-09-28 18:05:54 +00:00
Richard Barry
d7ca9be54d Added a couple of extra compiler options better for use with the latest Yagarto release. 2009-09-28 18:01:57 +00:00
Richard Barry
8a6518c3b3 Test with latest IAR version. 2009-09-28 17:52:42 +00:00
Richard Barry
b04f886ebd Updated for use with latest Yagarto release. 2009-09-28 17:15:51 +00:00
Richard Barry
5f896f1640 Added CM3 MPU demo. 2009-09-28 14:26:40 +00:00
Richard Barry
4640196beb Add CM3 MPU port. 2009-09-28 14:23:45 +00:00
Richard Barry
531faedf63 Update to use the latest Yagarto and change the C handler part of the interrupt routines to use the noinline attribute. 2009-09-18 20:27:00 +00:00
Richard Barry
7ff79ca26b Update to use the latest Yagarto and change the C handler part of the interrupt routines to use the noinline attribute. 2009-09-18 14:08:36 +00:00
Richard Barry
6bdf14c33f Update to use the latest Yagarto and change the C handler part of the interrupt routines to use the noinline attribute. 2009-09-18 14:04:40 +00:00
Richard Barry
9a76bc39cb Update to use Yagarto compiler and use the noinline attribute on the serial port handler function. 2009-09-18 13:55:43 +00:00
Richard Barry
4b7c5b07c1 Correct unintended duplication and slight wording change. 2009-08-20 13:49:12 +00:00
Richard Barry
b401621a85 Correct the name of the new Cortex M3 demo directory. 2009-08-12 16:17:33 +00:00
Richard Barry
2d4ed1801b Update libdriver for Rowley demos. 2009-08-12 16:12:31 +00:00
Richard Barry
19216099d0 Add LM3Sxxx Rowley demo. 2009-08-12 16:10:55 +00:00
Richard Barry
ed06a0400a Update to V5.4.2. See http://www.freertos.org/History.txt . 2009-08-09 19:10:57 +00:00
Richard Barry
1831418ec8 Prepare for release. 2009-08-09 14:03:25 +00:00
Richard Barry
5a5be9567c Start to prepare for release. 2009-08-09 14:02:07 +00:00
Richard Barry
a4708c9fc8 Increase frequency to 99MHz. 2009-08-09 13:03:17 +00:00
Richard Barry
fb01731f41 Initial IAR LPC1768 demo. Work in progress at this point. 2009-08-09 12:19:17 +00:00
Richard Barry
87bb2c58b2 Formatting only. 2009-08-09 12:11:16 +00:00
Richard Barry
790bacc8f2 Remove compiler warnings. 2009-08-09 12:10:34 +00:00
Richard Barry
e9830a7ee3 Remove unused structure definition. 2009-08-09 12:09:18 +00:00
Richard Barry
27135c4a1c Just remove compiler warning. 2009-08-09 12:07:49 +00:00
Richard Barry
44b4467b26 Add simple USB CDC task. 2009-08-07 15:30:57 +00:00
Richard Barry
df338c84c3 Add simple USB CDC task. 2009-08-07 15:30:18 +00:00
Richard Barry
a83d9d93e8 Add a basic USB CDC example using LPCUSB. 2009-08-07 14:35:24 +00:00
Richard Barry
d2a29ece23 Update new project file. 2009-08-06 20:31:17 +00:00
Richard Barry
3f3a091728 Correct the IF EXIST part of the batch file. 2009-08-06 20:20:22 +00:00
Richard Barry
d2a9f9624b Rename Nios2 to NiosII. 2009-08-06 20:15:39 +00:00
Richard Barry
ddb7c49f3c Add batch file to create the NiosII project directory structure. 2009-08-06 20:08:34 +00:00
Richard Barry
523ffada03 Add new NiosII demo project. 2009-08-06 19:36:48 +00:00
Richard Barry
5d6acacd7a Correct spelling error in comment only. 2009-08-06 19:33:06 +00:00
Richard Barry
6358344ea1 Added new Nios2 port layer. 2009-08-06 18:23:40 +00:00
Richard Barry
3a883a776c Update to V5.4.1 2009-07-25 20:14:06 +00:00
Richard Barry
87eb48c97c Explicit casting added to the 'check for time out' function to ensure integer promotion does not occur. 2009-07-25 18:10:16 +00:00
Richard Barry
af6c245366 Decrease the configMINIMAL_STACK_SIZE setting to 190 to allow the demo to execute without running out of heap space. 2009-07-25 17:52:06 +00:00
Richard Barry
0528691833 Correct interrupt priority assignment. 2009-07-21 19:35:59 +00:00
Richard Barry
276356d9b5 Supply default setting for configUSE_MALLOC_FAILED_HOOK. 2009-07-21 17:33:02 +00:00
Richard Barry
4a1fbbca99 Added a call to vApplicationMallocFailedHook() when pvPortMalloc() returns NULL. 2009-07-21 17:25:55 +00:00
Richard Barry
7a3ac3c503 Suppress warning w6 2009-07-15 09:01:05 +00:00
Richard Barry
f312118bf9 Ensure LPC1768 demos are correct prior to V5.4.0 release. 2009-07-12 19:00:28 +00:00
Richard Barry
42f3130b20 Add #error directive to instruct people to run the batch file so that the project directory structure is configured. 2009-07-12 16:50:08 +00:00
Richard Barry
d4b8c84409 2009-07-12 16:49:14 +00:00
Richard Barry
af4a71e6b5 Move .bat file up one directory. 2009-07-12 16:19:30 +00:00
Richard Barry
f59ba6d86a Add extra files to the new LPC1768 Red Suite demo. 2009-07-12 14:46:25 +00:00
Richard Barry
e6f3fa02dc Old LPC1766 Red Suite demo is being removed as it used pre-production silicon that was a little different to the production silicon. There is now a new LPC1768 Red Suite demo in its place. 2009-07-12 14:26:33 +00:00
Richard Barry
b686daaa40 Add new LPC1768 RedSuite demo. 2009-07-12 14:23:25 +00:00
Richard Barry
09f28cb98c Add new LPC1768 RedSuite demo. 2009-07-12 14:19:52 +00:00
Richard Barry
28482990e0 Commit file deletions. 2009-07-12 14:04:30 +00:00
Richard Barry
9dace4de75 Prepare for release. 2009-07-12 14:02:12 +00:00
Richard Barry
079f9f4ee2 Add header file so it compiles with CrossWorks V2. 2009-07-09 17:55:27 +00:00
Richard Barry
b4eea4fa68 Reluctantly convert to use the CMSIS header files. 2009-07-09 14:47:02 +00:00
Richard Barry
312b19b236 Continue work on Rowley LPC1768 demo. 2009-07-09 14:46:03 +00:00
Richard Barry
ee0ff3a207 Update version number. 2009-07-07 09:58:26 +00:00
Richard Barry
fdcc3676cd Update version number. 2009-07-07 09:41:29 +00:00
Richard Barry
836860067f Update version number. 2009-07-07 09:29:47 +00:00
Richard Barry
32105816be Set to use 32bit tick variables. 2009-07-06 08:16:40 +00:00
Richard Barry
0cc071f88a Tidy up Ethernet driver. 2009-07-05 20:47:10 +00:00
Richard Barry
b92dd21bc5 Update EMAC driver. 2009-07-05 19:50:52 +00:00
Richard Barry
83c2470ead Continue work on emac driver. 2009-07-05 15:00:41 +00:00
Richard Barry
ec5827a601 Update header files to include CMSIS files. 2009-07-05 13:48:46 +00:00
Richard Barry
fe9d735641 Add Rowley LPC1768 demo. 2009-07-05 08:54:12 +00:00
Richard Barry
428dbc9342 Update some header files for use with the production standard silicon. 2009-07-05 08:48:08 +00:00
Richard Barry
f154711652 2009-07-05 08:46:49 +00:00
Richard Barry
f42b1510fa Ready the PPC440 projects for release. 2009-07-05 08:41:27 +00:00
Richard Barry
3634ebb497 Added PPC440 demo that does not use any floating point hardware. 2009-06-30 19:42:21 +00:00
Richard Barry
b49cf69600 Add Virtex5 demo that uses the single precision floating point. 2009-06-30 19:39:09 +00:00
Richard Barry
9815654538 Add Virtex5 demo that uses the double precision floating point. 2009-06-30 19:35:54 +00:00
Richard Barry
e36ece8d42 Add support for double precision floating point. 2009-06-30 19:24:32 +00:00
Richard Barry
09f991277e Add PPC440 port layer code. 2009-06-30 17:38:58 +00:00
Richard Barry
0a9fddb5d4 Add proper 8 byte alignment support. 2009-06-30 16:32:36 +00:00
Richard Barry
0b86cb1e2c New version of the Posix GCC simulator. 2009-06-22 09:15:58 +00:00
Richard Barry
f1d6aa1a06 Prepare for V5.3.1 release. 2009-06-21 19:20:26 +00:00
Richard Barry
fe1295fd25 Prepare for V5.3.1 release. 2009-06-21 19:10:37 +00:00
Richard Barry
7818ed5a97 Prepare for V5.3.1 release. 2009-06-21 19:07:47 +00:00
Richard Barry
c2e02c0488 Update to work with latest RIDE version. 2009-06-21 13:10:28 +00:00
Richard Barry
4fda9b25f3 Add local copy of the library files as the common copy has changed and breaks this build. 2009-06-21 09:39:07 +00:00
Richard Barry
303da1a725 Add new STM32 driver files. 2009-06-21 08:22:46 +00:00
Richard Barry
fb32554dc1 Add new STM32 driver files. 2009-06-21 08:22:07 +00:00
Richard Barry
f525e50307 Add STM32 Ethernet driver files. 2009-06-21 08:21:11 +00:00
Richard Barry
a5060cd1e2 New port layer files. 2009-06-20 19:53:16 +00:00
Richard Barry
e52a6e390e New STM32 demo added. 2009-06-20 18:42:08 +00:00
Richard Barry
90874f8c2e Formatting only. 2009-06-20 16:49:16 +00:00
Richard Barry
1513fb6807 Update SPI driver header to latest version. 2009-06-20 16:46:05 +00:00
Richard Barry
16434894ee New driver files for Connectivity Line. 2009-06-20 16:45:08 +00:00
Richard Barry
1f501bb518 Update SPI driver header to latest version. 2009-06-20 16:43:26 +00:00
Richard Barry
01ffe66a83 Small mod for Connectivity Line demo. 2009-06-20 16:42:28 +00:00
Richard Barry
8f26ec2474 Replaced asm statements with __asm for building with CrossWorks V2. 2009-06-20 16:39:47 +00:00
Richard Barry
c134405914 Added missing header file. 2009-06-20 16:25:14 +00:00
Richard Barry
ae23ad7395 2009-06-03 18:22:58 +00:00
Richard Barry
c0223a28fe Deleted the build files. 2009-06-01 11:48:10 +00:00
Richard Barry
151c72ab7c Add new demo files. 2009-06-01 11:45:26 +00:00
Richard Barry
b5ab3cd823 Final mods prior to release. 2009-06-01 11:41:16 +00:00
Richard Barry
c36f76a062 Add Red Suite project back in minus the workspace. 2009-05-30 19:24:07 +00:00
Richard Barry
756a1bb4ec Remove workspace from repository. 2009-05-30 19:22:23 +00:00
Richard Barry
e739c978b8 Remove the oops. 2009-05-30 16:16:12 +00:00
Richard Barry
5bb9537bef Prepare for V5.3.0 release. 2009-05-30 16:15:29 +00:00
Richard Barry
d79f029d9f Prepare for V5.3.0 release. 2009-05-30 16:14:31 +00:00
Richard Barry
5dcbec38e3 Prepare for V5.3.0 release. 2009-05-30 16:10:29 +00:00
Richard Barry
aad5dce4a1 Prepare for V5.3.0 release. 2009-05-30 15:59:59 +00:00
Richard Barry
c012651a66 Prepare for V5.3.0 release. 2009-05-30 15:56:05 +00:00
Richard Barry
4bf5521db6 Prepare for V5.3.0 release. 2009-05-30 15:51:41 +00:00
Richard Barry
f24533b765 Added xTaskGetApplicationTaskTag() function. 2009-05-30 13:30:40 +00:00
Richard Barry
1ead7d162a Add xTaskGetApplicationTaskTag() prototype. 2009-05-30 13:27:54 +00:00
Richard Barry
cae143cbbf Add portENTER_CRITICAL() macro. Previously it was an inline asm function but it needs to be a macro for portable.h to compile. 2009-05-30 13:26:38 +00:00
Richard Barry
b57e4f4c36 Change structs to unions to save a few bytes. Normally unions are against the coding standard but in this case they are permitted as their use is purely to ensure byte alignment. 2009-05-30 13:25:16 +00:00
Richard Barry
3af07deca2 Add call to xTaskGetApplicationTaskTag(), just as a test as its new and not called anywhere else. 2009-05-30 13:23:16 +00:00
Richard Barry
695eed8eb4 Added several new contributed demos. 2009-05-29 19:33:41 +00:00
Richard Barry
2ebb35d75d Add LED.c to the working set. 2009-05-29 14:39:24 +00:00
Richard Barry
9a1a7cb4d2 Add LED.c to the working set. 2009-05-29 14:35:28 +00:00
Richard Barry
5ae2d11145 Remove compiler warning. 2009-05-29 14:32:38 +00:00
Richard Barry
6003973d5e Work in progress on the LPC1766 port. 2009-05-29 14:30:24 +00:00
Richard Barry
a9a108a751 Correct typeo. 2009-05-29 08:12:46 +00:00
Richard Barry
53efcbb6c9 Updated description of the files in this directory. 2009-05-29 08:11:12 +00:00
Richard Barry
b42009def0 Work in progress. 2009-05-28 20:40:12 +00:00
Richard Barry
25194d5918 Correct page heading. 2009-05-28 20:37:49 +00:00
Richard Barry
3db39eb99d Just remove compiler warnings. 2009-05-28 20:36:59 +00:00
Richard Barry
cd7fb3fda1 Just remove compiler warnings. 2009-05-28 20:35:28 +00:00
Richard Barry
28aa468bd0 Formatting only. 2009-05-28 20:34:32 +00:00
Richard Barry
4965cdb367 Update as Eclipse decided to delete and add files. 2009-05-28 12:20:58 +00:00
Richard Barry
f626f8ce19 Update .project to latest Code Red version. 2009-05-28 12:16:46 +00:00
Richard Barry
9b2035aa90 Update .project to latest Code Red version. 2009-05-28 12:13:21 +00:00
Richard Barry
ef3795d7c0 Remove the .lock file from the repository. 2009-05-28 11:53:17 +00:00
Richard Barry
51404a713e First LPC17xx demo added. 2009-05-28 11:48:32 +00:00
Richard Barry
245bb81bc0 Moved the position of the traceTASK_DELETED() macro. 2009-05-22 15:35:40 +00:00
Richard Barry
25644cbf5d Update workspace for use with Ganymede. 2009-05-21 12:42:59 +00:00
Richard Barry
27934607e5 Updated the served WEB pages to include a page that shows the gathered task run time stats. 2009-05-21 12:29:06 +00:00
Richard Barry
1c1f614404 Added the macros necessary to gather the task run time stats information. 2009-05-21 12:27:21 +00:00
Richard Barry
2293b8ca53 Add variable to keep a count of the high frequency time tick occurrences. This is then used by the run time stats gathering macros. 2009-05-21 12:26:27 +00:00
Richard Barry
c66301ac9e Update the run time stats display function. 2009-05-21 12:23:24 +00:00
Richard Barry
8243645ac8 Corrected version number. 2009-05-21 12:20:31 +00:00
Richard Barry
8b4ef53b69 Added run time stats functions. 2009-05-19 10:38:26 +00:00
Richard Barry
886be58c58 Formatting only. 2009-05-19 10:34:57 +00:00
Richard Barry
4c232cdc4e Formatting only. 2009-05-19 10:34:04 +00:00
Richard Barry
b76158a10d Added vTaskGetRunTimeStats() prototype. 2009-05-19 10:33:12 +00:00
Richard Barry
6ed4d1d3da Add defaults for the new run time counter stats configuration constants. 2009-05-19 10:31:53 +00:00
Richard Barry
a7f134911a Just a formatting change. 2009-05-03 08:28:14 +00:00
Richard Barry
f1e278e193 Added comment to assist debugging. 2009-05-03 08:27:22 +00:00
Richard Barry
794edd476e Put in "catch all" portmacro.h include to allow the path to the correct portmacro.h file to be included as a compiler option. 2009-05-03 07:51:00 +00:00
Richard Barry
6f8158082a Remove .plg file as this is now put into the bin directory. 2009-04-27 09:17:48 +00:00
Richard Barry
515cd42702 Change project so output files go into a bin directory rather than being dumped in the project directory. 2009-04-27 09:15:19 +00:00
Richard Barry
b4eddb4992 Update to latest IAR version format. 2009-04-27 09:10:43 +00:00
Richard Barry
8395c9a633 Add queue registry so the IAR plug-in can be tested. 2009-04-27 09:06:00 +00:00
Richard Barry
da0c104de4 Update the WEB server demo. 2009-03-24 12:08:20 +00:00
Richard Barry
5af3321022 Add missing files. 2009-03-18 16:16:57 +00:00
Richard Barry
2f40ad7393 Ready for V5.2.0 release. 2009-03-14 19:20:12 +00:00
Richard Barry
975f102de9 Updated clean command to remove all object files. 2009-03-14 15:08:41 +00:00
Richard Barry
5f8b420aa5 Changed the use of critical sections to instead use scheduler locking as the BIOS functions exit with interrupts enabled no matter what the state when the BIOS function was called. 2009-03-14 15:07:06 +00:00
Richard Barry
42b60ed69c Increment the uxTaskNumber variable when a task is deleted in addition to when a task is created. This is to assist kernel aware debuggers detecting when the task list needs refreshing. 2009-03-14 15:04:44 +00:00
Richard Barry
fa9a58c9c0 Added OMAP port and demo. 2009-03-12 20:45:59 +00:00
Richard Barry
143c58e032 Minor changes to new queue functions plus add comments. 2009-03-12 11:48:24 +00:00
Richard Barry
55c96044b0 Some optimisations added. 2009-03-11 10:55:41 +00:00
Richard Barry
aaeb4790de Optimisations - being checked in for backup - not yet complete. 2009-03-11 10:53:45 +00:00
Richard Barry
dae13395ed Closed un-terminated comment. 2009-03-10 12:22:30 +00:00
Richard Barry
4f2654fb0b Closed un-terminated comment. 2009-03-10 12:21:30 +00:00
Richard Barry
a25d111613 Closed un-terminated comment. 2009-03-10 12:20:47 +00:00
Richard Barry
eb6a668a8f Bug fix - loop count value was wrong. 2009-03-06 13:13:56 +00:00
Richard Barry
d46a1e9699 Remove the NEC port as there is now a new an supported version. 2009-02-20 15:19:39 +00:00
Richard Barry
52ba0e651e Update to V5.1.2. 2009-02-09 20:21:35 +00:00
Richard Barry
2b388dacd1 Update startup file to workaround bug in IAR provided file. 2009-02-09 20:05:59 +00:00
Richard Barry
cd8c28b070 Add comtest tasks to the AT91SAM9XE demo. 2009-02-09 20:03:16 +00:00
Richard Barry
9323cea425 Continued development on NEC ports. 2009-02-07 18:20:32 +00:00
Richard Barry
fe73d24184 Add MCF52259 demo. 2009-02-07 17:52:41 +00:00
Richard Barry
8981a8539a Add hardware bug workaround for auto-negotiate errata. 2009-02-07 17:48:12 +00:00
Richard Barry
3741d47db2 Update pages served by WEB server. 2009-02-07 17:46:11 +00:00
Richard Barry
8a52afda6e Update pages served by WEB server. 2009-02-07 17:44:49 +00:00
Richard Barry
aac296a7c8 Continued development on NEC ports. 2009-02-07 17:41:36 +00:00
Richard Barry
c4a68ac620 Continued development on NEC ports. 2009-02-07 16:52:24 +00:00
Richard Barry
e31fe0ef80 Remove unnecessary semicolon. 2009-02-06 13:30:39 +00:00
Richard Barry
812e63f87f Add a trap call to test the manual context switch in addition the the pre-emptive context switch. 2009-02-06 13:28:52 +00:00
Richard Barry
223feee46c Add more comments. 2009-02-06 13:27:41 +00:00
Richard Barry
ea209490e1 Continue 78K0R development. 2009-02-06 13:25:05 +00:00
Richard Barry
4a3e471fda Continue 78K0R development. 2009-02-06 13:23:23 +00:00
Richard Barry
8c1495a57d Continue 78K0R development. 2009-02-06 13:21:35 +00:00
Richard Barry
23d63def3b Add code for near memory model. 2009-02-05 21:13:24 +00:00
Richard Barry
2d77a49535 Add code for near memory model. 2009-02-05 21:12:34 +00:00
Richard Barry
035abe8707 Add code for near memory model. 2009-02-05 21:11:24 +00:00
Richard Barry
e4319d7f88 Continue 78K0R development. 2009-02-05 13:02:27 +00:00
Richard Barry
e311bdb650 Continue 78K0R development. 2009-02-05 13:01:37 +00:00
Richard Barry
617ddbb61f Continue 78K0R development. 2009-02-05 10:40:24 +00:00
Richard Barry
c1a2e601a6 Tidy up and comment. 2009-02-04 16:53:52 +00:00
Richard Barry
bfd67da1e7 Continue 78K0R development. 2009-02-04 13:08:12 +00:00
Richard Barry
299557fed2 Continue 78K0R development. 2009-02-04 13:07:16 +00:00
Richard Barry
46425b4099 Continue 78K0R development. 2009-02-03 21:09:16 +00:00
Richard Barry
7acae9e570 Continue 78K0R development. 2009-02-03 21:07:17 +00:00
Richard Barry
eef9900e23 First pass demo for 78K0R. 2009-02-03 19:46:32 +00:00
Richard Barry
d4376e4bcc Add a little more commenting. 2009-02-03 15:21:51 +00:00
Richard Barry
c8b25f8bf2 Tidy up new port file. 2009-02-03 15:20:05 +00:00
Richard Barry
18797cb689 Change name of asm file to be consistent with other ports. 2009-02-02 18:38:48 +00:00
Richard Barry
e602554120 Renamed to remove the Fx3 from the directory name. 2009-02-01 21:03:38 +00:00
Richard Barry
33597ce971 Renamed to remove the Fx3 from the directory name. 2009-02-01 21:01:43 +00:00
Richard Barry
37402a9960 Renamed to remove the Fx3 from the directory name. 2009-02-01 20:29:36 +00:00
Richard Barry
97de395ad0 Add 78KR definition. 2009-01-31 14:48:50 +00:00
Richard Barry
7a83c44856 Tidy up and prepare for release. 2009-01-31 14:47:50 +00:00
Richard Barry
4e1b587af3 Extend FX16 functionality. 2009-01-31 14:11:22 +00:00
Richard Barry
0e91b60a7d Extend FX16 functionality. 2009-01-31 13:42:20 +00:00
Richard Barry
269de4b1e7 Extend FX16 functionality. 2009-01-31 12:56:33 +00:00
Richard Barry
46c3268670 Continue FX16 demo development. 2009-01-31 11:00:54 +00:00
Richard Barry
f88f5afa3b Continue FX16 demo development. 2009-01-31 10:31:21 +00:00
Richard Barry
d71ed5975c Continue FX16 demo development. 2009-01-30 16:28:08 +00:00
Richard Barry
d61373702a Continue FX16 demo development. 2009-01-30 14:06:37 +00:00
Richard Barry
7551ede806 New 78K0R first pass files added. 2009-01-30 10:47:35 +00:00
Richard Barry
d62f5ef24a Continued V850 development. 2009-01-30 09:26:16 +00:00
Richard Barry
667493bed2 Continued V850 development. 2009-01-29 21:27:10 +00:00
Richard Barry
4b4aecf217 Continued V850 development. 2009-01-29 21:26:43 +00:00
Richard Barry
c7ff0f4b53 Continued V850 development. 2009-01-29 21:26:10 +00:00
Richard Barry
38511e8174 Add device specific versions of LowLevelInit.c. 2009-01-29 20:33:15 +00:00
Richard Barry
1e29358197 Combine different part variants into a single port.c file. 2009-01-29 20:00:56 +00:00
Richard Barry
08464adb74 Combine different part variants into a single port.c file. 2009-01-29 19:55:14 +00:00
Richard Barry
99d615a7dd Add device specific versions of portasm.s85. 2009-01-29 19:51:11 +00:00
Richard Barry
adc5c7142b Rename to make file name more generic. 2009-01-29 17:32:19 +00:00
Richard Barry
ccb960ca8b Rename to make file name more generic. 2009-01-29 17:30:54 +00:00
Richard Barry
e2e988191c Rename to make file name more generic. 2009-01-29 17:29:10 +00:00
Richard Barry
5acfec1f7c Rename to make file name more generic. 2009-01-29 17:28:39 +00:00
Richard Barry
f1890708e1 Continued V850 development. 2009-01-29 16:23:52 +00:00
Richard Barry
4d39dfe5a0 Tidy up only. 2009-01-29 16:22:42 +00:00
Richard Barry
34333e3d27 Continued V850 development. 2009-01-29 16:21:56 +00:00
Richard Barry
77fbf587ee Continued V850 development. 2009-01-29 16:20:25 +00:00
Richard Barry
42d07bc94b Split out the processor dependent stuff from main.c. 2009-01-29 15:06:24 +00:00
Richard Barry
f622836e18 Add new port files for V850ES JJ3. 2009-01-29 14:49:47 +00:00
Richard Barry
a256024aaa Add LED output routine for the JJ3 target board. 2009-01-29 14:46:41 +00:00
Richard Barry
87253992aa Rename device specific file. 2009-01-28 17:52:25 +00:00
Richard Barry
b93186e975 Rename device specific file. 2009-01-28 17:50:49 +00:00
Richard Barry
761540892b Tidy up and comment. 2009-01-28 12:37:04 +00:00
Richard Barry
2fd4047164 Add header include. 2009-01-28 12:36:04 +00:00
Richard Barry
f5e095e34f Tidy up and comment. 2009-01-28 12:21:11 +00:00
Richard Barry
dd9ed87596 Add calls to portYIELD_FROM_ISR(). 2009-01-28 11:08:35 +00:00
Richard Barry
0adf3d96c4 Add in the portYIELD_FROM_ISR() function. 2009-01-28 11:08:01 +00:00
Richard Barry
4555f696a8 More work in progress on NEC port and demo. 2009-01-26 17:30:18 +00:00
Richard Barry
cadd182942 More work in progress on NEC port and demo. 2009-01-26 17:29:01 +00:00
Richard Barry
d811a00690 Rename file. 2009-01-23 16:50:43 +00:00
Richard Barry
9025468276 Adjust memory allocation. 2009-01-23 16:48:37 +00:00
Richard Barry
37bee0c18b Minor change so the delay automatically adjusts to the tick frequency. 2009-01-23 16:47:32 +00:00
Richard Barry
f8e9f4071b Continues work on new NEC port/demo. 2009-01-23 16:46:19 +00:00
Richard Barry
baa287be9a Correct some capitalisation issues for Linux users. 2009-01-23 08:53:40 +00:00
Richard Barry
8fa8b7c7a9 Correct some capitalisation issues for Linux users. 2009-01-23 08:51:51 +00:00
Richard Barry
5ebd915502 Formatting only. 2009-01-22 17:26:04 +00:00
Richard Barry
296514e80a Backup NEC project - still a work in progress. 2009-01-22 17:25:06 +00:00
Richard Barry
7164e04294 Add new partest files for the NEC demo. 2009-01-22 14:44:08 +00:00
Richard Barry
19e2d266b6 Renamed file. 2009-01-22 11:08:21 +00:00
Richard Barry
d92156e85a Add in V850 include file. 2009-01-22 11:03:59 +00:00
Richard Barry
f2114d04f2 New port - still a work in progress. 2009-01-22 11:02:09 +00:00
Richard Barry
395aec25ff New NEC port - work in progress. 2009-01-22 10:59:24 +00:00
Richard Barry
c1cb5dac54 Small modification to where header files are included from to make more portable. 2009-01-18 13:05:26 +00:00
Richard Barry
c87cff51c2 Added the 16FX definition. 2009-01-18 13:04:35 +00:00
Richard Barry
c10e20be42 Start of a new Fujitsu demo - still a work in progress. 2009-01-17 21:21:43 +00:00
Richard Barry
06265d2313 Small modification to where header files are included from to make more portable. 2009-01-17 21:19:18 +00:00
Richard Barry
e41454c461 Update to use the latest version of the Ride libraries. 2009-01-17 18:52:26 +00:00
Richard Barry
aee92373cf Still a work in progress. 2009-01-17 17:38:46 +00:00
Richard Barry
8d724f682d Clean up compiler warnings only. 2009-01-17 17:37:50 +00:00
Richard Barry
d94151bca7 Updated threads.js for Rowley Crossworks - thanks Glen B. 2009-01-11 13:04:03 +00:00
Richard Barry
6b8a71ba29 Add flash linker file for SAM9256XE. 2009-01-07 12:27:11 +00:00
Richard Barry
12d86511c9 Work in progress only. 2009-01-07 12:17:19 +00:00
Richard Barry
adad8eab83 Work in progress on new port - correct the configuration of the timer interrupt. 2009-01-07 11:00:48 +00:00
Richard Barry
c82aa9b224 Update to IAR V5.3. 2009-01-07 10:58:10 +00:00
Richard Barry
eefea4b753 Bug fix in port.c. 2009-01-05 09:34:57 +00:00
Richard Barry
6ee8deece7 Corrected comment - thanks Ralf A. 2008-12-23 19:25:33 +00:00
Richard Barry
441a1fec6d Minor updates only. 2008-12-06 15:02:32 +00:00
Richard Barry
a859c59080 Minor updates only. 2008-12-06 13:35:43 +00:00
Richard Barry
ea30213367 Minor updates. 2008-12-06 13:35:12 +00:00
Richard Barry
f374044a1c Update to the latest compiler version. 2008-12-03 15:09:01 +00:00
Richard Barry
5bb82e7660 Update to the latest compiler version. 2008-12-03 15:01:52 +00:00
Richard Barry
68a24a415e Add new demo. 2008-12-01 18:37:07 +00:00
Richard Barry
2f795214d7 Continued work in progress on new demo. 2008-11-28 16:08:59 +00:00
Richard Barry
c5f0933f49 Add SAM9XE definition. 2008-11-28 16:08:21 +00:00
Richard Barry
46d4beaba8 Update IRQ handler code. 2008-11-28 16:07:27 +00:00
Richard Barry
151e000be0 Continued work in progress on new demo. 2008-11-28 16:06:47 +00:00
Richard Barry
e540f0abf4 New demo being added - work in progress. 2008-11-28 15:41:07 +00:00
Richard Barry
efc8243397 Atmel provided hardware specifics. 2008-11-28 15:39:53 +00:00
Richard Barry
5e6d50864c New demo being added - work in progress. 2008-11-28 15:37:37 +00:00
Richard Barry
8471147b5a Remove erroneous comments. 2008-11-22 17:34:51 +00:00
Richard Barry
eb16fc814d Correct comment regarding the configMAX_SYSCALL_INTERRUPT_PRIORITY setting. 2008-11-21 18:37:01 +00:00
Richard Barry
f9e0da0358 Ready for V5.1.1 release. 2008-11-20 16:29:10 +00:00
Richard Barry
aa03bff58d Ready for V5.1.1 release. 2008-11-20 16:27:34 +00:00
Richard Barry
d6728eb2fc Ready for V5.1.1 release. 2008-11-20 16:21:50 +00:00
Richard Barry
e785527326 Ready for V5.1.1 release. 2008-11-20 16:18:57 +00:00
Richard Barry
57e58b25af Ready for V5.1.1 release. 2008-11-20 16:16:31 +00:00
Richard Barry
5e238dd6f4 Ready for V5.1.1 release. 2008-11-20 16:12:56 +00:00
Richard Barry
d28eda8634 Ready for V5.1.1 release. 2008-11-20 16:10:46 +00:00
Richard Barry
a9404cd88a Add in projects and debug launches. 2008-11-20 10:50:53 +00:00
Richard Barry
43bb138290 Add in projects and debug launches. 2008-11-20 10:49:39 +00:00
Richard Barry
6633583d98 Created new workspace, so far it is working but does not yet include debugger setup. 2008-11-20 10:16:22 +00:00
Richard Barry
c5991e5f68 Added back in the Coldfire MCF52233 demo with makefile, not yet including the Eclipse project. 2008-11-20 09:46:04 +00:00
Richard Barry
4e8383be43 Give up attempting to fix workspace - delete and re-create. 2008-11-20 09:23:36 +00:00
Richard Barry
5366162bcd Give up attempting to fix workspace - delete and re-create. 2008-11-20 09:22:53 +00:00
Richard Barry
2f8d10dc34 2008-11-19 22:45:13 +00:00
Richard Barry
b3f0fb2804 Remove .lock file. 2008-11-19 22:44:31 +00:00
Richard Barry
0cd598fc66 Another attempted at the f'in workspace. 2008-11-19 22:31:33 +00:00
Richard Barry
9073424aa9 Another attempted at the f'in workspace. 2008-11-19 22:29:24 +00:00
Richard Barry
ea547e79ba 2008-11-19 22:18:35 +00:00
Richard Barry
bca87dcf54 Still messing around trying to get the workspace to be distributable. 2008-11-19 22:13:03 +00:00
Richard Barry
acbdd47bee Delete MCF52233 files to revert back to older version of the workspace. 2008-11-19 22:09:15 +00:00
Richard Barry
2389e3e25a 2008-11-19 21:36:55 +00:00
Richard Barry
bee2975d02 2008-11-19 21:35:57 +00:00
Richard Barry
a5412bed75 More fiddling with the damned workspace. 2008-11-19 21:35:17 +00:00
Richard Barry
d07b337786 Reconfigure workspace. 2008-11-19 21:00:13 +00:00
Richard Barry
dbf2ff1400 Add recreated workspace. 2008-11-19 20:47:57 +00:00
Richard Barry
a35f4c69d8 Delete workspace so it can be re-created clean. 2008-11-19 20:38:32 +00:00
Richard Barry
3cfee24fe6 Attempting to get minimal .metadata for distribution. 2008-11-19 20:18:04 +00:00
Richard Barry
d5e3e282ec 2008-11-19 19:28:56 +00:00
Richard Barry
f3001b6156 2008-11-16 21:10:06 +00:00
Richard Barry
fbf1f69a10 Prepare demo for release. 2008-11-16 21:08:33 +00:00
Richard Barry
b56d2c8d6b Tidy up an comment. 2008-11-16 20:25:26 +00:00
Richard Barry
b8104d386f Delete unused files. 2008-11-16 19:30:23 +00:00
Richard Barry
89ccc31af1 Continue to develop demo. 2008-11-16 19:23:29 +00:00
Richard Barry
a520f5c7e3 Remove compiler warning. 2008-11-16 19:22:04 +00:00
Richard Barry
4b141c691e Allow the task priorities to be overwritten. 2008-11-16 19:21:25 +00:00
Richard Barry
90ac00641c Removed unwanted white space at the end of a macro continuation. 2008-11-16 17:13:55 +00:00
Richard Barry
aa8a0d04b9 Continue work on MCF52233 demo. 2008-11-16 17:12:21 +00:00
Richard Barry
18f84c805f Continue work on MCF52233 demo. 2008-11-16 17:10:27 +00:00
Richard Barry
31606543da Add faster version code. 2008-11-16 15:13:40 +00:00
Richard Barry
f7a168e184 Added JPG to be served by Coldfire WEB server. 2008-11-16 12:18:52 +00:00
Richard Barry
86ae395879 New files to be served from the ColdFire WEB server. 2008-11-16 11:18:33 +00:00
Richard Barry
5e1da95319 Added modified uIP code. 2008-11-16 10:35:36 +00:00
Richard Barry
b5777916ac Deleted obsolete files. 2008-11-16 10:33:24 +00:00
Richard Barry
59d108028b New Eclipse demo added - working but not yet completed. 2008-11-16 10:32:29 +00:00
Richard Barry
85701eb0b1 Correct version number in header. 2008-10-29 10:53:37 +00:00
Richard Barry
86a84a1477 Correct missing comment start. 2008-10-29 10:15:29 +00:00
Richard Barry
03acab14b2 Fix
https://sourceforge.net/tracker/index.php?func=detail&aid=2194064&group_id=111543&atid=659633
2008-10-29 10:11:22 +00:00
Richard Barry
b6e93f2e42 Update comments only. 2008-10-29 09:59:01 +00:00
Richard Barry
f03b362ee9 Update project to the latest IAR format. 2008-10-27 11:56:12 +00:00
Richard Barry
44b7c8b6ac Add MSP430 IAR definition. 2008-10-26 15:36:43 +00:00
Richard Barry
05167fb0f6 Update so both methods of defining interrupts can be used. 2008-10-26 15:34:32 +00:00
Richard Barry
4d302265c2 Add MSP430/IAR demo project. 2008-10-26 14:57:40 +00:00
Richard Barry
48a34c5fd1 Add IAR MSP430 port layer. 2008-10-26 14:56:06 +00:00
Richard Barry
151882a872 Replace absolute path to the asm files with the correct relative path. 2008-10-25 16:33:11 +00:00
Richard Barry
758b1c7c59 Update ready for V5.1.0 release. 2008-10-24 18:07:39 +00:00
Richard Barry
f147249a11 Remove the stale JC Wren demo as a WEB link to the latest version is now used in its place. 2008-10-24 17:53:16 +00:00
Richard Barry
f93deff134 New contributed port uploaded. 2008-10-24 17:15:03 +00:00
Richard Barry
b2303011c3 New contributed port uploaded. 2008-10-24 15:52:56 +00:00
Richard Barry
842a7244cf New unsupported port added. 2008-10-24 15:48:13 +00:00
Richard Barry
cefe46cdbe Change to use UART1. 2008-10-24 15:21:16 +00:00
Richard Barry
4c8a5cfdad Change to use UART1. 2008-10-24 15:19:35 +00:00
Richard Barry
9157e9cfef Add missing file. 2008-10-24 09:52:56 +00:00
Richard Barry
31d448cbf9 2008-10-24 07:39:06 +00:00
Richard Barry
53b376b6b8 Remove the two separate ports, instead use two demo apps that use a conditional compilation to select the method of interrupt management to use. 2008-10-23 19:16:29 +00:00
Richard Barry
a91c6302e7 Remove the two separate ports, instead use two demo apps that use a conditional compilation to select the method of interrupt management to use. 2008-10-23 19:14:45 +00:00
Richard Barry
eee1043e33 Set up to work in both ARM and THUMB modes. 2008-10-23 15:59:50 +00:00
Richard Barry
cf638edfaf Setup to work with both ARM and THUMB modes. 2008-10-23 15:58:17 +00:00
Richard Barry
8347299546 Remove demo that used the now defunct Keil compiler. 2008-10-23 11:23:13 +00:00
Richard Barry
c59af80374 Add demo for the Keil RVDS compiler. 2008-10-23 11:08:14 +00:00
Richard Barry
6ae55f3d6d Remove files that use the now defunct Keil compiler. 2008-10-23 11:06:20 +00:00
Richard Barry
ce7301b3e3 Change from using the old Keil compiler definition to the new RVDS compiler definition. 2008-10-23 11:04:23 +00:00
Richard Barry
36815b949f First ARM7 port that uses the RVDS compiler. 2008-10-23 11:03:25 +00:00
Richard Barry
cfa31e4205 Fix compiler warning only. 2008-10-21 13:28:53 +00:00
Richard Barry
6bf7776dec Continue Coldfire MCF52221 CodeWarrior demo. 2008-10-21 13:27:58 +00:00
Richard Barry
58f3f932ee First working MCF52221 demo. 2008-10-21 10:18:47 +00:00
Richard Barry
094be62ef0 Continue ColdeFire/CodeWarrior development. 2008-10-20 17:21:22 +00:00
Richard Barry
de519dd34e Update to allow low power mode to be used with the RTOS. 2008-10-19 18:52:04 +00:00
Richard Barry
549dcfa148 Add code to the idle hook to test low power mode operation. 2008-10-19 18:51:16 +00:00
Richard Barry
0463a4814b Add code to the idle hook to test low power mode operation. 2008-10-19 18:11:38 +00:00
Richard Barry
86edfb7dd4 Update ISR functions to be compliant with low power mode operation. 2008-10-19 18:10:52 +00:00
Richard Barry
518d5e538a Update to allow low power mode to be used with the RTOS. 2008-10-19 18:08:53 +00:00
Richard Barry
3c4c58dc6d Update to allow low power mode to be used with the RTOS. 2008-10-19 17:45:21 +00:00
Richard Barry
5bccc20356 Update to allow low power mode to be used with the RTOS. 2008-10-19 17:44:56 +00:00
Richard Barry
f9e47722ce Correct portSTACK_GROWTH value. 2008-10-19 11:06:38 +00:00
Richard Barry
a18e5c0bc5 Add header file back - with corrected case. 2008-10-17 14:18:36 +00:00
Richard Barry
317d2004dd Delete a header file so the case can be changed. 2008-10-17 14:17:52 +00:00
Richard Barry
5c189beb42 Correct the .bss end setting. 2008-10-17 14:16:38 +00:00
Richard Barry
60c87c8364 Removed bin files that were checked in in error. 2008-10-17 14:08:24 +00:00
Richard Barry
709b7ee223 Start of a new ColdFire/CodeWarrior demo. 2008-10-17 14:07:17 +00:00
Richard Barry
8e219f83f0 Remove some compiler warnings generated by CodeWarrior. 2008-10-17 13:23:28 +00:00
Richard Barry
285fa0420a Remove some compiler warnings generated by CodeWarrior. 2008-10-17 13:21:18 +00:00
Richard Barry
de5a4b3fb5 Added include path for V2 ColdFire/CodeWarrior. 2008-10-17 13:19:50 +00:00
Richard Barry
5e89d113be New port files for V2 ColdFire/CodeWarrior added. 2008-10-17 13:18:49 +00:00
Richard Barry
40f4287921 New file to separate out the stack checking macros which are a bit ugly to have in the main tasks.c file. 2008-10-09 00:54:10 +00:00
Richard Barry
4f631de793 Update the stack checking functions so they work for stacks that grow up from high memory (PIC24). 2008-10-09 00:53:02 +00:00
Richard Barry
c873e088bf Added JC Wren demos. 2008-09-26 09:03:58 +00:00
Richard Barry
0773e6b805 Change to use interrupt priority definitions that use shifted values from 0 to 7, rather than the full numeric value. 2008-09-24 13:09:59 +00:00
Richard Barry
e12614df23 Change to use interrupt priority definitions that use shifted values from 0 to 7, rather than the full numeric value. 2008-09-24 13:08:28 +00:00
Richard Barry
b6690dfc9a Switch from post increment to pre increment on values sent to queues. This allows the test to execute on systems where interrupt level critical sections cannot nest. 2008-09-24 13:06:39 +00:00
Richard Barry
603ec6a42b Change the force register from low to heigh. 2008-09-22 18:10:28 +00:00
Richard Barry
799cccac42 Use the low force register. 2008-09-22 18:08:29 +00:00
Richard Barry
130e2f2c0a Prepare for V5.0.4 release. 2008-09-22 15:48:40 +00:00
Richard Barry
1d0cf84e80 Change the default vector used for context switching. 2008-09-22 13:48:45 +00:00
Richard Barry
36471ef3e8 Change init value for a variable that was generating compiler warnings on one of the more pedantic compilers. 2008-09-22 13:44:31 +00:00
Richard Barry
c3a33e5e7c Improve example code for xTaskCreate(). 2008-09-22 13:43:07 +00:00
Richard Barry
10edc1088a Added extra compiler specific structure packing options. 2008-09-22 13:18:08 +00:00
Richard Barry
aa2ffbfde5 Added extra compiler specific structure packing options. 2008-09-22 13:16:59 +00:00
Richard Barry
d6ec78a568 Added extra compiler specific options. 2008-09-22 13:14:05 +00:00
Richard Barry
ed240e58a1 Add assert required for linking. 2008-09-22 13:13:03 +00:00
Richard Barry
9d1ab2c90b Change default vector number to 16. 2008-09-22 13:11:32 +00:00
Richard Barry
aa7485ab0f BUG FIX: Changed
*(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET;
to
*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
2008-09-17 16:04:31 +00:00
Richard Barry
a91d3d8afe Note to users only. 2008-09-17 16:03:42 +00:00
Richard Barry
f8abff1e04 BUG FIX: Changed
*(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET;
to
*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
2008-09-17 16:01:56 +00:00
Richard Barry
3b34009b75 Tidy up. 2008-09-17 15:58:45 +00:00
Richard Barry
223bd9c75f BUG FIX: Changed
*(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET;
to
*(portNVIC_INT_CTRL) = portNVIC_PENDSVSET;
2008-09-17 15:52:54 +00:00
Richard Barry
8e264c901e Added dummy header files to allow the Cortex uIP demo to compile. 2008-09-01 13:20:52 +00:00
Richard Barry
172114c49f Added a #error line to check that FreeRTOS.h is included before one of the subordinate header files. 2008-09-01 08:18:50 +00:00
Richard Barry
cb12d3a973 Added CodeWarrior definitions. 2008-09-01 08:08:44 +00:00
Richard Barry
0a8889d62b Change comments only. 2008-08-27 07:47:55 +00:00
Richard Barry
a36ef26b0c Add bracket where appropriate. 2008-08-15 15:59:42 +00:00
Richard Barry
8f33ce9c30 Use correct counter in reg test 2 task. 2008-08-14 13:59:59 +00:00
Richard Barry
4c0c3038cc Add cleaned up eclipse workspace. 2008-08-14 13:28:18 +00:00
Richard Barry
049459af87 Add URL to configuration pages on FreeRTOS.org site. 2008-08-14 13:19:20 +00:00
Richard Barry
5d83f61228 Documentation only. 2008-08-14 12:57:30 +00:00
Richard Barry
54dbbc3cdf Documentation only. 2008-08-14 12:55:54 +00:00
Richard Barry
be92c862be Minor mods only. 2008-08-14 11:13:34 +00:00
Richard Barry
9c2512f54e Permit no more than two simultaneous occurrences of interrupts adding everything to queues instead of tasks. 2008-08-14 11:10:46 +00:00
Richard Barry
5116051604 Remove initialisation of xQueueRegistry. 2008-08-14 11:09:26 +00:00
Richard Barry
e5d85bc87e Correct version number. 2008-08-14 11:08:36 +00:00
Richard Barry
aeea09e21e Minor changes only. 2008-08-14 11:07:50 +00:00
Richard Barry
6eec108bdd Ensure a yield cannot be pended simultaneously with a critical section being entered. 2008-08-14 11:04:54 +00:00
Richard Barry
d427489391 Tidy up. 2008-08-13 08:06:49 +00:00
Richard Barry
513b1a25e0 Use internal RAM only. 2008-08-13 08:03:47 +00:00
Richard Barry
a2bdba02ad Tidy up. 2008-08-13 08:01:54 +00:00
Richard Barry
0dffe8d801 Increase stack sizes as we now have interrupts nesting 3 deep. 2008-08-11 14:51:09 +00:00
Richard Barry
cebb479b0a Add lwIP V1.3 files. 2008-08-11 14:49:32 +00:00
Richard Barry
bfdbfce22f Add in interrupt nesting and chache support. 2008-08-10 21:19:57 +00:00
Richard Barry
60da4247dd Add interrupt nesting support, cache setup and reg test tasks. 2008-08-10 21:17:20 +00:00
Richard Barry
a943ccd85a Use internal RAM only for data. 2008-08-10 21:16:35 +00:00
Richard Barry
adf9eb9fb0 Remove white space only. 2008-08-10 21:15:14 +00:00
Richard Barry
f68aab980d Interrupt nesting and cache support added. 2008-08-10 21:14:08 +00:00
Richard Barry
53a8d172df Com test now working. 2008-08-09 10:09:21 +00:00
Richard Barry
3a8161372d Add serial test code (not yet complete). 2008-08-08 15:55:31 +00:00
Richard Barry
3ea597543a Add ColdFire definitions. 2008-08-08 15:54:05 +00:00
Richard Barry
431d1c009d Update to allow interrupt nesting (not yet complete). 2008-08-08 15:52:41 +00:00
Richard Barry
181889d6b1 Basic demo up and running. 2008-08-08 12:50:22 +00:00
Richard Barry
5ff84b9869 Basic demo up and running. 2008-08-08 12:47:06 +00:00
Richard Barry
4953c7d030 First task starting. 2008-08-08 09:41:33 +00:00
Richard Barry
3f2375c020 First task starting - woohoo! 2008-08-08 09:40:41 +00:00
Richard Barry
78d3b371fd Stubs ready for ColdFire V2 demo. 2008-08-07 19:13:15 +00:00
Richard Barry
35be76b9b7 Added function stubs. 2008-08-07 19:10:25 +00:00
Richard Barry
216fcb10c9 2008-08-07 19:03:24 +00:00
Richard Barry
5d60a388e0 2008-08-07 19:02:43 +00:00
Richard Barry
1c3c04f121 Prepare for V2 port. 2008-08-07 18:51:34 +00:00
Richard Barry
a2d86ba1fb Add in the -fno-omit-frame-pointer compiler options as a compiler bug workaround. 2008-07-31 11:01:58 +00:00
Richard Barry
16b6baf10c Update to V5.0.3. 2008-07-30 20:04:29 +00:00
Richard Barry
a1edce40d2 Add unsupported files. 2008-07-30 19:10:10 +00:00
Richard Barry
2ff6ab158f Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY test tasks. 2008-07-30 09:39:03 +00:00
Richard Barry
597fbaacde Improve efficiency even further. Introduce the configMAX_SYSCALL_INTERRUPT_PRIORITY feature. 2008-07-30 09:36:40 +00:00
Richard Barry
56d5f4ac9b Just remove a comment. 2008-07-30 09:35:03 +00:00
Richard Barry
6eed669d06 Ensure statics are handled correctly when portREMOVE_STATIC_QUALIFIER is defined. 2008-07-30 09:34:03 +00:00
Richard Barry
ae6d081ebe Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY test tasks. 2008-07-25 02:43:50 +00:00
Richard Barry
512c86194f Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY test tasks. 2008-07-25 02:42:33 +00:00
Richard Barry
8b02e015ba Improve efficiency even further. Introduce the configMAX_SYSCALL_INTERRUPT_PRIORITY feature. 2008-07-25 02:40:35 +00:00
Richard Barry
7580c6b817 Change ARM7 byte alignment to 8. 2008-07-25 02:35:50 +00:00
Richard Barry
794b6546b2 Improve efficiency even further. Introduce the configMAX_SYSCALL_INTERRUPT_PRIORITY feature. 2008-07-25 02:34:31 +00:00
Richard Barry
32592e1385 Improve efficiency even further. Introduce the configMAX_SYSCALL_INTERRUPT_PRIORITY feature. 2008-07-25 02:33:56 +00:00
Richard Barry
3ab4d1f87f Change projects to split the dsPIC and PIC24 taskYIELD implementations. 2008-07-16 10:08:24 +00:00
Richard Barry
e4c0740eaa Change projects to split the dsPIC and PIC24 taskYIELD implementations. 2008-07-16 10:07:16 +00:00
Richard Barry
5ba1afe8b5 Change projects to split the dsPIC and PIC24 taskYIELD implementations. 2008-07-16 10:06:41 +00:00
Richard Barry
b25bb7e4f5 Update project to latest MPLAB version (8?). 2008-07-16 09:58:15 +00:00
Richard Barry
619cd7a43d Update project to use the new asm file for the port yield function, and remove the "user frame pointer" optimisation option. 2008-07-16 09:55:52 +00:00
Richard Barry
3244fd67dc Change capitalization of include header. 2008-07-16 09:50:44 +00:00
Richard Barry
91805dd051 Add the queue registry config parameter. 2008-07-16 09:49:31 +00:00
Richard Barry
c3acf82f70 asm version of the yield function. Moved from port.c. 2008-07-16 09:26:22 +00:00
Richard Barry
090da3b518 Removed the manual context switch from the C file, this is now in an asm file instead. This is a workaround for a compiler bug but provides a better implementation anyway as less stack is used. 2008-07-16 09:12:54 +00:00
Richard Barry
d091cf740f Allow the static qualifier to be removed and rename a list so it does not then clash with the name used in tasks.c once the static has been removed. 2008-07-16 09:10:01 +00:00
Richard Barry
1d4e319aa7 Ensure the queue registry gets initialised. 2008-07-16 09:08:32 +00:00
Richard Barry
ea07e0b934 Correct case of include file to build on Linux. 2008-07-11 07:36:55 +00:00
Richard Barry
e72748b18f Correct case of include file to build on Linux. 2008-07-11 07:36:17 +00:00
Richard Barry
eea5d82a8f Correct case of include file to build on Linux. 2008-07-11 07:33:08 +00:00
Richard Barry
8a795bd375 Update the bInterfaceProtocol member of the descriptors to allow comms with Linux. 2008-06-25 07:15:35 +00:00
Richard Barry
7d034a24be Correct PLL setting for the defined configCPU_CLOCK_HZ setting. 2008-06-21 17:35:41 +00:00
Richard Barry
1e83961601 Update to V5.0.2 2008-05-30 15:51:35 +00:00
Richard Barry
48eff41955 Update to V5.0.2 2008-05-30 15:49:36 +00:00
Richard Barry
42ebfc5227 Update to V5.0.2 2008-05-30 15:46:57 +00:00
Richard Barry
4fcb98ef1d Update to V5.0.2 2008-05-30 15:44:17 +00:00
Richard Barry
cd38538425 Update to V5.0.2 2008-05-30 15:41:10 +00:00
Richard Barry
90064444af Update to V5.0.2 2008-05-30 15:34:42 +00:00
Richard Barry
6128d1a86e Add new PPC405 demo. 2008-05-25 17:42:25 +00:00
Richard Barry
642a74c5b4 Remove old PPC port. 2008-05-25 17:39:16 +00:00
Richard Barry
ac0630af91 Add -fno-strict-aliasing 2008-05-24 18:57:30 +00:00
Richard Barry
192cc29ebc Add usage of portREMOVE_STATIC_QUALIFIER. 2008-05-24 18:56:04 +00:00
Richard Barry
8ce7a79937 Add usage of portREMOVE_STATIC_QUALIFIER. 2008-05-24 18:52:12 +00:00
Richard Barry
576a25a098 Remove static qualifier from queue registry. 2008-05-24 18:47:38 +00:00
Richard Barry
6391f4160b Tidy up ready for release. 2008-05-24 17:03:23 +00:00
Richard Barry
4154eec4e1 Add queue registry code. 2008-05-23 19:24:05 +00:00
Richard Barry
03a82c5bc8 Add #define configQUEUE_REGISTRY_SIZE 0 2008-05-23 19:22:33 +00:00
Richard Barry
a4d3bf8f5d Add #define configQUEUE_REGISTRY_SIZE 0 2008-05-23 18:52:26 +00:00
Richard Barry
91c26c9868 Fix warnings that the latest GCC version spits out. 2008-05-23 18:51:39 +00:00
Richard Barry
ab37826715 Add in #define configQUEUE_REGISTRY_SIZE 0 2008-05-23 18:50:47 +00:00
Richard Barry
a5f3797949 Add in example vQueueAddToRegistry() calls. 2008-05-23 18:49:59 +00:00
Richard Barry
15881cdf39 Add IntQ tests. 2008-05-23 15:24:23 +00:00
Richard Barry
f689c709ab A little optimisation. 2008-05-23 15:16:25 +00:00
Richard Barry
b6aa1d6ca8 Add STM32 Keil demo. 2008-05-21 17:59:30 +00:00
Richard Barry
a87f9df3d8 ST CM3 drivers. 2008-05-21 17:56:31 +00:00
Richard Barry
bb64640f0a Change compiler optimisation. 2008-05-20 18:31:28 +00:00
Richard Barry
98ebaac850 Change optimisation level. 2008-05-20 18:30:30 +00:00
Richard Barry
b8695fa787 Change optimisation level. 2008-05-20 18:29:10 +00:00
Richard Barry
eb9d172082 Remove compiler warnings. 2008-05-20 18:27:59 +00:00
Richard Barry
0f7c3939e1 Remove compiler warnings. 2008-05-20 18:27:07 +00:00
Richard Barry
9d1b078a8f Remove compiler warnings. 2008-05-20 18:26:09 +00:00
Richard Barry
61a5a25a7f Remove compiler warnings. 2008-05-20 18:25:06 +00:00
Richard Barry
c24a713859 Remove compiler warnings. 2008-05-20 18:24:22 +00:00
Richard Barry
01ce621748 Remove compiler warnings and insert missing return statement. 2008-05-20 18:23:44 +00:00
Richard Barry
b19ede773a Add volatile qualifier to loop counters used to detect stalled tasks. 2008-05-20 05:22:35 +00:00
Richard Barry
bea704342a Ensure emulated flop is not used. 2008-05-20 05:20:25 +00:00
Richard Barry
dd1ef6a777 Remove the critical sections as not all ports can yield from within critical sections. 2008-05-19 19:19:25 +00:00
Richard Barry
2888b15b7e Add signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask ); Previously this was a private function. 2008-05-19 19:17:56 +00:00
Richard Barry
5a2790a998 Change the way the critical sections are handled within interrupts so the critical sections can be nested. 2008-05-19 19:16:57 +00:00
Richard Barry
4b9fe1e28a Add signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask ); 2008-05-19 19:15:38 +00:00
Richard Barry
fb3b17a37c Update the default macros used for critical sections within ISRs. 2008-05-19 19:12:57 +00:00
Richard Barry
b9b3e521f7 Bug fix - allocate 2 extra words at the bottom of the task stack to account for the back chain and saved LR. 2008-05-19 19:11:08 +00:00
Richard Barry
ecc072e58b Tidy up. 2008-05-18 19:57:01 +00:00
Richard Barry
66fc3b8092 Update to use the kernel critical nesting. 2008-05-18 17:28:30 +00:00
Richard Barry
f3eb5028a3 Add new test file. 2008-05-18 16:25:20 +00:00
Richard Barry
31bda54b75 Add new test file. 2008-05-18 16:23:10 +00:00
Richard Barry
f146124bca Add new test file. 2008-05-18 16:21:59 +00:00
Richard Barry
0965823a67 Update demo to include a test of nesting interrupt accessing queues. 2008-05-18 16:21:12 +00:00
Richard Barry
684b898abc Comment changes only. 2008-05-11 13:44:43 +00:00
Richard Barry
6c275b9ca5 First commit of PPC405 version with floating point included. 2008-05-11 13:43:46 +00:00
Richard Barry
ba90821242 Add in new files for floating point and updates following the installation of the service pack. 2008-05-11 13:28:25 +00:00
Richard Barry
d7e9d4d397 Upgrade hardware version numbers following install of service pack. 2008-05-11 13:25:39 +00:00
Richard Barry
d184cdc09d Added flop files. 2008-05-11 13:24:06 +00:00
Richard Barry
dc897a35dd Added optional inclusion of floating point tasks. 2008-05-11 13:19:05 +00:00
Richard Barry
45fceb4bdd Update to include the option of saving/restoring the floating point context. 2008-05-11 09:15:22 +00:00
Richard Barry
6177c6e4a4 Add in the portSET_INTERRUPT_MASK_FROM_ISR() and portCLEAR_INTERRUPT_MASK_FROM_ISR() default (empty) macros. 2008-05-07 18:02:19 +00:00
Richard Barry
5d27f3ccf7 Add in the portSET_INTERRUPT_MASK_FROM_ISR() and portCLEAR_INTERRUPT_MASK_FROM_ISR() macros. 2008-05-07 18:00:26 +00:00
Richard Barry
676139e920 Raise the priority of the serial interrupt. 2008-05-07 17:59:17 +00:00
Richard Barry
9d0e60493a Move the call to start the high frequency timer to inside a task to ensure it does not trigger before the scheduler has started. 2008-05-07 17:58:20 +00:00
Richard Barry
5a1129c315 Change the timer interrupt to use the kernel interrupt entry/exit macros. 2008-05-07 17:56:45 +00:00
Richard Barry
ad52311deb Remove the syscall calls as this is no longer how a context switch is performed. 2008-05-07 17:55:22 +00:00
Richard Barry
bd44f90e50 Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY constant. 2008-05-07 17:54:21 +00:00
Richard Barry
bafcf8901e Update to allow nesting. 2008-05-06 11:51:13 +00:00
Richard Barry
b7f66b9db6 Add the usual missing -1. 2008-05-05 08:41:25 +00:00
Richard Barry
4304c07ebf Performance improvements. 2008-05-04 20:04:52 +00:00
Richard Barry
0eae0f7549 Add nesting support. 2008-05-04 17:36:23 +00:00
Richard Barry
a9393b891d Remove inline keywords. 2008-05-01 17:16:26 +00:00
Richard Barry
3f620024fc Added code to allow a vTaskPrioritySet() caller to pass in the current TCB as well as NULL to indicate that the priority of the calling task is being changed. 2008-05-01 17:15:36 +00:00
Richard Barry
a918bd9825 Update comments for vTaskSuspendAll() "API functions that have the potential to cause a context switch (for example, vTaskDelayUntil(), xQueueSend(), etc.) must not be called while the scheduler is suspended". 2008-05-01 15:54:04 +00:00
Richard Barry
019ab1b908 Remove inline keyword. 2008-05-01 09:06:26 +00:00
Richard Barry
9c87f922b3 Remove inline keyword. 2008-05-01 08:58:48 +00:00
Richard Barry
0d29807e93 Remove inline keyword. 2008-05-01 08:57:45 +00:00
Richard Barry
b08411ec5a Correct timer calculation. 2008-04-16 16:29:28 +00:00
Richard Barry
d7ca9ad0c3 Correct comments. 2008-04-16 14:26:03 +00:00
Richard Barry
7e529c281f Update to V5.0.0. 2008-04-16 08:00:30 +00:00
Richard Barry
4c8425da01 Update to V5.0.0. 2008-04-16 07:52:16 +00:00
Richard Barry
e939542f32 Update to V5.0.0. 2008-04-16 07:47:02 +00:00
Richard Barry
57a83227d0 Remove incorrect const qualifiers. 2008-04-13 17:03:23 +00:00
Richard Barry
8ffe2b49e8 Minor tidy up. No functional difference. 2008-04-13 16:36:35 +00:00
Richard Barry
98daf5a1b8 Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:35:15 +00:00
Richard Barry
c95cae5a99 Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:34:12 +00:00
Richard Barry
dc307b270b Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:33:30 +00:00
Richard Barry
360d357e15 Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:32:41 +00:00
Richard Barry
09bfc2d862 Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:31:43 +00:00
Richard Barry
9cea94ccce Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:30:29 +00:00
Richard Barry
c1d5690da6 Remove unused assignment. 2008-04-13 16:29:40 +00:00
Richard Barry
7920c29ad1 Update to use new QueueSendFromISR() semantics. 2008-04-13 16:28:17 +00:00
Richard Barry
49c84f0d41 Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:45:58 +00:00
Richard Barry
ac58b5b285 Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:41:42 +00:00
Richard Barry
8cf6a70c9e Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:34:49 +00:00
Richard Barry
c1e9f859c8 Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:34:13 +00:00
Richard Barry
f4dd20dffc Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:32:18 +00:00
Richard Barry
7eb7201b46 Casting only. 2008-04-12 23:26:44 +00:00
Richard Barry
b24032d4b0 Efficiency improvement. 2008-04-12 23:26:01 +00:00
Richard Barry
a6053582fc Update the sys tick to be more efficient. 2008-04-12 23:25:17 +00:00
Richard Barry
af939eb0a9 Add in the configUSE_APPLICATION_TASK_HOOK macro. 2008-04-12 09:50:30 +00:00
Richard Barry
a9ed428422 Update prototypes and macros for the new xQueueSendFromISR() function and the task hook feature. 2008-04-12 09:48:40 +00:00
Richard Barry
da6d27b627 Introduce the application task hook feature. 2008-04-12 09:46:19 +00:00
Richard Barry
b73dafb1f4 Change the semantics of the xQueueGenericSendFromISR() function. 2008-04-12 09:45:02 +00:00
Richard Barry
2bc9dfa3f8 Ensure the first task starts with interrupts enabled. 2008-04-06 14:42:35 +00:00
Richard Barry
ed543197e0 Ensure the first task starts with interrupts enabled. 2008-04-06 14:41:04 +00:00
Richard Barry
24cb048892 Ensure the first task starts with interrupts enabled. 2008-04-06 14:38:27 +00:00
Richard Barry
ada4744871 Minor changes to the trace macros. 2008-04-06 09:37:26 +00:00
Richard Barry
06e8e93eb5 Added traceTASK_SWITCHED_OUT macro. 2008-04-06 09:36:48 +00:00
Richard Barry
a3677612d2 Corrected SysTick interval calculation. 2008-04-06 09:26:51 +00:00
Richard Barry
2ca3985a8c Corrected SysTick interval calculation. 2008-04-06 09:25:59 +00:00
Richard Barry
7ed94acdff Corrected SysTick interval calculation. 2008-04-06 09:25:00 +00:00
Richard Barry
cfcad6e78a Corrected prototypes for newly added functions that had the 'signed' qualifier missing. 2008-04-06 09:23:58 +00:00
Richard Barry
5cefef5074 2008-04-05 18:10:28 +00:00
Richard Barry
637619dcb7 2008-04-05 15:09:10 +00:00
Richard Barry
d1b9463e29 Changes required to build with the latest Xilinx tools. 2008-03-30 21:18:54 +00:00
Richard Barry
bc7068a690 Add PPC405 port in V10.1 format. 2008-03-30 21:15:19 +00:00
Richard Barry
c2a6dc193e Remove PPC files that are in the EDK V7 format. 2008-03-30 18:41:43 +00:00
Richard Barry
3fd422ff2f Return the lock counts to their original intended behaviour. 2008-03-29 20:50:38 +00:00
Richard Barry
9596b04eff Small mods, and update file headers. 2008-03-26 13:04:38 +00:00
Richard Barry
527fb6a907 Update version numbers to V4.8.0 2008-03-25 21:22:13 +00:00
Richard Barry
3b4545cdf6 Add extra const qualifiers and casts for linting purposes. 2008-03-25 18:30:09 +00:00
Richard Barry
8704fd145b 2008-03-24 13:01:33 +00:00
Richard Barry
343a6101c2 Correct function prototype. 2008-03-24 13:00:38 +00:00
Richard Barry
a08969154a Update to use new port layer. 2008-03-24 12:59:16 +00:00
Richard Barry
829f5cda65 Update to use new port layer. 2008-03-24 12:51:24 +00:00
Richard Barry
6ec6b4508a Update to use new port layer. 2008-03-24 12:44:23 +00:00
Richard Barry
96b7e685a7 Update to use new port layer. 2008-03-24 12:43:05 +00:00
Richard Barry
7e3a04602d Update to use new port layer. 2008-03-24 12:35:40 +00:00
Richard Barry
c366fa96f9 Update to use the new port layer. 2008-03-24 12:32:38 +00:00
Richard Barry
945ffc1a38 2008-03-24 11:51:42 +00:00
Richard Barry
998e9699f4 Update to use new port layer. 2008-03-24 11:51:09 +00:00
Richard Barry
1ef0e22ca1 Update to use new port layer. 2008-03-24 11:45:23 +00:00
Richard Barry
3d099d43f5 Update to use new port layer. 2008-03-24 11:31:41 +00:00
Richard Barry
6e9d6a2bdf Update to use new port layer. 2008-03-24 10:46:56 +00:00
Richard Barry
5024d47769 2008-03-24 10:18:07 +00:00
Richard Barry
8502ee5b1c Introduce configKERNEL_INTERRUPT_PRIORITY and make some performance optimisations. 2008-03-24 10:17:30 +00:00
Richard Barry
534d26e4ef Remove the stellaris-eabi library as the none-eabi library can be used in its place. 2008-03-23 19:04:57 +00:00
Richard Barry
0ec39d206f 2008-03-23 18:50:13 +00:00
Richard Barry
2e3f4ad506 2008-03-23 17:03:16 +00:00
Richard Barry
b593401cfe 2008-03-23 17:02:24 +00:00
Richard Barry
3686ab1dcb 2008-03-23 17:00:08 +00:00
Richard Barry
85c789dc2a Add SVC handler to startup and recursive mutexes to the list of test tasks. 2008-03-23 16:58:34 +00:00
Richard Barry
62f9bdef17 Add new config options. 2008-03-23 16:11:08 +00:00
Richard Barry
a702fc53a7 Add new config options. 2008-03-23 16:09:16 +00:00
Richard Barry
7596b7f45d Allow test to pass when there are many other tasks in the system. 2008-03-23 16:07:48 +00:00
Richard Barry
87575c5cfe Re-write the queue send and queue receive functions to improve their effect on interrupt responsiveness. 2008-03-23 16:06:45 +00:00
Richard Barry
ed28aa2046 Add critical section around xTaskCheckForTimeout() as the new queue code makes a call while the scheduler is not locked. 2008-03-23 16:00:51 +00:00
Richard Barry
5ebd39bfc9 Add utilities that can be used to query a queue from within an ISR. 2008-03-23 15:58:27 +00:00
Richard Barry
58905b6fb4 Performance optimisation. 2008-03-23 15:54:50 +00:00
Richard Barry
a8d03f24e3 Performance optimisation. 2008-03-23 15:53:37 +00:00
Richard Barry
b53d20dfd2 Remove absolute paths. 2008-03-07 18:46:56 +00:00
Richard Barry
ebfede454f Check in before attempting to remove absolute paths in PPC405 project. 2008-03-07 18:23:27 +00:00
Richard Barry
5cb4e9b5a6 Get preeprocessor working correctly. 2008-03-07 16:29:15 +00:00
Richard Barry
1217e8ce06 Get reg test tasks working correctly. 2008-03-07 16:28:32 +00:00
Richard Barry
1aecde4efd Renaming .s to .S. 2008-03-07 13:43:27 +00:00
Richard Barry
640675e76b Add -Wall option. 2008-03-07 11:14:18 +00:00
Richard Barry
6e4a303cdb Add -Wall option. 2008-03-07 11:13:41 +00:00
Richard Barry
09803ca31e Increase baud rate to 115200. 2008-03-07 11:13:02 +00:00
Richard Barry
2e76895839 Add -Wall option. 2008-03-07 11:12:17 +00:00
Richard Barry
89c922a586 Small optimisation by using constants for register addresses. 2008-03-07 11:11:27 +00:00
Richard Barry
ebe6e14f25 Add extra tests into the regtest tasks. 2008-03-07 11:10:33 +00:00
Richard Barry
ade2da38ed Clear the interrupt prior to servicing the interrupt - previously it was the other way around. 2008-03-07 11:08:10 +00:00
Richard Barry
bf5cd55c55 Comment ready for release. 2008-03-06 20:55:49 +00:00
Richard Barry
f39424feee Update commenting ready for release. 2008-03-06 16:51:57 +00:00
Richard Barry
f73e663411 Rename PPC405 to PPC405_Xilinx. 2008-03-05 12:31:04 +00:00
Richard Barry
643c94a5a8 Rename PPC405 to PPC405_Xilinx. 2008-03-05 12:24:31 +00:00
Richard Barry
7008ebb8c9 PPC405 work in progress. 2008-03-05 12:22:19 +00:00
Richard Barry
39b68e7fc5 PPC405 work in progress. 2008-03-05 12:21:46 +00:00
Richard Barry
ebcac1c4b5 PPC405 work in progress. 2008-03-05 10:13:59 +00:00
Richard Barry
8e856177c9 Modified uxTaskGetStackHighWaterMark() to take a parameter for the task to be checked, rather than just checking the stack of the calling task. 2008-03-05 10:13:18 +00:00
Richard Barry
47a7f0165b Modified uxTaskGetStackHighWaterMark() to take a parameter for the task to be checked, rather than just checking the stack of the calling task. 2008-03-05 10:12:35 +00:00
Richard Barry
6e59817356 Remove system.log from the repository. 2008-03-05 10:11:22 +00:00
Richard Barry
dab366cd77 PPC405 work in progress. 2008-03-05 10:09:38 +00:00
Richard Barry
88548253ec New PPC405 port files. 2008-03-04 08:56:32 +00:00
Richard Barry
60bead5003 Remove warnings generated by new features. 2008-03-03 21:46:29 +00:00
Richard Barry
39f6b0b5de Add stack check macros. 2008-03-03 20:56:55 +00:00
Richard Barry
71ef3153ea Add trace macros. 2008-03-03 16:32:37 +00:00
Richard Barry
b8b70528f4 Add trace macros. 2008-03-03 16:32:05 +00:00
Richard Barry
2b174e556c Add vTaskEnterCritical() and vTaskExitCritical() functions. 2008-02-25 18:54:28 +00:00
Richard Barry
ebf69dab5d More work in progress (PPC). 2008-02-25 18:53:23 +00:00
Richard Barry
9a9cd41098 Basic cooperative reg test tasks working. 2008-02-25 11:18:23 +00:00
Richard Barry
3c2306ed72 Work in progress, for backup purposes only. 2008-02-25 09:56:56 +00:00
Richard Barry
fedf9c7ba0 Add initial PPC405 files - this is a work in progress not a completed port. 2008-02-24 11:42:27 +00:00
Richard Barry
8c0260568e Add PPC definition. 2008-02-24 11:41:26 +00:00
Richard Barry
3e94695fb4 Update to V4.7.2. 2008-02-21 19:45:27 +00:00
Richard Barry
12e207f913 Remove unused project. 2008-02-19 12:44:08 +00:00
Richard Barry
1398ff5f3b Increase stack size. 2008-02-17 21:11:52 +00:00
Richard Barry
30eb33aa89 Change stack size depending on memory model. 2008-02-17 21:00:56 +00:00
Richard Barry
c8de9a1cd8 Turn watchdog on. 2008-02-17 20:27:34 +00:00
Richard Barry
280a78ac5b Still trying to sort out weird symbolic linking between two partest.c files. 2008-02-17 20:07:58 +00:00
Richard Barry
6e9b21812b 2008-02-17 20:06:24 +00:00
Richard Barry
1e95bfc6b6 2008-02-17 20:02:56 +00:00
Richard Barry
cf10f33866 2008-02-17 19:15:18 +00:00
Richard Barry
ad75bb3b77 Change optimisation level. 2008-02-17 18:33:42 +00:00
Richard Barry
4ed46aaef9 2008-02-17 18:26:52 +00:00
Richard Barry
303fb84de3 Automatically adjust trace buffer size using sizeof(). 2008-02-17 18:24:50 +00:00
Richard Barry
6bc6cc282d Tidy up 16bit Fujitsu port ready for release. 2008-02-17 18:24:03 +00:00
Richard Barry
95189f40d2 2008-02-17 18:19:21 +00:00
Richard Barry
babd7f05f7 Remove obsolete code. 2008-02-17 18:08:59 +00:00
Richard Barry
125a9ef81d Correct cut and paste asm code. 2008-02-17 18:08:09 +00:00
Richard Barry
2855dbaa43 2008-02-17 08:56:18 +00:00
Richard Barry
2f75980fca Correct merge. 2008-02-16 21:10:19 +00:00
Richard Barry
7306d9b428 Correct comments. 2008-02-15 20:10:30 +00:00
Richard Barry
c8b4248e5d Get the trace utility and co-routines working. 2008-02-15 20:08:30 +00:00
Richard Barry
91a1b614f8 Remove references to ulCriticalNesting from the register test tasks as the variable is no longer saved as part of the task context. 2008-02-15 13:46:30 +00:00
Richard Barry
79dd981500 Remove casts that were generating warnings (even though the casts were added to remove warnings with some compilers). 2008-02-15 13:44:06 +00:00
Richard Barry
61efe2504c Revert critical section handling back to the original method. 2008-02-15 13:33:44 +00:00
Richard Barry
991624461f Revert to original critical section handling method. 2008-02-15 13:24:05 +00:00
Richard Barry
f44fc2c665 Change to use the configKERNEL_INTERRUPT_PRIORITY setting. 2008-02-13 19:43:30 +00:00
Richard Barry
89d7f37094 Remove unnecessary NOPs. 2008-02-13 19:42:22 +00:00
Richard Barry
226d78fcab 2008-02-13 13:53:24 +00:00
Richard Barry
f315c91f38 Continue to tidy up Fujitsu ports. 2008-02-13 13:34:39 +00:00
Richard Barry
c6965bc253 Continue to tidy up the Fujitsu ports. 2008-02-13 13:32:10 +00:00
Richard Barry
040475fca6 2008-02-13 13:22:44 +00:00
Richard Barry
3f0ee56dbb Delete four separate configurations and replace with a single new configuration. 2008-02-13 11:45:12 +00:00
Richard Barry
bc590036e0 Delete four separate configurations and replace with a single new configuration. 2008-02-13 11:44:42 +00:00
Richard Barry
b2ec747412 Delete four separate configurations and replace with a single new configuration. 2008-02-13 11:44:13 +00:00
Richard Barry
0c6913bfab Delete four separate configurations and replace with a single new configuration. 2008-02-13 11:43:24 +00:00
Richard Barry
0fef4cbaf9 Delete four separate configurations and replace with a single new configuration. 2008-02-13 11:42:28 +00:00
Richard Barry
613c764189 Tidy up - spell check. 2008-02-13 11:15:52 +00:00
Richard Barry
5a418b56fa Tidy up - spell check. 2008-02-13 10:39:07 +00:00
Richard Barry
c3e153145b Add Fujitsu FX definition to portable.h. 2008-02-12 21:53:52 +00:00
Richard Barry
961e402e12 Add Fujitsu FX definition to portable.h. 2008-02-12 21:51:50 +00:00
Richard Barry
97bee57daa Work in progress still. 2008-02-12 21:50:24 +00:00
Richard Barry
0faf33fbca Work in progress. 2008-02-12 17:47:34 +00:00
Richard Barry
bdea62587e Work in progress. 2008-02-12 17:46:50 +00:00
Richard Barry
161e266c97 Renamed MAIN.c to main.c. 2008-02-12 17:39:23 +00:00
Richard Barry
b31c9e18f9 Work in progress. 2008-02-12 17:37:03 +00:00
Richard Barry
1eb00d2045 Extra file used by 16bit Fujitsu port. 2008-02-12 10:37:36 +00:00
Richard Barry
35afa63a47 Add Fujitsu 16bit port files. 2008-02-12 09:29:26 +00:00
Richard Barry
b4ed11bddb Add Fujitsu 16bit demo files. 2008-02-12 09:26:41 +00:00
Richard Barry
7e5450acd1 Change the critical section handling (Fujitsu 32bit port). 2008-02-11 21:02:40 +00:00
Richard Barry
eb64d935dc Update interrupt priorities for Fujitsu port. 2008-02-11 21:01:22 +00:00
Richard Barry
6610911d3e Continue to work on Fujitsu 32bit port. 2008-02-11 18:28:03 +00:00
Richard Barry
7e6a2b0bd5 Update Fujitsu port files - work in progress. 2008-02-10 20:31:19 +00:00
Richard Barry
ba4d636307 Update Fujitsu 32bit port - work in progress. 2008-02-10 20:30:11 +00:00
Richard Barry
778b0d13ef Remove qualifier from cast. 2008-02-10 20:28:55 +00:00
Richard Barry
3b1b99c0d7 2008-02-10 14:48:23 +00:00
Richard Barry
b5d4e08320 2008-02-10 14:45:24 +00:00
Richard Barry
93dd04d5dd Work in progress... 2008-02-10 14:44:30 +00:00
Richard Barry
5afe5250e5 Add softtune required directory structure. 2008-02-06 18:09:27 +00:00
Richard Barry
eed758709c Add MB91460 port and demo files. 2008-02-06 17:27:42 +00:00
Richard Barry
e6e5add7d8 Remove obsolete comment. 2008-02-06 16:49:39 +00:00
Richard Barry
7d0f249fad Correct API call used to create mutex. 2008-02-04 08:42:12 +00:00
Richard Barry
05920be92a Correct sample code for recursive mutexes. 2008-02-04 08:37:01 +00:00
3573 changed files with 1046777 additions and 32923 deletions

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
@@ -55,15 +66,20 @@
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*----------------------------------------------------------*/
*
* See http://www.freertos.org/a00110.html.
*/
/*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 66000000 ) /* = 66.000MHz clk gen */
#define configCPU_CLOCK_HZ ( ( unsigned long ) 66000000 ) /* = 66.000MHz clk gen */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 25 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 0

View File

@@ -1,32 +1,55 @@
# FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
#/*
# FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
#
#
# This file is part of the FreeRTOS.org distribution.
# ***************************************************************************
# * *
# * FreeRTOS tutorial books are available in pdf and paperback. *
# * Complete, revised, and edited pdf reference manuals are also *
# * available. *
# * *
# * Purchasing FreeRTOS documentation will not only help you, by *
# * ensuring you get running as quickly as possible and with an *
# * in-depth knowledge of how to use FreeRTOS, it will also help *
# * the FreeRTOS project to continue with its mission of providing *
# * professional grade, cross platform, de facto standard solutions *
# * for microcontrollers - completely free of charge! *
# * *
# * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
# * *
# * Thank you for using FreeRTOS, and thank you for your support! *
# * *
# ***************************************************************************
#
# FreeRTOS.org is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# FreeRTOS.org 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. See the
# GNU General Public License for more details.
# This file is part of the FreeRTOS distribution.
#
# You should have received a copy of the GNU General Public License
# along with FreeRTOS.org; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 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. See the GNU General Public License for
# more details. You should have received a copy of the GNU General Public
# License and the FreeRTOS license exception along with FreeRTOS; if not it
# can be viewed here: http://www.freertos.org/a00114.html and also obtained
# by writing to Richard Barry, contact details for whom are available on the
# FreeRTOS WEB site.
#
# A special exception to the GPL can be applied should you wish to distribute
# a combined work that includes FreeRTOS.org, without being obliged to provide
# the source code for any proprietary components. See the licensing section
# of http://www.FreeRTOS.org for full details of how and when the exception
# can be applied.
# 1 tab == 4 spaces!
#
# ***************************************************************************
# See http://www.FreeRTOS.org for documentation, latest information, license
# and contact details. Please ensure to read the configuration and relevant
# port sections of the online documentation.
# ***************************************************************************
# http://www.FreeRTOS.org - Documentation, latest information, license and
# contact details.
#
# http://www.SafeRTOS.com - A version that is certified for use in safety
# critical systems.
#
# http://www.OpenRTOS.com - Commercial support, development, porting,
# licensing and training services.
#*/
CC=arm-elf-gcc
OBJCOPY=arm-elf-objcopy
@@ -36,9 +59,10 @@ CRT0=boot.s
#
# CFLAGS common to both the THUMB and ARM mode builds
#
CFLAGS=-Wall -D $(RUN_MODE) -D GCC_AT91FR40008 -I. -I../../Source/include \
CFLAGS=-Wall -Wextra -D $(RUN_MODE) -D GCC_AT91FR40008 -I. -I../../Source/include \
-I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
-Wcast-align $(OPTIM) -fomit-frame-pointer
-Wcast-align $(OPTIM) -fomit-frame-pointer -fno-strict-aliasing \
-fno-dwarf2-cfi-asm
ifeq ($(USE_THUMB_MODE),YES)
CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
@@ -96,4 +120,6 @@ $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
clean :
touch Makefile
rm $(ARM_OBJ)
rm $(THUMB_OBJ)

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* Scheduler includes. */
@@ -53,9 +64,9 @@
#include "aic.h"
#define partstNUM_LEDS ( 8 )
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) ~(0xFFFFFFFF << partstNUM_LEDS) )
#define partstALL_OUTPUTS_OFF ( ( unsigned long ) ~(0xFFFFFFFF << partstNUM_LEDS) )
static unsigned portLONG ulLEDReg;
static unsigned long ulLEDReg;
/*-----------------------------------------------------------
* Simple parallel port IO routines.
@@ -63,7 +74,7 @@ static unsigned portLONG ulLEDReg;
static void SetLeds (unsigned int leds)
{
unsigned portLONG ulPIOSetReg, ulPIOClearReg;
unsigned long ulPIOSetReg, ulPIOClearReg;
/* LEDs are grouped in different port bits: P3-P6 and P16-P19.
A port bit set to '0' turns an LED on, '1' turns it off. */

View File

@@ -35,6 +35,12 @@ SECTIONS
*(.bss)
} >ram
. = ALIGN(4);
.eh_frame :
{
KEEP (*(.eh_frame))
} > ram
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */

View File

@@ -36,6 +36,12 @@ SECTIONS
*(.bss)
} >ram
. = ALIGN(4);
.eh_frame :
{
KEEP (*(.eh_frame))
} > ram
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -100,7 +111,7 @@
/*-----------------------------------------------------------*/
/* Constants for the ComTest tasks. */
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
#define mainCOM_TEST_LED ( 5 )
/* Priorities for the demo application tasks. */
@@ -115,10 +126,10 @@
error. */
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
#define mainON_BOARD_LED_BIT ( ( unsigned portLONG ) 7 )
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 7 )
/* Constants used by the vMemCheckTask() task. */
#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )
#define mainNO_TASK ( 0 )
/* The size of the memory blocks allocated by the vMemCheckTask() task. */
@@ -127,7 +138,7 @@ error. */
#define mainMEM_CHECK_SIZE_3 ( ( size_t ) 151 )
#define MAX_WAIT_STATES 8
static const unsigned portLONG ululCSRWaitValues[ MAX_WAIT_STATES + 1 ] =
static const unsigned long ululCSRWaitValues[ MAX_WAIT_STATES + 1 ] =
{
WaitState1,/* There is no "zero wait state" value, so use one wait state */
WaitState1,
@@ -145,7 +156,7 @@ static const unsigned portLONG ululCSRWaitValues[ MAX_WAIT_STATES + 1 ] =
* Checks that all the demo application tasks are still executing without error
* - as described at the top of the file.
*/
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount );
static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount );
/*
* The task that executes at the highest priority and calls
@@ -188,7 +199,7 @@ int main( void )
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
/* Start the check task - which is defined in this file. */
xTaskCreate( vErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* Now all the tasks have been started - start the scheduler.
@@ -207,9 +218,12 @@ int main( void )
static void vErrorChecks( void *pvParameters )
{
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
unsigned portLONG ulMemCheckTaskRunningCount;
unsigned long ulMemCheckTaskRunningCount;
xTaskHandle xCreatedTask;
/* Just to stop compiler warnings. */
( void ) pvParameters;
/* Cycle for ever, delaying then checking all the other tasks are still
operating without error. If an error is detected then the delay period
is decreased from mainNO_ERROR_FLASH_PERIOD to mainERROR_FLASH_PERIOD so
@@ -230,7 +244,7 @@ xTaskHandle xCreatedTask;
/* Dynamically create a task - passing ulMemCheckTaskRunningCount as a
parameter. */
ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE;
if( xTaskCreate( vMemCheckTask, ( signed portCHAR * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
if( xTaskCreate( vMemCheckTask, ( signed char * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
{
/* Could not create the task - we have probably run out of heap. */
xDelayPeriod = mainERROR_FLASH_PERIOD;
@@ -263,13 +277,13 @@ xTaskHandle xCreatedTask;
static void prvSetupHardware( void )
{
portLONG lCount;
long lCount;
#ifdef RUN_FROM_ROM
{
portFLOAT nsecsPerClockTick;
portLONG lNumWaitStates;
unsigned portLONG ulCSRWaitValue;
long lNumWaitStates;
unsigned long ulCSRWaitValue;
/* We are compiling to run from ROM (either on-chip or off-chip flash).
Leave the RAM/flash mapped the way they are on reset
@@ -281,7 +295,7 @@ portLONG lCount;
based on constants. But the compiler should still produce
a correct wait state register value. */
nsecsPerClockTick = ( portFLOAT ) 1000000000 / configCPU_CLOCK_HZ;
lNumWaitStates = ( portLONG )( ( configFLASH_SPEED_NSEC / nsecsPerClockTick ) + 0.5 ) - 1;
lNumWaitStates = ( long )( ( configFLASH_SPEED_NSEC / nsecsPerClockTick ) + 0.5 ) - 1;
if( lNumWaitStates < 0 )
{
@@ -338,9 +352,9 @@ portLONG lCount;
}
/*-----------------------------------------------------------*/
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount )
{
portLONG lReturn = ( portLONG ) pdPASS;
long lReturn = ( long ) pdPASS;
/* Check all the demo tasks (other than the flash tasks) to ensure
that they are all still running, and that none of them have detected
@@ -348,44 +362,44 @@ portLONG lReturn = ( portLONG ) pdPASS;
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreComTestTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xArePollingQueuesStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreMathsTaskStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE )
{
/* The vMemCheckTask did not increment the counter - it must
have failed. */
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
return lReturn;
@@ -394,9 +408,9 @@ portLONG lReturn = ( portLONG ) pdPASS;
static void vMemCheckTask( void *pvParameters )
{
unsigned portLONG *pulMemCheckTaskRunningCounter;
unsigned long *pulMemCheckTaskRunningCounter;
void *pvMem1, *pvMem2, *pvMem3;
static portLONG lErrorOccurred = pdFALSE;
static long lErrorOccurred = pdFALSE;
/* This task is dynamically created then deleted during each cycle of the
vErrorChecks task to check the operation of the memory allocator. Each time
@@ -409,7 +423,7 @@ static portLONG lErrorOccurred = pdFALSE;
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the
vErrorChecks() task that this task is still executing without error. */
pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters;
pulMemCheckTaskRunningCounter = ( unsigned long * ) pvParameters;
for( ;; )
{

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -66,7 +77,7 @@
/*-----------------------------------------------------------*/
/* Constants to setup and access the UART. */
#define portUSART0_AIC_CHANNEL ( ( unsigned portLONG ) 2 )
#define portUSART0_AIC_CHANNEL ( ( unsigned long ) 2 )
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
#define serHANDLE ( ( xComPortHandle ) 1 )
@@ -89,10 +100,10 @@ extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueu
/*-----------------------------------------------------------*/
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
unsigned portLONG ulSpeed;
unsigned portLONG ulCD;
unsigned long ulSpeed;
unsigned long ulCD;
xComPortHandle xReturn = serHANDLE;
extern void ( vUART_ISR_Wrapper )( void );
@@ -103,7 +114,7 @@ extern void ( vUART_ISR_Wrapper )( void );
if(
( xRxedChars != serINVALID_QUEUE ) &&
( xCharsForTx != serINVALID_QUEUE ) &&
( ulWantedBaud != ( unsigned portLONG ) 0 )
( ulWantedBaud != ( unsigned long ) 0 )
)
{
portENTER_CRITICAL();
@@ -174,7 +185,7 @@ extern void ( vUART_ISR_Wrapper )( void );
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
{
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
@@ -192,18 +203,19 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
}
/*-----------------------------------------------------------*/
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
{
signed portCHAR *pxNext;
signed char *pxNext;
/* NOTE: This implementation does not handle the queue being full as no
block time is used! */
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
( void ) usStringLength;
/* Send each character in the string, one at a time. */
pxNext = ( signed portCHAR * ) pcString;
pxNext = ( signed char * ) pcString;
while( *pxNext )
{
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
@@ -212,8 +224,10 @@ signed portCHAR *pxNext;
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
{
( void ) pxPort;
/* Place the character in the queue of characters to be transmitted. */
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
{
@@ -233,6 +247,7 @@ signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOut
void vSerialClose( xComPortHandle xPort )
{
/* Not supported as not required by the demo application. */
( void ) xPort;
}
/*-----------------------------------------------------------*/

View File

@@ -1,33 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
@@ -56,14 +77,14 @@
/*-----------------------------------------------------------*/
/* Constant to access the AIC. */
#define serCLEAR_AIC_INTERRUPT ( ( unsigned portLONG ) 0 )
#define serCLEAR_AIC_INTERRUPT ( ( unsigned long ) 0 )
/* Constants to determine the ISR source. */
#define serSOURCE_THRE ( ( unsigned portCHAR ) 0x02 )
#define serSOURCE_RX_TIMEOUT ( ( unsigned portCHAR ) 0x0c )
#define serSOURCE_ERROR ( ( unsigned portCHAR ) 0x06 )
#define serSOURCE_RX ( ( unsigned portCHAR ) 0x04 )
#define serINTERRUPT_SOURCE_MASK ( ( unsigned portLONG ) (US_RXRDY | US_TXRDY | US_RXBRK | US_OVRE | US_FRAME | US_PARE) )
#define serSOURCE_THRE ( ( unsigned char ) 0x02 )
#define serSOURCE_RX_TIMEOUT ( ( unsigned char ) 0x0c )
#define serSOURCE_ERROR ( ( unsigned char ) 0x06 )
#define serSOURCE_RX ( ( unsigned char ) 0x04 )
#define serINTERRUPT_SOURCE_MASK ( ( unsigned long ) (US_RXRDY | US_TXRDY | US_RXBRK | US_OVRE | US_FRAME | US_PARE) )
/* Queues used to hold received characters, and characters waiting to be
transmitted. */
@@ -78,14 +99,14 @@ void vUART_ISR_Wrapper( void ) __attribute__ ((naked));
/* The ISR function that actually performs the work. This must be separate
from the wrapper to ensure the correct stack frame is set up. */
void vUART_ISR_Handler( void );
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
/*-----------------------------------------------------------*/
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )
{
/* Create the queues used to hold Rx and Tx characters. */
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
/* Pass back a reference to the queues so the serial API file can
post/receive characters. */
@@ -101,7 +122,7 @@ void vUART_ISR_Wrapper( void )
/* Call the handler. This must be a separate function to ensure the
stack frame is correctly set up. */
vUART_ISR_Handler();
__asm volatile( "bl vUART_ISR_Handler" );
/* Restore the context of whichever task will run next. */
portRESTORE_CONTEXT();
@@ -111,9 +132,9 @@ void vUART_ISR_Wrapper( void )
void vUART_ISR_Handler( void )
{
/* Now we can declare the local variables. These must be static. */
signed portCHAR cChar;
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
unsigned portLONG ulStatus;
signed char cChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
unsigned long ulStatus;
/* What caused the interrupt? */
ulStatus = AT91C_BASE_US0->US_CSR & AT91C_BASE_US0->US_IMR;
@@ -122,7 +143,7 @@ unsigned portLONG ulStatus;
{
/* The interrupt was caused by the THR becoming empty. Are there any
more characters to transmit? */
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
{
/* A character was retrieved from the queue so can be sent to the
THR now. */
@@ -140,10 +161,7 @@ unsigned portLONG ulStatus;
/* The interrupt was caused by the receiver getting data. */
cChar = AT91C_BASE_US0->US_RHR;
if (xQueueSendFromISR(xRxedChars, &cChar, pdFALSE))
{
xTaskWokenByRx = pdTRUE;
}
xQueueSendFromISR(xRxedChars, &cChar, &xHigherPriorityTaskWoken);
}
/* Acknowledge the interrupt at AIC level... */
@@ -153,7 +171,7 @@ unsigned portLONG ulStatus;
ensure that the unblocked task is the task that executes when the interrupt
completes if the unblocked task has a priority higher than the interrupted
task. */
if( xTaskWokenByTx || xTaskWokenByRx )
if( xHigherPriorityTaskWoken )
{
portYIELD_FROM_ISR();
}

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
@@ -53,16 +64,18 @@
* application requirements.
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*----------------------------------------------------------*/
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
-----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 47923200 )
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 100 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 0

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#include "FreeRTOS.h"
@@ -48,7 +59,7 @@
* Simple parallel port IO routines for the LED's.
*-----------------------------------------------------------*/
const unsigned portLONG led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
const unsigned long led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
void vParTestInitialise( void )
{

View File

@@ -17,7 +17,7 @@
#define Board_h
#include "AT91SAM7S64.h"
#define __inline inline
#define __inline static inline
#include "lib_AT91SAM7S64.h"
#define true -1

View File

@@ -1,55 +1,66 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
Sample interrupt driven USB device driver. This is a minimal implementation
Sample interrupt driven USB device driver. This is a minimal implementation
for demonstration only. Although functional, it is not a full and compliant
implementation.
implementation.
The USB device enumerates as a simple 3 axis joystick, and once configured
transmits 3 axis of data which can be viewed from the USB host machine.
This file implements the USB interrupt service routine, and a demo FreeRTOS
task. The interrupt service routine handles the USB hardware - taking a
This file implements the USB interrupt service routine, and a demo FreeRTOS
task. The interrupt service routine handles the USB hardware - taking a
snapshot of the USB status at the point of the interrupt. The task receives
the status information from the interrupt for processing at the task level.
@@ -60,7 +71,7 @@
Changes from V2.5.5
+ Descriptors that have a length that is an exact multiple of usbFIFO_LENGTH
can now be transmitted. To this end an extra parameter has been
can now be transmitted. To this end an extra parameter has been
added to the prvSendControlData() function, and the state
eSENDING_EVEN_DESCRIPTOR has been introduced. Thanks to Scott Miller for
assisting with this contribution.
@@ -120,7 +131,7 @@
#define usbINTERFACE_STRING ( 4 )
/* Data indexes for reading the request from the xISRStatus.ucFifoData[]
into xUSB_REQUEST. The data order is designed for speed - so looks a
into xUSB_REQUEST. The data order is designed for speed - so looks a
little odd. */
#define usbREQUEST_TYPE_INDEX ( 7 )
#define usbREQUEST_INDEX ( 6 )
@@ -134,7 +145,7 @@ little odd. */
/* Misc application definitions. */
#define usbINTERRUPT_PRIORITY ( 3 )
#define usbQUEUE_LENGTH ( 0x3 ) /* Must have all bits set! */
#define usbFIFO_LENGTH ( ( unsigned portLONG ) 8 )
#define usbFIFO_LENGTH ( ( unsigned long ) 8 )
#define usbEND_POINT_0 ( 0 )
#define usbEND_POINT_1 ( 1 )
#define usbXUP ( 1 )
@@ -143,14 +154,14 @@ little odd. */
#define usbYDOWN ( 4 )
#define usbMAX_COORD ( 120 )
#define usbMAX_TX_MESSAGE_SIZE ( 128 )
#define usbRX_COUNT_MASK ( ( unsigned portLONG ) 0x7ff )
#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff )
#define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR
#define usbSHORTEST_DELAY ( ( portTickType ) 1 )
#define usbINIT_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )
#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )
#define usbEND_POINT_RESET_MASK ( ( unsigned portLONG ) 0x0f )
#define usbDATA_INC ( ( portCHAR ) 5 )
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned portLONG ) 8 )
#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )
#define usbDATA_INC ( ( char ) 5 )
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )
/* Control request types. */
#define usbSTANDARD_DEVICE_REQUEST ( 0 )
@@ -163,19 +174,19 @@ little odd. */
/* Structure used to take a snapshot of the USB status from within the ISR. */
typedef struct X_ISR_STATUS
{
unsigned portLONG ulISR;
unsigned portLONG ulCSR0;
unsigned portCHAR ucFifoData[ 8 ];
unsigned long ulISR;
unsigned long ulCSR0;
unsigned char ucFifoData[ 8 ];
} xISRStatus;
/* Structure used to hold the received requests. */
typedef struct
typedef struct
{
unsigned portCHAR ucReqType;
unsigned portCHAR ucRequest;
unsigned portSHORT usValue;
unsigned portSHORT usIndex;
unsigned portSHORT usLength;
unsigned char ucReqType;
unsigned char ucRequest;
unsigned short usValue;
unsigned short usIndex;
unsigned short usLength;
} xUSB_REQUEST;
typedef enum
@@ -191,14 +202,14 @@ typedef enum
/* Structure used to control the data being sent to the host. */
typedef struct
{
unsigned portCHAR ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
unsigned portLONG ulNextCharIndex;
unsigned portLONG ulTotalDataLength;
unsigned char ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
unsigned long ulNextCharIndex;
unsigned long ulTotalDataLength;
} xTX_MESSAGE;
/*-----------------------------------------------------------*/
/*
/*
* The USB interrupt service routine. This takes a snapshot of the USB
* device at the time of the interrupt, clears the interrupts, and posts
* the data to the USB processing task.
@@ -212,7 +223,7 @@ __arm void vUSB_ISR( void );
static void prvResetEndPoints( void );
/*
* Setup the USB hardware, install the interrupt service routine and
* Setup the USB hardware, install the interrupt service routine and
* initialise all the state variables.
*/
static void vInitUSBInterface( void );
@@ -222,17 +233,17 @@ static void vInitUSBInterface( void );
*/
static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage );
/*
* For simplicity requests are separated into device, interface, class
/*
* For simplicity requests are separated into device, interface, class
* interface and end point requests.
*
* Decode and handle standard device requests originating on the control
* end point.
* end point.
*/
static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest );
/*
* For simplicity requests are separated into device, interface, class
* For simplicity requests are separated into device, interface, class
* interface and end point requests.
*
* Decode and handle standard interface requests originating on the control
@@ -241,7 +252,7 @@ static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest );
static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest );
/*
* For simplicity requests are separated into device, interface, class
* For simplicity requests are separated into device, interface, class
* interface and end point requests.
*
* Decode and handle standard end point requests originating on the control
@@ -250,7 +261,7 @@ static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest );
static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest );
/*
* For simplicity requests are separated into device, interface, class
* For simplicity requests are separated into device, interface, class
* interface and end point requests.
*
* Decode and handle the class interface requests.
@@ -266,11 +277,11 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest );
* in response to TXCOMP interrupts until the entire buffer has been
* sent.
*/
static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthLeftToSend, portLONG lSendingDescriptor );
static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthLeftToSend, long lSendingDescriptor );
/*
* Examine the Tx buffer to see if there is any more data to be transmitted.
*
*
* If there is data to be transmitted then send the next segment. A segment
* can have a maximum of 8 bytes (this is defined as the maximum for the end
* point by the descriptor). The final segment may be less than 8 bytes if
@@ -281,36 +292,36 @@ static void prvSendNextSegment( void );
/*
* A stall condition is forced each time the host makes a request that is not
* supported by this minimal implementation.
*
*
* A stall is forced by setting the appropriate bit in the end points control
* and status register.
* and status register.
*/
static void prvSendStall( void );
/*
* A NULL (or zero length packet) is transmitted in acknowledge the reception
* A NULL (or zero length packet) is transmitted in acknowledge the reception
* of certain events from the host.
*/
static void prvUSBTransmitNull( void );
/*
* When the host requests a descriptor this function is called to determine
/*
* When the host requests a descriptor this function is called to determine
* which descriptor is being requested and start its transmission.
*/
static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest );
/*
* This demo USB device enumerates as a simple 3 axis joystick. Once
* This demo USB device enumerates as a simple 3 axis joystick. Once
* configured this function is periodically called to generate some sample
* joystick data.
*
* The x and y axis are made to move in a square. The z axis is made to
* The x and y axis are made to move in a square. The z axis is made to
* repeatedly increment up to its maximum.
*/
static void prvTransmitSampleValues( void );
/*
* The created task to handle the USB demo functionality.
* The created task to handle the USB demo functionality.
*/
void vUSBDemoTask( void *pvParameters );
@@ -329,14 +340,14 @@ These take the form:
Data
}
*/
const portCHAR pxLanguageStringDescriptor[] =
const char pxLanguageStringDescriptor[] =
{
4,
usbDESCRIPTOR_TYPE_STRING,
0x09, 0x04
};
const portCHAR pxManufacturerStringDescriptor[] =
const char pxManufacturerStringDescriptor[] =
{
18,
usbDESCRIPTOR_TYPE_STRING,
@@ -351,7 +362,7 @@ const portCHAR pxManufacturerStringDescriptor[] =
'S', 0x00
};
const portCHAR pxProductStringDescriptor[] =
const char pxProductStringDescriptor[] =
{
44,
usbDESCRIPTOR_TYPE_STRING,
@@ -379,7 +390,7 @@ const portCHAR pxProductStringDescriptor[] =
'k', 0x00
};
const portCHAR pxConfigurationStringDescriptor[] =
const char pxConfigurationStringDescriptor[] =
{
38,
usbDESCRIPTOR_TYPE_STRING,
@@ -404,7 +415,7 @@ const portCHAR pxConfigurationStringDescriptor[] =
'e', 0x00
};
const portCHAR pxInterfaceStringDescriptor[] =
const char pxInterfaceStringDescriptor[] =
{
30,
usbDESCRIPTOR_TYPE_STRING,
@@ -426,7 +437,7 @@ const portCHAR pxInterfaceStringDescriptor[] =
};
/* Enumeration descriptors. */
const portCHAR pxReportDescriptor[] =
const char pxReportDescriptor[] =
{
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
0x09, 0x04, /* USAGE (Joystick) */
@@ -446,7 +457,7 @@ const portCHAR pxReportDescriptor[] =
0xc0 /* END_COLLECTION */
};
const char pxDeviceDescriptor[] =
const char pxDeviceDescriptor[] =
{
/* Device descriptor */
0x12, /* bLength */
@@ -508,8 +519,8 @@ const char pxConfigDescriptor[] = {
/*-----------------------------------------------------------*/
/* File scope state variables. */
static unsigned portCHAR ucUSBConfig = ( unsigned portCHAR ) 0;
static unsigned portLONG ulReceivedAddress = ( unsigned portLONG ) 0;
static unsigned char ucUSBConfig = ( unsigned char ) 0;
static unsigned long ulReceivedAddress = ( unsigned long ) 0;
static eDRIVER_STATE eDriverState = eNOTHING;
/* Array in which the USB interrupt status is passed between the ISR and task. */
@@ -519,7 +530,7 @@ static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ];
static xTX_MESSAGE pxCharsForTx;
/* Queue used to pass messages between the ISR and the task. */
static xQueueHandle xUSBInterruptQueue;
static xQueueHandle xUSBInterruptQueue;
/* ISR entry has to be written in the asm file as we want a context switch
to occur from within the ISR. See the port documentation on the FreeRTOS.org
@@ -528,9 +539,9 @@ extern void vUSBISREntry( void );
/*-----------------------------------------------------------*/
/* Macros to manipulate the control and status registers. These registers
cannot be accessed using a direct read modify write operation outside of the
ISR as some bits are left unchanged by writing with a 0, and some are left
/* Macros to manipulate the control and status registers. These registers
cannot be accessed using a direct read modify write operation outside of the
ISR as some bits are left unchanged by writing with a 0, and some are left
unchanged by writing with a 1. */
#define usbINT_CLEAR_MASK (AT91C_UDP_TXCOMP | AT91C_UDP_STALLSENT | AT91C_UDP_RXSETUP | AT91C_UDP_RX_DATA_BK0 | AT91C_UDP_RX_DATA_BK1 )
@@ -540,14 +551,14 @@ unchanged by writing with a 1. */
/* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \
/* STALLSENT and RX_DATA_BK1 to 1 so the */ \
/* write has no effect. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \
( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \
\
/* Clear the FORCE_STALL and TXPKTRDY bits */ \
/* so the write has no effect. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \
( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \
\
/* Set whichever bit we want set. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( ulBit ); \
( * ( ( unsigned long * ) pulValueNow ) ) |= ( ulBit ); \
}
#define usbCSR_CLEAR_BIT( pulValueNow, ulBit ) \
@@ -555,24 +566,24 @@ unchanged by writing with a 1. */
/* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \
/* STALLSENT and RX_DATA_BK1 to 1 so the */ \
/* write has no effect. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \
( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \
\
/* Clear the FORCE_STALL and TXPKTRDY bits */ \
/* so the write has no effect. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \
( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \
\
/* Clear whichever bit we want clear. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( ~ulBit ); \
( * ( ( unsigned long * ) pulValueNow ) ) &= ( ~ulBit ); \
}
/*-----------------------------------------------------------*/
__arm void vUSB_ISR( void )
{
portBASE_TYPE xTaskWokenByPost = pdFALSE;
static volatile unsigned portLONG ulNextMessage = 0;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
static volatile unsigned long ulNextMessage = 0;
xISRStatus *pxMessage;
unsigned portLONG ulTemp, ulRxBytes;
unsigned long ulTemp, ulRxBytes;
/* Take the next message from the queue. Note that usbQUEUE_LENGTH *must*
be all 1's, as in 0x01, 0x03, 0x07, etc. */
@@ -588,7 +599,7 @@ unsigned portLONG ulTemp, ulRxBytes;
cleared separately as it does not appear in the mask register. */
AT91C_BASE_UDP->UDP_ICR = AT91C_BASE_UDP->UDP_IMR | AT91C_UDP_ENDBUSRES;
/* If there are bytes in the FIFO then we have to retrieve them here.
/* If there are bytes in the FIFO then we have to retrieve them here.
Ideally this would be done at the task level. However we need to clear the
RXSETUP interrupt before leaving the ISR, and this may cause the data in
the FIFO to be overwritten. Also the DIR bit has to be changed before the
@@ -599,7 +610,7 @@ unsigned portLONG ulTemp, ulRxBytes;
ulRxBytes = ulTemp >> 16;
ulRxBytes &= usbRX_COUNT_MASK;
/* With this minimal implementation we are only interested in receiving
/* With this minimal implementation we are only interested in receiving
setup bytes on the control end point. */
if( ( ulRxBytes > 0 ) && ( ulTemp & AT91C_UDP_RXSETUP ) )
{
@@ -628,11 +639,11 @@ unsigned portLONG ulTemp, ulRxBytes;
/* The message now contains the entire state and optional data from
the USB interrupt. This can now be posted on the Rx queue ready for
processing at the task level. */
xTaskWokenByPost = xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, xTaskWokenByPost );
xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, &xHigherPriorityTaskWoken );
/* We may want to switch to the USB task, if this message has made
it the highest priority task that is ready to execute. */
portEND_SWITCHING_ISR( xTaskWokenByPost );
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
/* Clear the AIC ready for the next interrupt. */
AT91C_BASE_AIC->AIC_EOICR = 0;
@@ -651,7 +662,7 @@ xISRStatus *pxMessage;
vInitUSBInterface();
portEXIT_CRITICAL();
/* Process interrupts as they arrive. The ISR takes a snapshot of the
/* Process interrupts as they arrive. The ISR takes a snapshot of the
interrupt status then posts the information on this queue for processing
at the task level. This simple demo implementation only processes
a few interrupt sources. */
@@ -686,11 +697,11 @@ xISRStatus *pxMessage;
static void prvTransmitSampleValues( void )
{
unsigned portLONG ulStatus;
static portLONG lState = usbXUP;
unsigned long ulStatus;
static long lState = usbXUP;
/* Variables to hold dummy x, y and z joystick axis data. */
static signed portCHAR x = 0, y = 0, z = 0;
static signed char x = 0, y = 0, z = 0;
/* Generate some sample data in the x and y axis - draw a square. */
switch( lState )
@@ -749,7 +760,7 @@ static signed portCHAR x = 0, y = 0, z = 0;
static void prvUSBTransmitNull( void )
{
unsigned portLONG ulStatus;
unsigned long ulStatus;
/* Wait until the FIFO is free - even though we are not going to use it.
THERE IS NO TIMEOUT HERE! */
@@ -776,7 +787,7 @@ unsigned portLONG ulStatus;
static void prvSendStall( void )
{
unsigned portLONG ulStatus;
unsigned long ulStatus;
portENTER_CRITICAL();
{
@@ -791,13 +802,13 @@ unsigned portLONG ulStatus;
static void prvResetEndPoints( void )
{
unsigned portLONG ulTemp;
unsigned long ulTemp;
eDriverState = eJUST_RESET;
/* Reset all the end points. */
AT91C_BASE_UDP->UDP_RSTEP = usbEND_POINT_RESET_MASK;
AT91C_BASE_UDP->UDP_RSTEP = ( unsigned portLONG ) 0x00;
AT91C_BASE_UDP->UDP_RSTEP = ( unsigned long ) 0x00;
/* Enable data to be sent and received. */
AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN;
@@ -806,7 +817,7 @@ unsigned portLONG ulTemp;
portENTER_CRITICAL();
{
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
usbCSR_SET_BIT( &ulTemp, ( ( unsigned portLONG ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
usbCSR_SET_BIT( &ulTemp, ( ( unsigned long ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;
AT91F_UDP_EnableIt( AT91C_BASE_UDP, AT91C_UDP_EPINT0 );
}
@@ -818,7 +829,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
{
if( pxMessage->ulCSR0 & AT91C_UDP_RX_DATA_BK0 )
{
/* We only expect to receive zero length data here as ACK's.
/* We only expect to receive zero length data here as ACK's.
Set the data pointer to the end of the current Tx packet to
ensure we don't send out any more data. */
pxCharsForTx.ulNextCharIndex = pxCharsForTx.ulTotalDataLength;
@@ -838,7 +849,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
/* Read the end point for data transfer. */
portENTER_CRITICAL();
{
unsigned portLONG ulTemp;
unsigned long ulTemp;
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );
@@ -853,7 +864,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
{
/* We sent an acknowledgement of a SET_ADDRESS request. Move
to the addressed state. */
if( ulReceivedAddress != ( unsigned portLONG ) 0 )
if( ulReceivedAddress != ( unsigned long ) 0 )
{
AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;
}
@@ -876,8 +887,8 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
if( pxMessage->ulCSR0 & AT91C_UDP_RXSETUP )
{
xUSB_REQUEST xRequest;
unsigned portCHAR ucRequest;
unsigned portLONG ulRxBytes;
unsigned char ucRequest;
unsigned long ulRxBytes;
/* A data packet is available. */
ulRxBytes = pxMessage->ulCSR0 >> 16;
@@ -903,9 +914,9 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
xRequest.usLength <<= 8;
xRequest.usLength |= pxMessage->ucFifoData[ usbLENGTH_LOW_BYTE ];
/* Manipulate the ucRequestType and the ucRequest parameters to
generate a zero based request selection. This is just done to
break up the requests into subsections for clarity. The
/* Manipulate the ucRequestType and the ucRequest parameters to
generate a zero based request selection. This is just done to
break up the requests into subsections for clarity. The
alternative would be to have more huge switch statement that would
be difficult to optimise. */
ucRequest = ( ( xRequest.ucReqType & 0x60 ) >> 3 );
@@ -947,11 +958,11 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
switch( ( pxRequest->usValue & 0xff00 ) >> 8 )
{
case usbDESCRIPTOR_TYPE_DEVICE:
prvSendControlData( ( unsigned portCHAR * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
break;
case usbDESCRIPTOR_TYPE_CONFIGURATION:
prvSendControlData( ( unsigned portCHAR * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
break;
case usbDESCRIPTOR_TYPE_STRING:
@@ -960,23 +971,23 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
switch( pxRequest->usValue & 0xff )
{
case usbLANGUAGE_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
break;
case usbMANUFACTURER_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );
break;
case usbPRODUCT_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );
break;
case usbCONFIGURATION_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );
break;
case usbINTERFACE_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );
break;
default:
@@ -997,13 +1008,13 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest )
{
unsigned portSHORT usStatus = 0;
unsigned short usStatus = 0;
switch( pxRequest->ucRequest )
{
case usbGET_STATUS_REQUEST:
/* Just send two byte dummy status. */
prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
break;
case usbGET_DESCRIPTOR_REQUEST:
@@ -1013,7 +1024,7 @@ unsigned portSHORT usStatus = 0;
case usbGET_CONFIGURATION_REQUEST:
/* Send selected device configuration */
prvSendControlData( ( unsigned portCHAR * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );
prvSendControlData( ( unsigned char * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );
break;
case usbSET_FEATURE_REQUEST:
@@ -1028,16 +1039,16 @@ unsigned portSHORT usStatus = 0;
address and set our state so we know we have received the address. */
prvUSBTransmitNull();
eDriverState = eJUST_GOT_ADDRESS;
ulReceivedAddress = ( unsigned portLONG ) pxRequest->usValue;
ulReceivedAddress = ( unsigned long ) pxRequest->usValue;
break;
case usbSET_CONFIGURATION_REQUEST:
/* Acknowledge the SET_CONFIGURATION, but (according to the manual)
we cannot actually move to the configured state until we get a
/* Acknowledge the SET_CONFIGURATION, but (according to the manual)
we cannot actually move to the configured state until we get a
TXCOMP interrupt from this NULL packet. Therefore we just remember the
config and set our state so we know we have received the go ahead. */
ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff );
ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff );
eDriverState = eJUST_GOT_CONFIG;
prvUSBTransmitNull();
break;
@@ -1075,10 +1086,10 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest )
static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )
{
switch( ( pxRequest->usValue & ( unsigned portSHORT ) 0xff00 ) >> 8 )
switch( ( pxRequest->usValue & ( unsigned short ) 0xff00 ) >> 8 )
{
case usbHID_REPORT_DESCRIPTOR:
prvSendControlData( ( unsigned portCHAR * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
break;
default:
@@ -1092,17 +1103,17 @@ static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )
static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest )
{
unsigned portSHORT usStatus = 0;
unsigned short usStatus = 0;
switch( pxRequest->ucRequest )
{
case usbGET_STATUS_REQUEST:
/* Send dummy 2 bytes. */
prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
break;
case usbGET_DESCRIPTOR_REQUEST:
prvGetStandardInterfaceDescriptor( pxRequest );
prvGetStandardInterfaceDescriptor( pxRequest );
break;
/* This minimal implementation does not respond to these. */
@@ -1123,7 +1134,7 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
{
/* This minimal implementation does not expect to respond to these. */
case usbGET_STATUS_REQUEST:
case usbCLEAR_FEATURE_REQUEST:
case usbCLEAR_FEATURE_REQUEST:
case usbSET_FEATURE_REQUEST:
default:
@@ -1135,14 +1146,14 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
static void vInitUSBInterface( void )
{
volatile unsigned portLONG ulTemp;
volatile unsigned long ulTemp;
/* Create the queue used to communicate between the USB ISR and task. */
xUSBInterruptQueue = xQueueCreate( usbQUEUE_LENGTH + 1, sizeof( xISRStatus * ) );
/* Initialise a few state variables. */
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
ucUSBConfig = ( unsigned portCHAR ) 0;
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
ucUSBConfig = ( unsigned char ) 0;
eDriverState = eNOTHING;
/* HARDWARE SETUP */
@@ -1157,24 +1168,24 @@ volatile unsigned portLONG ulTemp;
/* Setup the PIO for the USB pull up resistor. */
AT91F_PIO_CfgOutput(AT91C_BASE_PIOA,AT91C_PIO_PA16);
/* Start without the pullup - this will get set at the end of this
/* Start without the pullup - this will get set at the end of this
function. */
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, AT91C_PIO_PA16 );
/* When using the USB debugger the peripheral registers do not always get
set to the correct default values. To make sure set the relevant registers
manually here. */
AT91C_BASE_UDP->UDP_IDR = ( unsigned portLONG ) 0xffffffff;
AT91C_BASE_UDP->UDP_ICR = ( unsigned portLONG ) 0xffffffff;
AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned portLONG ) 0x00;
AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned portLONG ) 0x00;
AT91C_BASE_UDP->UDP_IDR = ( unsigned long ) 0xffffffff;
AT91C_BASE_UDP->UDP_ICR = ( unsigned long ) 0xffffffff;
AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned long ) 0x00;
AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned long ) 0x00;
AT91C_BASE_UDP->UDP_GLBSTATE = 0;
AT91C_BASE_UDP->UDP_FADDR = 0;
/* Enable the transceiver. */
AT91C_UDP_TRANSCEIVER_ENABLE = 0;
/* Enable the USB interrupts - other interrupts get enabled as the
/* Enable the USB interrupts - other interrupts get enabled as the
enumeration process progresses. */
AT91F_AIC_ConfigureIt( AT91C_BASE_AIC, AT91C_ID_UDP, usbINTERRUPT_PRIORITY, AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE, ( void (*)( void ) ) vUSBISREntry );
AT91F_AIC_EnableIt( AT91C_BASE_AIC, AT91C_ID_UDP );
@@ -1185,16 +1196,16 @@ volatile unsigned portLONG ulTemp;
}
/*-----------------------------------------------------------*/
static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthToSend, portLONG lSendingDescriptor )
static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthToSend, long lSendingDescriptor )
{
if( ( ( unsigned portLONG ) usRequestedLength < ulLengthToSend ) )
if( ( ( unsigned long ) usRequestedLength < ulLengthToSend ) )
{
/* Cap the data length to that requested. */
ulLengthToSend = ( unsigned portSHORT ) usRequestedLength;
ulLengthToSend = ( unsigned short ) usRequestedLength;
}
else if( ( ulLengthToSend < ( unsigned portLONG ) usRequestedLength ) && lSendingDescriptor )
else if( ( ulLengthToSend < ( unsigned long ) usRequestedLength ) && lSendingDescriptor )
{
/* We are sending a descriptor. If the descriptor is an exact
/* We are sending a descriptor. If the descriptor is an exact
multiple of the FIFO length then it will have to be terminated
with a NULL packet. Set the state to indicate this if
necessary. */
@@ -1211,12 +1222,12 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
(if it is greater than 8 bytes in length). */
memcpy( pxCharsForTx.ucTxBuffer, pucData, ulLengthToSend );
/* Reinitialise the buffer index so we start sending from the start of
/* Reinitialise the buffer index so we start sending from the start of
the data. */
pxCharsForTx.ulTotalDataLength = ulLengthToSend;
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
/* Send the first 8 bytes now. The rest will get sent in response to
/* Send the first 8 bytes now. The rest will get sent in response to
TXCOMP interrupts. */
prvSendNextSegment();
}
@@ -1224,7 +1235,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
static void prvSendNextSegment( void )
{
volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
volatile unsigned long ulNextLength, ulStatus, ulLengthLeftToSend;
/* Is there any data to send? */
if( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )
@@ -1249,7 +1260,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
}
/* Write the data to the FIFO. */
while( ulNextLength > ( unsigned portLONG ) 0 )
while( ulNextLength > ( unsigned long ) 0 )
{
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];
@@ -1261,14 +1272,14 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
portENTER_CRITICAL();
{
ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
usbCSR_SET_BIT( &ulStatus, ( ( unsigned portLONG ) 0x10 ) );
usbCSR_SET_BIT( &ulStatus, ( ( unsigned long ) 0x10 ) );
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus;
}
portEXIT_CRITICAL();
}
else
{
/* There is no data to send. If we were sending a descriptor and the
/* There is no data to send. If we were sending a descriptor and the
descriptor was an exact multiple of the max packet size then we need
to send a null to terminate the transmission. */
if( eDriverState == eSENDING_EVEN_DESCRIPTOR )

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -100,7 +111,7 @@
#define mainCHECK_TASK_LED ( 3 )
/* Constants for the ComTest tasks. */
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
#define mainCOM_TEST_LED ( 4 ) /* Off the board. */
/*
@@ -121,7 +132,7 @@ static void prvSetupHardware( void );
* Checks that all the demo application tasks are still executing without error
* - as described at the top of the file.
*/
static portLONG prvCheckOtherTasksAreStillRunning( void );
static long prvCheckOtherTasksAreStillRunning( void );
/*-----------------------------------------------------------*/
@@ -217,9 +228,9 @@ portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
}
/*-----------------------------------------------------------*/
static portLONG prvCheckOtherTasksAreStillRunning( void )
static long prvCheckOtherTasksAreStillRunning( void )
{
portLONG lReturn = ( portLONG ) pdPASS;
long lReturn = ( long ) pdPASS;
/* Check all the demo tasks (other than the flash tasks) to ensure
that they are all still running, and that none of them have detected
@@ -227,32 +238,32 @@ portLONG lReturn = ( portLONG ) pdPASS;
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xArePollingQueuesStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreComTestTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
return lReturn;

View File

@@ -2,20 +2,20 @@
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
define symbol __ICFEDIT_intvec_start__ = 0x00100000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x00000100;
define symbol __ICFEDIT_region_ROM_end__ = 0x0000FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x00200000;
define symbol __ICFEDIT_region_RAM_end__ = 0x00203FFF;
define symbol __ICFEDIT_region_ROM_start__ = 0x00100040;
define symbol __ICFEDIT_region_ROM_end__ = 0x10FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x200000;
define symbol __ICFEDIT_region_RAM_end__ = 0x203FFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x200;
define symbol __ICFEDIT_size_svcstack__ = 0x200;
define symbol __ICFEDIT_size_irqstack__ = 0x200;
define symbol __ICFEDIT_size_fiqstack__ = 0x4;
define symbol __ICFEDIT_size_undstack__ = 0x4;
define symbol __ICFEDIT_size_abtstack__ = 0x4;
define symbol __ICFEDIT_size_heap__ = 0x4;
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_svcstack__ = 0x100;
define symbol __ICFEDIT_size_irqstack__ = 0x100;
define symbol __ICFEDIT_size_fiqstack__ = 0x0;
define symbol __ICFEDIT_size_undstack__ = 0x0;
define symbol __ICFEDIT_size_abtstack__ = 0x0;
define symbol __ICFEDIT_size_heap__ = 0x0;
/**** End of ICF editor section. ###ICF###*/
@@ -40,3 +40,4 @@ place in ROM_region { readonly };
place in RAM_region { readwrite,
block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
block UND_STACK, block ABT_STACK, block HEAP };

View File

@@ -0,0 +1,73 @@
// ----------------------------------------------------------------------------
// ATMEL Microcontroller Software Support - ROUSSET -
// ----------------------------------------------------------------------------
// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ----------------------------------------------------------------------------
// File Name : SAM7_FLASH.mac
// Object : Generic Macro File for IAR
// 1.0 17/Aug/05 FBr : Creation
// ----------------------------------------------------------------------------
/*********************************************************************
*
* _InitRSTC()
*
* Function description
* Initializes the RSTC (Reset controller).
* This makes sense since the default is to not allow user resets, which makes it impossible to
* apply a second RESET via J-Link
*/
_InitRSTC() {
__writeMemory32(0xA5000001, 0xFFFFFD08,"Memory"); // Allow user reset
}
/*********************************************************************
*
* _InitPLL()
* Function description
* Initializes the PMC.
* 1. Enable the Main Oscillator
* 2. Configure PLL to 96MHz
* 3. Switch Master Clock (MCK) on PLL/2 = 48MHz
*/
_InitPLL() {
__message "Enable Main Oscillator";
__writeMemory32(0x00000601,0xFFFFFc20,"Memory"); // MOSC
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x1) );
__message "Set PLL to 96MHz";
__writeMemory32(0x10191c05,0xFFFFFc2c,"Memory"); // LOCK
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x4) );
__message "Set Master Clock to 48MHz";
__writeMemory32(0x00000004,0xFFFFFc30,"Memory"); // MCKRDY
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x8) );
__writeMemory32(0x00000007,0xFFFFFc30,"Memory"); // MCKRDY
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x8) );
// Set 1 WS for Flash accesses on each EFC
__writeMemory32(0x00480100,0xFFFFFF60,"Memory");
__writeMemory32(0x00480100,0xFFFFFF70,"Memory");
}
/*********************************************************************
*
* execUserReset() : JTAG set initially to Full Speed
*/
execUserReset() {
__message "execUserReset()";
__hwReset(0); // Hardware Reset: CPU is automatically halted after the reset (JTAG is already configured to 32kHz)
_InitPLL(); // Allow to debug at JTAG Full Speed
_InitRSTC(); // Enable User Reset to allow execUserReset() execution
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<flash_board>
<pass>
<loader>$TOOLKIT_DIR$\config\flashloader\Atmel\AT91SAM7S64-EK\flash-at91sam7s64.flash</loader>
<range>CODE 0x100000 0x110000</range>
<rel_offset>0</rel_offset>
<args>--flash
--boot
</args>
</pass>
</flash_board>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>1</fileVersion>
<fileVersion>2</fileVersion>
<configuration>
<name>Flash Debug</name>
<toolchain>
@@ -12,7 +12,7 @@
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>15</version>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -37,7 +37,7 @@
</option>
<option>
<name>MacFile</name>
<state>$PROJ_DIR$\resource\SAM7.mac</state>
<state>$PROJ_DIR$\resource\at91sam7s-ek-flash.mac</state>
</option>
<option>
<name>MemOverride</name>
@@ -89,16 +89,12 @@
</option>
<option>
<name>OCLastSavedByProductVersion</name>
<state>5.11.0.50615</state>
<state>5.40.2.51615</state>
</option>
<option>
<name>OCDownloadAttachToProgram</name>
<state>0</state>
</option>
<option>
<name>FlashLoaders</name>
<state>,,,,(default),</state>
</option>
<option>
<name>UseFlashLoader</name>
<state>1</state>
@@ -111,6 +107,46 @@
<name>OCBE8Slave</name>
<state>1</state>
</option>
<option>
<name>MacFile2</name>
<state></state>
</option>
<option>
<name>CDevice</name>
<state>1</state>
</option>
<option>
<name>FlashLoadersV3</name>
<state>$TOOLKIT_DIR$\config\flashloader\Atmel\AT91SAM7S64-EK\at91sam7s64-flash.board</state>
</option>
<option>
<name>OCImagesSuppressCheck1</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath1</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck2</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath2</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck3</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath3</name>
<state></state>
</option>
<option>
<name>OverrideDefFlashBoard</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -257,7 +293,7 @@
<name>JLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>9</version>
<version>10</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -370,13 +406,17 @@
<version>0</version>
<state>5</state>
</option>
<option>
<name>CCJLinkInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>LMIFTDI_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>1</version>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -395,13 +435,21 @@
<name>CCLmiftdiLogFile</name>
<state>$TOOLKIT_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCLmiFtdiInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCLmiFtdiInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>MACRAIGOR_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<version>3</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -476,6 +524,14 @@
<name>CCJTagUpdateBreakpoints</name>
<state>main</state>
</option>
<option>
<name>CCMacraigorInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCMacraigorInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -539,6 +595,19 @@
</option>
</data>
</settings>
<settings>
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>THIRDPARTY_ID</name>
<archiveVersion>2</archiveVersion>
@@ -566,11 +635,11 @@
</settings>
<debuggerPlugins>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
@@ -586,7 +655,11 @@
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
@@ -597,6 +670,10 @@
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\FreeRTOS\FreeRTOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
@@ -609,6 +686,10 @@
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
<configuration>
@@ -621,7 +702,7 @@
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>15</version>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -646,7 +727,7 @@
</option>
<option>
<name>MacFile</name>
<state>$PROJ_DIR$\resource\SAM7.mac</state>
<state>$PROJ_DIR$\resource\at91sam7s-ek-flash.mac</state>
</option>
<option>
<name>MemOverride</name>
@@ -698,16 +779,12 @@
</option>
<option>
<name>OCLastSavedByProductVersion</name>
<state>5.11.0.50615</state>
<state>5.40.2.51615</state>
</option>
<option>
<name>OCDownloadAttachToProgram</name>
<state>0</state>
</option>
<option>
<name>FlashLoaders</name>
<state>,,,,(default),</state>
</option>
<option>
<name>UseFlashLoader</name>
<state>1</state>
@@ -720,6 +797,46 @@
<name>OCBE8Slave</name>
<state>1</state>
</option>
<option>
<name>MacFile2</name>
<state></state>
</option>
<option>
<name>CDevice</name>
<state>1</state>
</option>
<option>
<name>FlashLoadersV3</name>
<state>$PROJ_DIR$\resource\at91sam7s64-flash.board</state>
</option>
<option>
<name>OCImagesSuppressCheck1</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath1</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck2</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath2</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck3</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath3</name>
<state></state>
</option>
<option>
<name>OverrideDefFlashBoard</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@@ -866,7 +983,7 @@
<name>JLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>9</version>
<version>10</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -979,13 +1096,17 @@
<version>0</version>
<state>5</state>
</option>
<option>
<name>CCJLinkInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>LMIFTDI_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>1</version>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -1004,13 +1125,21 @@
<name>CCLmiftdiLogFile</name>
<state>$TOOLKIT_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCLmiFtdiInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCLmiFtdiInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>MACRAIGOR_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<version>3</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -1085,6 +1214,14 @@
<name>CCJTagUpdateBreakpoints</name>
<state>main</state>
</option>
<option>
<name>CCMacraigorInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCMacraigorInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -1148,6 +1285,19 @@
</option>
</data>
</settings>
<settings>
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>THIRDPARTY_ID</name>
<archiveVersion>2</archiveVersion>
@@ -1175,11 +1325,11 @@
</settings>
<debuggerPlugins>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
@@ -1195,7 +1345,11 @@
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
@@ -1206,6 +1360,10 @@
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\FreeRTOS\FreeRTOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
@@ -1218,6 +1376,10 @@
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
</project>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>1</fileVersion>
<fileVersion>2</fileVersion>
<configuration>
<name>Flash Debug</name>
<toolchain>
@@ -12,7 +12,7 @@
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>14</version>
<version>17</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -29,7 +29,7 @@
</option>
<option>
<name>Variant</name>
<version>7</version>
<version>11</version>
<state>0</state>
</option>
<option>
@@ -93,11 +93,6 @@
<name>OGLastSavedByProductVersion</name>
<state>5.11.0.50615</state>
</option>
<option>
<name>GeneralMisraRules</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralEnableMisra</name>
<state>0</state>
@@ -122,13 +117,31 @@
<name>OGBufferedTerminalOutput</name>
<state>0</state>
</option>
<option>
<name>GenStdoutInterface</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralMisraVer</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>19</version>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -260,11 +273,6 @@
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>CompilerMisraRules</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraOverride</name>
<state>0</state>
@@ -310,6 +318,16 @@
<name>CCOptLevelSlave</name>
<state>0</state>
</option>
<option>
<name>CompilerMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
</data>
</settings>
<settings>
@@ -491,7 +509,7 @@
<debug>1</debug>
<option>
<name>OOCOutputFormat</name>
<version>1</version>
<version>2</version>
<state>0</state>
</option>
<option>
@@ -537,7 +555,7 @@
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>5</version>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -680,10 +698,6 @@
<name>IlinkProgramEntryLabel</name>
<state>__iar_program_start</state>
</option>
<option>
<name>IlinkNXPLPCChecksum</name>
<state>0</state>
</option>
<option>
<name>DoFill</name>
<state>0</state>
@@ -743,6 +757,18 @@
<name>IlinkBufferedTerminalOutput</name>
<state>1</state>
</option>
<option>
<name>IlinkStdoutInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>CrcFullSize</name>
<state>0</state>
</option>
<option>
<name>IlinkIElfToolPostProcess</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -782,7 +808,7 @@
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>14</version>
<version>17</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -799,7 +825,7 @@
</option>
<option>
<name>Variant</name>
<version>7</version>
<version>11</version>
<state>0</state>
</option>
<option>
@@ -863,11 +889,6 @@
<name>OGLastSavedByProductVersion</name>
<state>5.11.0.50615</state>
</option>
<option>
<name>GeneralMisraRules</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralEnableMisra</name>
<state>0</state>
@@ -892,13 +913,31 @@
<name>OGBufferedTerminalOutput</name>
<state>0</state>
</option>
<option>
<name>GenStdoutInterface</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralMisraVer</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>19</version>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -1030,11 +1069,6 @@
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>CompilerMisraRules</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraOverride</name>
<state>0</state>
@@ -1080,6 +1114,16 @@
<name>CCOptLevelSlave</name>
<state>3</state>
</option>
<option>
<name>CompilerMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
</data>
</settings>
<settings>
@@ -1260,7 +1304,7 @@
<debug>1</debug>
<option>
<name>OOCOutputFormat</name>
<version>1</version>
<version>2</version>
<state>0</state>
</option>
<option>
@@ -1306,7 +1350,7 @@
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>5</version>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -1449,10 +1493,6 @@
<name>IlinkProgramEntryLabel</name>
<state>__iar_program_start</state>
</option>
<option>
<name>IlinkNXPLPCChecksum</name>
<state>0</state>
</option>
<option>
<name>DoFill</name>
<state>0</state>
@@ -1512,6 +1552,18 @@
<name>IlinkBufferedTerminalOutput</name>
<state>1</state>
</option>
<option>
<name>IlinkStdoutInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>CrcFullSize</name>
<state>0</state>
</option>
<option>
<name>IlinkIElfToolPostProcess</name>
<state>0</state>
</option>
</data>
</settings>
<settings>

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -68,8 +79,8 @@
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
#define serHANDLE ( ( xComPortHandle ) 1 )
#define serNO_BLOCK ( ( portTickType ) 0 )
#define serNO_TIMEGUARD ( ( unsigned portLONG ) 0 )
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned portLONG ) 0 )
#define serNO_TIMEGUARD ( ( unsigned long ) 0 )
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 )
/* Queues used to hold received characters, and characters waiting to be
@@ -90,14 +101,14 @@ __arm void vSerialISR( void );
/*
* See the serial2.h header file.
*/
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
xComPortHandle xReturn = serHANDLE;
extern void ( vUART_ISR )( void );
/* Create the queues used to hold Rx and Tx characters. */
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
/* If the queues were created correctly then setup the serial port
hardware. */
@@ -108,7 +119,7 @@ extern void ( vUART_ISR )( void );
/* Enable the USART clock. */
AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_US0 );
AT91F_PIO_CfgPeriph( AT91C_BASE_PIOA, ( ( unsigned portLONG ) AT91C_PA5_RXD0 ) | ( ( unsigned portLONG ) AT91C_PA6_TXD0 ), serNO_PERIPHERAL_B_SETUP );
AT91F_PIO_CfgPeriph( AT91C_BASE_PIOA, ( ( unsigned long ) AT91C_PA5_RXD0 ) | ( ( unsigned long ) AT91C_PA6_TXD0 ), serNO_PERIPHERAL_B_SETUP );
/* Set the required protocol. */
AT91F_US_Configure( serCOM0, configCPU_CLOCK_HZ, AT91C_US_ASYNC_MODE, ulWantedBaud, serNO_TIMEGUARD );
@@ -137,7 +148,7 @@ extern void ( vUART_ISR )( void );
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
{
/* The port handle is not required as this driver only supports one port. */
( void ) pxPort;
@@ -155,9 +166,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
}
/*-----------------------------------------------------------*/
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
{
signed portCHAR *pxNext;
signed char *pxNext;
/* A couple of parameters that this port does not use. */
( void ) usStringLength;
@@ -170,7 +181,7 @@ signed portCHAR *pxNext;
( void ) pxPort;
/* Send each character in the string, one at a time. */
pxNext = ( signed portCHAR * ) pcString;
pxNext = ( signed char * ) pcString;
while( *pxNext )
{
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
@@ -179,7 +190,7 @@ signed portCHAR *pxNext;
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
{
/* Place the character in the queue of characters to be transmitted. */
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
@@ -209,9 +220,9 @@ within serialISR.s79 which in turn calls this function. See the port
documentation on the FreeRTOS.org website for more information. */
__arm void vSerialISR( void )
{
unsigned portLONG ulStatus;
signed portCHAR cChar;
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
unsigned long ulStatus;
signed char cChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt? */
ulStatus = serCOM0->US_CSR &= serCOM0->US_IMR;
@@ -220,7 +231,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
{
/* The interrupt was caused by the THR becoming empty. Are there any
more characters to transmit? */
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
{
/* A character was retrieved from the queue so can be sent to the
THR now. */
@@ -239,12 +250,12 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
character from the RHR and place it in the queue or received
characters. */
cChar = serCOM0->US_RHR;
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
}
/* If a task was woken by either a character being received or a character
being transmitted then we may need to switch to another task. */
portEND_SWITCHING_ISR( ( xTaskWokenByPost || xTaskWokenByTx ) );
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
/* End the interrupt in the AIC. */
AT91C_BASE_AIC->AIC_EOICR = 0;

View File

@@ -15,7 +15,7 @@
<PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly>
<Debug-Log><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Build</Factory></Window></Windows></PreferedWindows></Debug-Log>
<Debug-Log><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Build</Factory></Window></Windows></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>
<Build><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows></Build>
<Register>
<PreferedWindows>
@@ -30,7 +30,7 @@
<Wnd2>
<Wnd0>
<Tabs>
<Tab>
<Identity>TabID-22256-14845</Identity>
@@ -42,20 +42,20 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-18517-20319</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-18517-20319</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>25</YPos><SelStart>1726</SelStart><SelEnd>1726</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s79</Filename><XPos>0</XPos><YPos>19</YPos><SelStart>1527</SelStart><SelEnd>1527</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s</Filename><XPos>0</XPos><YPos>52</YPos><SelStart>3250</SelStart><SelEnd>3250</SelEnd></Tab><ActiveTab>2</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\port.c</Filename><XPos>0</XPos><YPos>217</YPos><SelStart>8345</SelStart><SelEnd>8345</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>880</SelStart><SelEnd>880</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s</Filename><XPos>0</XPos><YPos>213</YPos><SelStart>8773</SelStart><SelEnd>8773</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\AT91SAM7S64.h</Filename><XPos>0</XPos><YPos>18</YPos><SelStart>2080</SelStart><SelEnd>2080</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\port.c</Filename><XPos>0</XPos><YPos>234</YPos><SelStart>9960</SelStart><SelEnd>9960</SelEnd></Tab><ActiveTab>3</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-01284260><key>iaridepm.enu1</key></Toolbar-01284260><Toolbar-070bd990><key>debuggergui.enu1</key></Toolbar-070bd990></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>278</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>166667</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-00abb198><key>iaridepm.enu1</key></Toolbar-00abb198><Toolbar-049f1f30><key>debuggergui.enu1</key></Toolbar-049f1f30></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>278</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>166667</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>

View File

@@ -23,6 +23,13 @@ UseTrigger=1
TriggerName=main
LimitSize=0
ByteLimit=50
[TraceHelper]
Enabled=0
ShowSource=1
[DebugChecksum]
Checksum=-1701609349
[InstructionProfiling]
Enabled=_ 0
[Log file]
LoggingEnabled=_ 0
LogFile=_ ""
@@ -30,10 +37,11 @@ Category=_ 0
[TermIOLog]
LoggingEnabled=_ 0
LogFile=_ ""
[DriverProfiling]
Enabled=0
Source=2
Graph=0
[Disassemble mode]
mode=0
[Breakpoints]
Count=0
[TraceHelper]
Enabled=0
ShowSource=1

View File

@@ -3,7 +3,7 @@
<Workspace>
<ConfigDictionary>
<CurrentConfigs><Project>rtosdemo/Flash Bin</Project></CurrentConfigs></ConfigDictionary>
<CurrentConfigs><Project>rtosdemo/Flash Debug</Project></CurrentConfigs></ConfigDictionary>
<Desktop>
<Static>
<Workspace>
@@ -62,14 +62,14 @@
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>880</SelStart><SelEnd>880</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-01284260><key>iaridepm.enu1</key></Toolbar-01284260></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>576</Bottom><Right>310</Right><x>-2</x><y>-2</y><xscreen>32</xscreen><yscreen>26</yscreen><sizeHorzCX>19048</sizeHorzCX><sizeHorzCY>26477</sizeHorzCY><sizeVertCX>185714</sizeVertCX><sizeVertCY>588595</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>362</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>364</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>370672</sizeHorzCY><sizeVertCX>19048</sizeVertCX><sizeVertCY>26477</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-00abb198><key>iaridepm.enu1</key></Toolbar-00abb198></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>576</Bottom><Right>310</Right><x>-2</x><y>-2</y><xscreen>32</xscreen><yscreen>26</yscreen><sizeHorzCX>19048</sizeHorzCX><sizeHorzCY>26477</sizeHorzCY><sizeVertCX>185714</sizeVertCX><sizeVertCY>588595</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>362</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>364</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>370672</sizeHorzCY><sizeVertCX>19048</sizeVertCX><sizeVertCY>26477</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
@@ -45,6 +56,7 @@
#include <stdio.h>
#include "AT91SAM7X256.h"
/*-----------------------------------------------------------
* Application specific definitions.
*
@@ -53,15 +65,17 @@
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 1
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 47923200 )
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 130 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 130 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 10 )
#define configUSE_TRACE_FACILITY 1

View File

@@ -1,32 +1,55 @@
# FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
#/*
# FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
#
#
# This file is part of the FreeRTOS.org distribution.
# ***************************************************************************
# * *
# * FreeRTOS tutorial books are available in pdf and paperback. *
# * Complete, revised, and edited pdf reference manuals are also *
# * available. *
# * *
# * Purchasing FreeRTOS documentation will not only help you, by *
# * ensuring you get running as quickly as possible and with an *
# * in-depth knowledge of how to use FreeRTOS, it will also help *
# * the FreeRTOS project to continue with its mission of providing *
# * professional grade, cross platform, de facto standard solutions *
# * for microcontrollers - completely free of charge! *
# * *
# * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
# * *
# * Thank you for using FreeRTOS, and thank you for your support! *
# * *
# ***************************************************************************
#
# FreeRTOS.org is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# FreeRTOS.org 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. See the
# GNU General Public License for more details.
# This file is part of the FreeRTOS distribution.
#
# You should have received a copy of the GNU General Public License
# along with FreeRTOS.org; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 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. See the GNU General Public License for
# more details. You should have received a copy of the GNU General Public
# License and the FreeRTOS license exception along with FreeRTOS; if not it
# can be viewed here: http://www.freertos.org/a00114.html and also obtained
# by writing to Richard Barry, contact details for whom are available on the
# FreeRTOS WEB site.
#
# A special exception to the GPL can be applied should you wish to distribute
# a combined work that includes FreeRTOS.org, without being obliged to provide
# the source code for any proprietary components. See the licensing section
# of http://www.FreeRTOS.org for full details of how and when the exception
# can be applied.
# 1 tab == 4 spaces!
#
# ***************************************************************************
# See http://www.FreeRTOS.org for documentation, latest information, license
# and contact details. Please ensure to read the configuration and relevant
# port sections of the online documentation.
# ***************************************************************************
# http://www.FreeRTOS.org - Documentation, latest information, license and
# contact details.
#
# http://www.SafeRTOS.com - A version that is certified for use in safety
# critical systems.
#
# http://www.OpenRTOS.com - Commercial support, development, porting,
# licensing and training services.
#*/
RTOS_SOURCE_DIR=../../../Source
@@ -61,7 +84,9 @@ CFLAGS= $(DEBUG) \
-D PACK_STRUCT_END=__attribute\(\(packed\)\) \
-D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \
-fomit-frame-pointer \
-mthumb-interwork
-mthumb-interwork \
-fno-strict-aliasing \
-fno-dwarf2-cfi-asm
THUMB_SOURCE= \
main.c \
@@ -88,11 +113,12 @@ THUMB_SOURCE= \
$(RTOS_SOURCE_DIR)/tasks.c \
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S/port.c \
$(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \
./USB/USBSample.c
./USB/USBSample.c \
syscalls.c
ARM_SOURCE= \
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_AT91SAM7S/portISR.c \
./webserver/emac_isr.c \
./webserver/EMAC_ISR.c \
./SrcAtmel/Cstartup_SAM7.c \
./USB/USB_ISR.c

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* Scheduler includes. */
@@ -53,7 +64,7 @@
#define partstNUM_LEDS ( 4 )
#define partstALL_LEDS ( ulLED_Mask[ 0 ] | ulLED_Mask[ 1 ] | ulLED_Mask[ 2 ] | ulLED_Mask[ 3 ] )
const unsigned portLONG ulLED_Mask[ partstNUM_LEDS ]= { (1<<19), (1<<20), (1<<21), (1<<22) };
const unsigned long ulLED_Mask[ partstNUM_LEDS ]= { (1<<19), (1<<20), (1<<21), (1<<22) };
void vParTestInitialise( void )

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -121,7 +132,7 @@ little odd. */
/* Misc application definitions. */
#define usbINTERRUPT_PRIORITY ( 3 )
#define usbFIFO_LENGTH ( ( unsigned portLONG ) 8 )
#define usbFIFO_LENGTH ( ( unsigned long ) 8 )
#define usbXUP ( 1 )
#define usbXDOWN ( 2 )
#define usbYUP ( 3 )
@@ -131,9 +142,9 @@ little odd. */
#define usbSHORTEST_DELAY ( ( portTickType ) 1 )
#define usbINIT_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )
#define usbSHORT_DELAY ( ( portTickType ) 50 / portTICK_RATE_MS )
#define usbEND_POINT_RESET_MASK ( ( unsigned portLONG ) 0x0f )
#define usbDATA_INC ( ( portCHAR ) 5 )
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned portLONG ) 8 )
#define usbEND_POINT_RESET_MASK ( ( unsigned long ) 0x0f )
#define usbDATA_INC ( ( char ) 5 )
#define usbEXPECTED_NUMBER_OF_BYTES ( ( unsigned long ) 8 )
/* Control request types. */
#define usbSTANDARD_DEVICE_REQUEST ( 0 )
@@ -144,11 +155,11 @@ little odd. */
/* Structure used to hold the received requests. */
typedef struct
{
unsigned portCHAR ucReqType;
unsigned portCHAR ucRequest;
unsigned portSHORT usValue;
unsigned portSHORT usIndex;
unsigned portSHORT usLength;
unsigned char ucReqType;
unsigned char ucRequest;
unsigned short usValue;
unsigned short usIndex;
unsigned short usLength;
} xUSB_REQUEST;
typedef enum
@@ -164,9 +175,9 @@ typedef enum
/* Structure used to control the data being sent to the host. */
typedef struct
{
unsigned portCHAR ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
unsigned portLONG ulNextCharIndex;
unsigned portLONG ulTotalDataLength;
unsigned char ucTxBuffer[ usbMAX_TX_MESSAGE_SIZE ];
unsigned long ulNextCharIndex;
unsigned long ulTotalDataLength;
} xTX_MESSAGE;
/*-----------------------------------------------------------*/
@@ -239,7 +250,7 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest );
* in response to TXCOMP interrupts until the entire buffer has been
* sent.
*/
static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthLeftToSend, portLONG lSendingDescriptor );
static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthLeftToSend, long lSendingDescriptor );
/*
* Examine the Tx buffer to see if there is any more data to be transmitted.
@@ -286,7 +297,7 @@ static void vUSBDemoTask( void *pvParameters );
* Simple algorithm to ramp up the mouse cursor speed to make it easier to
* use.
*/
static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 );
static void prvControlCursorSpeed( signed char *cVal, unsigned long ulInput, unsigned long ulSwitch1, unsigned long ulSwitch2 );
/*-----------------------------------------------------------*/
/*
@@ -302,14 +313,14 @@ These take the form:
Data
}
*/
const portCHAR pxLanguageStringDescriptor[] =
const char pxLanguageStringDescriptor[] =
{
4,
usbDESCRIPTOR_TYPE_STRING,
0x09, 0x04
};
const portCHAR pxManufacturerStringDescriptor[] =
const char pxManufacturerStringDescriptor[] =
{
18,
usbDESCRIPTOR_TYPE_STRING,
@@ -324,7 +335,7 @@ const portCHAR pxManufacturerStringDescriptor[] =
'S', 0x00
};
const portCHAR pxProductStringDescriptor[] =
const char pxProductStringDescriptor[] =
{
38,
usbDESCRIPTOR_TYPE_STRING,
@@ -349,7 +360,7 @@ const portCHAR pxProductStringDescriptor[] =
'e', 0x00
};
const portCHAR pxConfigurationStringDescriptor[] =
const char pxConfigurationStringDescriptor[] =
{
38,
usbDESCRIPTOR_TYPE_STRING,
@@ -374,7 +385,7 @@ const portCHAR pxConfigurationStringDescriptor[] =
'e', 0x00
};
const portCHAR pxInterfaceStringDescriptor[] =
const char pxInterfaceStringDescriptor[] =
{
30,
usbDESCRIPTOR_TYPE_STRING,
@@ -396,7 +407,7 @@ const portCHAR pxInterfaceStringDescriptor[] =
};
/* Enumeration descriptors. */
const portCHAR pxReportDescriptor[] =
const char pxReportDescriptor[] =
{
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
0x09, 0x02, /* USAGE (Mouse) */
@@ -491,8 +502,8 @@ const char pxConfigDescriptor[] = {
/*-----------------------------------------------------------*/
/* File scope state variables. */
static unsigned portCHAR ucUSBConfig = ( unsigned portCHAR ) 0;
static unsigned portLONG ulReceivedAddress = ( unsigned portLONG ) 0;
static unsigned char ucUSBConfig = ( unsigned char ) 0;
static unsigned long ulReceivedAddress = ( unsigned long ) 0;
static eDRIVER_STATE eDriverState = eNOTHING;
/* Structure used to control the characters being sent to the host. */
@@ -558,9 +569,9 @@ xISRStatus *pxMessage;
}
/*-----------------------------------------------------------*/
static void prvControlCursorSpeed( signed portCHAR *cVal, unsigned portLONG ulInput, unsigned portLONG ulSwitch1, unsigned portLONG ulSwitch2 )
static void prvControlCursorSpeed( signed char *cVal, unsigned long ulInput, unsigned long ulSwitch1, unsigned long ulSwitch2 )
{
const portCHAR cSpeed = 20;
const char cSpeed = 20;
if( !( ulInput & ulSwitch1 ) )
{
@@ -604,8 +615,8 @@ const portCHAR cSpeed = 20;
static void prvTransmitSampleValues( void )
{
/* Variables to hold dummy x, y and z joystick axis data. */
static signed portCHAR x = 0, y = 0, z = 0;
unsigned portLONG ulStatus;
static signed char x = 0, y = 0, z = 0;
unsigned long ulStatus;
ulStatus = AT91C_BASE_PIOA->PIO_PDSR;
@@ -637,7 +648,7 @@ unsigned portLONG ulStatus;
static void prvUSBTransmitNull( void )
{
unsigned portLONG ulStatus;
unsigned long ulStatus;
/* Wait until the FIFO is free - even though we are not going to use it.
THERE IS NO TIMEOUT HERE! */
@@ -664,7 +675,7 @@ unsigned portLONG ulStatus;
static void prvSendStall( void )
{
unsigned portLONG ulStatus;
unsigned long ulStatus;
portENTER_CRITICAL();
{
@@ -679,13 +690,13 @@ unsigned portLONG ulStatus;
static void prvResetEndPoints( void )
{
unsigned portLONG ulTemp;
unsigned long ulTemp;
eDriverState = eJUST_RESET;
/* Reset all the end points. */
AT91C_BASE_UDP->UDP_RSTEP = usbEND_POINT_RESET_MASK;
AT91C_BASE_UDP->UDP_RSTEP = ( unsigned portLONG ) 0x00;
AT91C_BASE_UDP->UDP_RSTEP = ( unsigned long ) 0x00;
/* Enable data to be sent and received. */
AT91C_BASE_UDP->UDP_FADDR = AT91C_UDP_FEN;
@@ -694,7 +705,7 @@ unsigned portLONG ulTemp;
portENTER_CRITICAL();
{
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
usbCSR_SET_BIT( &ulTemp, ( ( unsigned portLONG ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
usbCSR_SET_BIT( &ulTemp, ( ( unsigned long ) ( AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_CTRL ) ) );
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulTemp;
AT91C_BASE_UDP->UDP_IER = AT91C_UDP_EPINT0;
}
@@ -726,7 +737,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
/* Read the end point for data transfer. */
portENTER_CRITICAL();
{
unsigned portLONG ulTemp;
unsigned long ulTemp;
ulTemp = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_1 ];
usbCSR_SET_BIT( &ulTemp, AT91C_UDP_EPEDS | AT91C_UDP_EPTYPE_INT_IN );
@@ -741,7 +752,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
{
/* We sent an acknowledgement of a SET_ADDRESS request. Move
to the addressed state. */
if( ulReceivedAddress != ( unsigned portLONG ) 0 )
if( ulReceivedAddress != ( unsigned long ) 0 )
{
AT91C_BASE_UDP->UDP_GLBSTATE = AT91C_UDP_FADDEN;
}
@@ -764,8 +775,8 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
if( pxMessage->ulCSR0 & AT91C_UDP_RXSETUP )
{
xUSB_REQUEST xRequest;
unsigned portCHAR ucRequest;
unsigned portLONG ulRxBytes;
unsigned char ucRequest;
unsigned long ulRxBytes;
/* A data packet is available. */
ulRxBytes = pxMessage->ulCSR0 >> 16;
@@ -835,11 +846,11 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
switch( ( pxRequest->usValue & 0xff00 ) >> 8 )
{
case usbDESCRIPTOR_TYPE_DEVICE:
prvSendControlData( ( unsigned portCHAR * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxDeviceDescriptor, pxRequest->usLength, sizeof( pxDeviceDescriptor ), pdTRUE );
break;
case usbDESCRIPTOR_TYPE_CONFIGURATION:
prvSendControlData( ( unsigned portCHAR * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &( pxConfigDescriptor ), pxRequest->usLength, sizeof( pxConfigDescriptor ), pdTRUE );
break;
case usbDESCRIPTOR_TYPE_STRING:
@@ -848,23 +859,23 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
switch( pxRequest->usValue & 0xff )
{
case usbLANGUAGE_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxLanguageStringDescriptor, pxRequest->usLength, sizeof(pxLanguageStringDescriptor), pdTRUE );
break;
case usbMANUFACTURER_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxManufacturerStringDescriptor, pxRequest->usLength, sizeof( pxManufacturerStringDescriptor ), pdTRUE );
break;
case usbPRODUCT_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxProductStringDescriptor, pxRequest->usLength, sizeof( pxProductStringDescriptor ), pdTRUE );
break;
case usbCONFIGURATION_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxConfigurationStringDescriptor, pxRequest->usLength, sizeof( pxConfigurationStringDescriptor ), pdTRUE );
break;
case usbINTERFACE_STRING:
prvSendControlData( ( unsigned portCHAR * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) &pxInterfaceStringDescriptor, pxRequest->usLength, sizeof( pxInterfaceStringDescriptor ), pdTRUE );
break;
default:
@@ -885,13 +896,13 @@ static void prvGetStandardDeviceDescriptor( xUSB_REQUEST *pxRequest )
static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest )
{
unsigned portSHORT usStatus = 0;
unsigned short usStatus = 0;
switch( pxRequest->ucRequest )
{
case usbGET_STATUS_REQUEST:
/* Just send two byte dummy status. */
prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
break;
case usbGET_DESCRIPTOR_REQUEST:
@@ -901,7 +912,7 @@ unsigned portSHORT usStatus = 0;
case usbGET_CONFIGURATION_REQUEST:
/* Send selected device configuration */
prvSendControlData( ( unsigned portCHAR * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );
prvSendControlData( ( unsigned char * ) &ucUSBConfig, sizeof( ucUSBConfig ), sizeof( ucUSBConfig ), pdFALSE );
break;
case usbSET_FEATURE_REQUEST:
@@ -916,7 +927,7 @@ unsigned portSHORT usStatus = 0;
address and set our state so we know we have received the address. */
prvUSBTransmitNull();
eDriverState = eJUST_GOT_ADDRESS;
ulReceivedAddress = ( unsigned portLONG ) pxRequest->usValue;
ulReceivedAddress = ( unsigned long ) pxRequest->usValue;
break;
case usbSET_CONFIGURATION_REQUEST:
@@ -925,7 +936,7 @@ unsigned portSHORT usStatus = 0;
we cannot actually move to the configured state until we get a
TXCOMP interrupt from this NULL packet. Therefore we just remember the
config and set our state so we know we have received the go ahead. */
ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff );
ucUSBConfig = ( unsigned char ) ( pxRequest->usValue & 0xff );
eDriverState = eJUST_GOT_CONFIG;
prvUSBTransmitNull();
break;
@@ -963,10 +974,10 @@ static void prvHandleClassInterfaceRequest( xUSB_REQUEST *pxRequest )
static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )
{
switch( ( pxRequest->usValue & ( unsigned portSHORT ) 0xff00 ) >> 8 )
switch( ( pxRequest->usValue & ( unsigned short ) 0xff00 ) >> 8 )
{
case usbHID_REPORT_DESCRIPTOR:
prvSendControlData( ( unsigned portCHAR * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
prvSendControlData( ( unsigned char * ) pxReportDescriptor, pxRequest->usLength, sizeof( pxReportDescriptor ), pdTRUE );
break;
default:
@@ -980,13 +991,13 @@ static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest )
static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest )
{
unsigned portSHORT usStatus = 0;
unsigned short usStatus = 0;
switch( pxRequest->ucRequest )
{
case usbGET_STATUS_REQUEST:
/* Send dummy 2 bytes. */
prvSendControlData( ( unsigned portCHAR * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
prvSendControlData( ( unsigned char * ) &usStatus, sizeof( usStatus ), sizeof( usStatus ), pdFALSE );
break;
case usbGET_DESCRIPTOR_REQUEST:
@@ -1023,11 +1034,11 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
static void vInitUSBInterface( void )
{
volatile unsigned portLONG ulTemp;
volatile unsigned long ulTemp;
/* Initialise a few state variables. */
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
ucUSBConfig = ( unsigned portCHAR ) 0;
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
ucUSBConfig = ( unsigned char ) 0;
eDriverState = eNOTHING;
/* HARDWARE SETUP */
@@ -1051,10 +1062,10 @@ volatile unsigned portLONG ulTemp;
/* When using the USB debugger the peripheral registers do not always get
set to the correct default values. To make sure set the relevant registers
manually here. */
AT91C_BASE_UDP->UDP_IDR = ( unsigned portLONG ) 0xffffffff;
AT91C_BASE_UDP->UDP_ICR = ( unsigned portLONG ) 0xffffffff;
AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned portLONG ) 0x00;
AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned portLONG ) 0x00;
AT91C_BASE_UDP->UDP_IDR = ( unsigned long ) 0xffffffff;
AT91C_BASE_UDP->UDP_ICR = ( unsigned long ) 0xffffffff;
AT91C_BASE_UDP->UDP_CSR[ 0 ] = ( unsigned long ) 0x00;
AT91C_BASE_UDP->UDP_CSR[ 1 ] = ( unsigned long ) 0x00;
AT91C_BASE_UDP->UDP_GLBSTATE = 0;
AT91C_BASE_UDP->UDP_FADDR = 0;
@@ -1072,14 +1083,14 @@ volatile unsigned portLONG ulTemp;
}
/*-----------------------------------------------------------*/
static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT usRequestedLength, unsigned portLONG ulLengthToSend, portLONG lSendingDescriptor )
static void prvSendControlData( unsigned char *pucData, unsigned short usRequestedLength, unsigned long ulLengthToSend, long lSendingDescriptor )
{
if( ( ( unsigned portLONG ) usRequestedLength < ulLengthToSend ) )
if( ( ( unsigned long ) usRequestedLength < ulLengthToSend ) )
{
/* Cap the data length to that requested. */
ulLengthToSend = ( unsigned portSHORT ) usRequestedLength;
ulLengthToSend = ( unsigned short ) usRequestedLength;
}
else if( ( ulLengthToSend < ( unsigned portLONG ) usRequestedLength ) && lSendingDescriptor )
else if( ( ulLengthToSend < ( unsigned long ) usRequestedLength ) && lSendingDescriptor )
{
/* We are sending a descriptor. If the descriptor is an exact
multiple of the FIFO length then it will have to be terminated
@@ -1101,7 +1112,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
/* Reinitialise the buffer index so we start sending from the start of
the data. */
pxCharsForTx.ulTotalDataLength = ulLengthToSend;
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
pxCharsForTx.ulNextCharIndex = ( unsigned long ) 0;
/* Send the first 8 bytes now. The rest will get sent in response to
TXCOMP interrupts. */
@@ -1111,7 +1122,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
static void prvSendNextSegment( void )
{
volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
volatile unsigned long ulNextLength, ulStatus, ulLengthLeftToSend;
/* Is there any data to send? */
if( pxCharsForTx.ulTotalDataLength > pxCharsForTx.ulNextCharIndex )
@@ -1136,7 +1147,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
}
/* Write the data to the FIFO. */
while( ulNextLength > ( unsigned portLONG ) 0 )
while( ulNextLength > ( unsigned long ) 0 )
{
AT91C_BASE_UDP->UDP_FDR[ usbEND_POINT_0 ] = pxCharsForTx.ucTxBuffer[ pxCharsForTx.ulNextCharIndex ];
@@ -1148,7 +1159,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
portENTER_CRITICAL();
{
ulStatus = AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ];
usbCSR_SET_BIT( &ulStatus, ( ( unsigned portLONG ) 0x10 ) );
usbCSR_SET_BIT( &ulStatus, ( ( unsigned long ) 0x10 ) );
AT91C_BASE_UDP->UDP_CSR[ usbEND_POINT_0 ] = ulStatus;
}
portEXIT_CRITICAL();

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef USB_DEMO_H
@@ -49,15 +60,15 @@
#define usbQUEUE_LENGTH ( 0x3 ) /* Must have all bits set! */
#define usbEND_POINT_0 ( 0 )
#define usbEND_POINT_1 ( 1 )
#define usbRX_COUNT_MASK ( ( unsigned portLONG ) 0x7ff )
#define usbRX_COUNT_MASK ( ( unsigned long ) 0x7ff )
#define AT91C_UDP_STALLSENT AT91C_UDP_ISOERROR
/* Structure used to take a snapshot of the USB status from within the ISR. */
typedef struct X_ISR_STATUS
{
unsigned portLONG ulISR;
unsigned portLONG ulCSR0;
unsigned portCHAR ucFifoData[ 8 ];
unsigned long ulISR;
unsigned long ulCSR0;
unsigned char ucFifoData[ 8 ];
} xISRStatus;
/* Macros to manipulate the control and status registers. These registers
@@ -70,14 +81,14 @@ unchanged by writing with a 1. */
/* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \
/* STALLSENT and RX_DATA_BK1 to 1 so the */ \
/* write has no effect. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \
( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \
\
/* Clear the FORCE_STALL and TXPKTRDY bits */ \
/* so the write has no effect. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \
( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \
\
/* Set whichever bit we want set. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( ulBit ); \
( * ( ( unsigned long * ) pulValueNow ) ) |= ( ulBit ); \
}
/*

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* Scheduler includes. */
@@ -55,14 +66,14 @@
/* Set TXCOMP, RX_DATA_BK0, RXSETUP, */ \
/* STALLSENT and RX_DATA_BK1 to 1 so the */ \
/* write has no effect. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) |= ( unsigned portLONG ) 0x4f; \
( * ( ( unsigned long * ) pulValueNow ) ) |= ( unsigned long ) 0x4f; \
\
/* Clear the FORCE_STALL and TXPKTRDY bits */ \
/* so the write has no effect. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( unsigned portLONG ) 0xffffffcf; \
( * ( ( unsigned long * ) pulValueNow ) ) &= ( unsigned long ) 0xffffffcf; \
\
/* Clear whichever bit we want clear. */ \
( * ( ( unsigned portLONG * ) pulValueNow ) ) &= ( ~ulBit ); \
( * ( ( unsigned long * ) pulValueNow ) ) &= ( ~ulBit ); \
}
@@ -78,7 +89,7 @@ void vUSB_ISR_Wrapper( void ) __attribute__((naked));
* Actual ISR handler. This must be separate from the entry point as the stack
* is used.
*/
void vUSB_ISR_Handler( void );
void vUSB_ISR_Handler( void ) __attribute__((noinline));
/*-----------------------------------------------------------*/
@@ -92,10 +103,10 @@ extern xQueueHandle xUSBInterruptQueue;
void vUSB_ISR_Handler( void )
{
portBASE_TYPE xTaskWokenByPost = pdFALSE;
static volatile unsigned portLONG ulNextMessage = 0;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
static volatile unsigned long ulNextMessage = 0;
xISRStatus *pxMessage;
unsigned portLONG ulTemp, ulRxBytes;
unsigned long ulTemp, ulRxBytes;
/* To reduce the amount of time spent in this interrupt it would be
possible to defer the majority of this processing to an 'interrupt task',
@@ -156,11 +167,11 @@ unsigned portLONG ulTemp, ulRxBytes;
/* The message now contains the entire state and optional data from
the USB interrupt. This can now be posted on the Rx queue ready for
processing at the task level. */
xTaskWokenByPost = xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, xTaskWokenByPost );
xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, &xHigherPriorityTaskWoken );
/* We may want to switch to the USB task, if this message has made
it the highest priority task that is ready to execute. */
if( xTaskWokenByPost )
if( xHigherPriorityTaskWoken )
{
portYIELD_FROM_ISR();
}
@@ -177,7 +188,7 @@ void vUSB_ISR_Wrapper( void )
/* Call the handler itself. This must be a separate function as it uses
the stack. */
vUSB_ISR_Handler();
__asm volatile ("bl vUSB_ISR_Handler");
/* Restore the context of the task that is going to
execute next. This might not be the same as the originally

View File

@@ -36,6 +36,12 @@ SECTIONS
*(.bss)
} >ram
. = ALIGN(4);
.eh_frame :
{
KEEP (*(.eh_frame))
} > ram
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -81,7 +92,7 @@
/* Demo application includes. */
#include "partest.h"
#include "USBSample.h"
#include "uip_task.h"
#include "uIP_Task.h"
#include "BlockQ.h"
#include "blocktim.h"
#include "flash.h"
@@ -176,15 +187,15 @@ static void prvSetupHardware( void )
void vApplicationTickHook( void )
{
static unsigned portLONG ulCallCount = 0, ulErrorFound = pdFALSE;
static unsigned long ulCallCount = 0, ulErrorFound = pdFALSE;
/* The rate at which LED D4 will toggle if an error has been found in one or
more of the standard demo tasks. */
const unsigned portLONG ulErrorFlashRate = 500 / portTICK_RATE_MS;
const unsigned long ulErrorFlashRate = 500 / portTICK_RATE_MS;
/* The rate at which LED D4 will toggle if no errors have been found in any
of the standard demo tasks. */
const unsigned portLONG ulNoErrorCheckRate = 5000 / portTICK_RATE_MS;
const unsigned long ulNoErrorCheckRate = 5000 / portTICK_RATE_MS;
ulCallCount++;

View File

@@ -0,0 +1,162 @@
/****************************************************************************
* Copyright (c) 2009 by Michael Fischer. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
****************************************************************************
* History:
*
* 28.03.09 mifi First Version, based on the original syscall.c from
* newlib version 1.17.0
****************************************************************************/
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
/***************************************************************************/
int _read_r (struct _reent *r, int file, char * ptr, int len)
{
r = r;
file = file;
ptr = ptr;
len = len;
errno = EINVAL;
return -1;
}
/***************************************************************************/
int _lseek_r (struct _reent *r, int file, int ptr, int dir)
{
r = r;
file = file;
ptr = ptr;
dir = dir;
return 0;
}
/***************************************************************************/
int _write_r (struct _reent *r, int file, char * ptr, int len)
{
r = r;
file = file;
ptr = ptr;
#if 0
int index;
/* For example, output string by UART */
for(index=0; index<len; index++)
{
if (ptr[index] == '\n')
{
uart_putc('\r');
}
uart_putc(ptr[index]);
}
#endif
return len;
}
/***************************************************************************/
int _close_r (struct _reent *r, int file)
{
return 0;
}
/***************************************************************************/
/* Register name faking - works in collusion with the linker. */
register char * stack_ptr asm ("sp");
caddr_t _sbrk_r (struct _reent *r, int incr)
{
extern char end asm ("end"); /* Defined by the linker. */
static char * heap_end;
char * prev_heap_end;
if (heap_end == NULL)
heap_end = & end;
prev_heap_end = heap_end;
if (heap_end + incr > stack_ptr)
{
/* Some of the libstdc++-v3 tests rely upon detecting
out of memory errors, so do not abort here. */
#if 0
extern void abort (void);
_write (1, "_sbrk: Heap and stack collision\n", 32);
abort ();
#else
errno = ENOMEM;
return (caddr_t) -1;
#endif
}
heap_end += incr;
return (caddr_t) prev_heap_end;
}
/***************************************************************************/
int _fstat_r (struct _reent *r, int file, struct stat * st)
{
r = r;
file = file;
memset (st, 0, sizeof (* st));
st->st_mode = S_IFCHR;
return 0;
}
/***************************************************************************/
int _isatty_r(struct _reent *r, int fd)
{
r = r;
fd = fd;
return 1;
}
/*** EOF ***/

View File

@@ -1,55 +1,66 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#include "FreeRTOS.h"
#include "Semphr.h"
#include "Task.h"
#include "semphr.h"
#include "task.h"
/* Wrapper for the EMAC interrupt. */
void vEMACISR_Wrapper( void ) __attribute__((naked));
/* Handler called by the ISR wrapper. This must be kept a separate
function to ensure the stack frame is correctly set up. */
void vEMACISR_Handler( void );
void vEMACISR_Handler( void ) __attribute__((noinline));
static xSemaphoreHandle xEMACSemaphore;
@@ -63,8 +74,8 @@ void vPassEMACSemaphore( xSemaphoreHandle xSemaphore )
void vEMACISR_Handler( void )
{
volatile unsigned portLONG ulIntStatus, ulRxStatus;
portBASE_TYPE xSwitchRequired = pdFALSE;
volatile unsigned long ulIntStatus, ulRxStatus;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
ulIntStatus = AT91C_BASE_EMAC->EMAC_ISR;
ulRxStatus = AT91C_BASE_EMAC->EMAC_RSR;
@@ -73,7 +84,7 @@ portBASE_TYPE xSwitchRequired = pdFALSE;
{
/* A frame has been received, signal the uIP task so it can process
the Rx descriptors. */
xSwitchRequired = xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE );
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
AT91C_BASE_EMAC->EMAC_RSR = AT91C_EMAC_REC;
}
@@ -81,7 +92,7 @@ portBASE_TYPE xSwitchRequired = pdFALSE;
AT91C_BASE_AIC->AIC_EOICR = 0;
/* Switch to the uIP task. */
if( xSwitchRequired )
if( xHigherPriorityTaskWoken )
{
/* If a task of higher priority than the interrupted task was
unblocked by the ISR then this call will ensure that the
@@ -98,7 +109,7 @@ void vEMACISR_Wrapper( void )
/* Call the handler task to do the actual work. This must be a separate
function to ensure the stack frame is correctly set up. */
vEMACISR_Handler();
__asm volatile ("bl vEMACISR_Handler");
/* Restore the context of whichever task is the next to run. */
portRESTORE_CONTEXT();

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* Standard includes. */
@@ -67,15 +78,15 @@ to use an MII interface. */
/* The buffer addresses written into the descriptors must be aligned so the
last few bits are zero. These bits have special meaning for the EMAC
peripheral and cannot be used as part of the address. */
#define emacADDRESS_MASK ( ( unsigned portLONG ) 0xFFFFFFFC )
#define emacADDRESS_MASK ( ( unsigned long ) 0xFFFFFFFC )
/* Bit used within the address stored in the descriptor to mark the last
descriptor in the array. */
#define emacRX_WRAP_BIT ( ( unsigned portLONG ) 0x02 )
#define emacRX_WRAP_BIT ( ( unsigned long ) 0x02 )
/* Bit used within the Tx descriptor status to indicate whether the
descriptor is under the control of the EMAC or the software. */
#define emacTX_BUF_USED ( ( unsigned portLONG ) 0x80000000 )
#define emacTX_BUF_USED ( ( unsigned long ) 0x80000000 )
/* A short delay is used to wait for a buffer to become available, should
one not be immediately available when trying to transmit a frame. */
@@ -87,31 +98,31 @@ one not be immediately available when trying to transmit a frame. */
#define emacNO_DELAY ( 0 )
#define emacTOTAL_FRAME_HEADER_SIZE ( 54 )
#define emacPHY_INIT_DELAY ( 5000 / portTICK_RATE_MS )
#define emacRESET_KEY ( ( unsigned portLONG ) 0xA5000000 )
#define emacRESET_LENGTH ( ( unsigned portLONG ) ( 0x01 << 8 ) )
#define emacRESET_KEY ( ( unsigned long ) 0xA5000000 )
#define emacRESET_LENGTH ( ( unsigned long ) ( 0x01 << 8 ) )
/* The Atmel header file only defines the TX frame length mask. */
#define emacRX_LENGTH_FRAME ( 0xfff )
/* Peripheral setup for the EMAC. */
#define emacPERIPHERAL_A_SETUP ( ( unsigned portLONG ) AT91C_PB2_ETX0 ) | \
( ( unsigned portLONG ) AT91C_PB12_ETXER ) | \
( ( unsigned portLONG ) AT91C_PB16_ECOL ) | \
( ( unsigned portLONG ) AT91C_PB11_ETX3 ) | \
( ( unsigned portLONG ) AT91C_PB6_ERX1 ) | \
( ( unsigned portLONG ) AT91C_PB15_ERXDV ) | \
( ( unsigned portLONG ) AT91C_PB13_ERX2 ) | \
( ( unsigned portLONG ) AT91C_PB3_ETX1 ) | \
( ( unsigned portLONG ) AT91C_PB8_EMDC ) | \
( ( unsigned portLONG ) AT91C_PB5_ERX0 ) | \
( ( unsigned portLONG ) AT91C_PB14_ERX3 ) | \
( ( unsigned portLONG ) AT91C_PB4_ECRS_ECRSDV ) | \
( ( unsigned portLONG ) AT91C_PB1_ETXEN ) | \
( ( unsigned portLONG ) AT91C_PB10_ETX2 ) | \
( ( unsigned portLONG ) AT91C_PB0_ETXCK_EREFCK ) | \
( ( unsigned portLONG ) AT91C_PB9_EMDIO ) | \
( ( unsigned portLONG ) AT91C_PB7_ERXER ) | \
( ( unsigned portLONG ) AT91C_PB17_ERXCK );
#define emacPERIPHERAL_A_SETUP ( ( unsigned long ) AT91C_PB2_ETX0 ) | \
( ( unsigned long ) AT91C_PB12_ETXER ) | \
( ( unsigned long ) AT91C_PB16_ECOL ) | \
( ( unsigned long ) AT91C_PB11_ETX3 ) | \
( ( unsigned long ) AT91C_PB6_ERX1 ) | \
( ( unsigned long ) AT91C_PB15_ERXDV ) | \
( ( unsigned long ) AT91C_PB13_ERX2 ) | \
( ( unsigned long ) AT91C_PB3_ETX1 ) | \
( ( unsigned long ) AT91C_PB8_EMDC ) | \
( ( unsigned long ) AT91C_PB5_ERX0 ) | \
( ( unsigned long ) AT91C_PB14_ERX3 ) | \
( ( unsigned long ) AT91C_PB4_ECRS_ECRSDV ) | \
( ( unsigned long ) AT91C_PB1_ETXEN ) | \
( ( unsigned long ) AT91C_PB10_ETX2 ) | \
( ( unsigned long ) AT91C_PB0_ETXCK_EREFCK ) | \
( ( unsigned long ) AT91C_PB9_EMDIO ) | \
( ( unsigned long ) AT91C_PB7_ERXER ) | \
( ( unsigned long ) AT91C_PB17_ERXCK );
/*-----------------------------------------------------------*/
@@ -139,9 +150,9 @@ static void prvSetupEMACInterrupt( void );
/*
* Some initialisation functions taken from the Atmel EMAC sample code.
*/
static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG *pulValue );
static void vReadPHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long *pulValue );
#if USE_RMII_INTERFACE != 1
static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG ulValue);
static void vWritePHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long ulValue);
#endif
static portBASE_TYPE xGetLinkSpeed( void );
static portBASE_TYPE prvProbePHY( void );
@@ -151,12 +162,12 @@ static portBASE_TYPE prvProbePHY( void );
/* Buffer written to by the EMAC DMA. Must be aligned as described by the
comment above the emacADDRESS_MASK definition. */
#pragma data_alignment=8
static volatile portCHAR pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ];
static volatile char pcRxBuffer[ NB_RX_BUFFERS * ETH_RX_BUFFER_SIZE ];
/* Buffer read by the EMAC DMA. Must be aligned as described by he comment
above the emacADDRESS_MASK definition. */
#pragma data_alignment=8
static portCHAR pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ];
static char pcTxBuffer[ NB_TX_BUFFERS * ETH_TX_BUFFER_SIZE ];
/* Descriptors used to communicate between the program and the EMAC peripheral.
These descriptors hold the locations and state of the Rx and Tx buffers. */
@@ -164,7 +175,7 @@ static volatile AT91S_TxTdDescriptor xTxDescriptors[ NB_TX_BUFFERS ];
static volatile AT91S_RxTdDescriptor xRxDescriptors[ NB_RX_BUFFERS ];
/* The IP and Ethernet addresses are read from the uIP setup. */
const portCHAR cMACAddress[ 6 ] = { uipMAC_ADDR0, uipMAC_ADDR1, uipMAC_ADDR2, uipMAC_ADDR3, uipMAC_ADDR4, uipMAC_ADDR5 };
const char cMACAddress[ 6 ] = { uipMAC_ADDR0, uipMAC_ADDR1, uipMAC_ADDR2, uipMAC_ADDR3, uipMAC_ADDR4, uipMAC_ADDR5 };
const unsigned char ucIPAddress[ 4 ] = { uipIP_ADDR0, uipIP_ADDR1, uipIP_ADDR2, uipIP_ADDR3 };
/* The semaphore used by the EMAC ISR to wake the EMAC task. */
@@ -219,7 +230,7 @@ xSemaphoreHandle xEMACInit( void )
/* PHY configuration. */
#if USE_RMII_INTERFACE != 1
{
unsigned portLONG ulControl;
unsigned long ulControl;
/* PHY has internal pull down : disable MII isolate. */
vReadPHY( AT91C_PHY_ADDR, MII_BMCR, &ulControl );
@@ -265,12 +276,12 @@ xSemaphoreHandle xEMACInit( void )
}
/*-----------------------------------------------------------*/
portLONG lEMACSend( void )
long lEMACSend( void )
{
static unsigned portBASE_TYPE uxTxBufferIndex = 0;
portBASE_TYPE xWaitCycles = 0;
portLONG lReturn = pdPASS;
portCHAR *pcBuffer;
long lReturn = pdPASS;
char *pcBuffer;
/* Is a buffer available? */
while( !( xTxDescriptors[ uxTxBufferIndex ].U_Status.status & AT91C_TRANSMIT_OK ) )
@@ -294,7 +305,7 @@ portCHAR *pcBuffer;
if( lReturn == pdPASS )
{
/* Copy the headers into the Tx buffer. These will be in the uIP buffer. */
pcBuffer = ( portCHAR * ) xTxDescriptors[ uxTxBufferIndex ].addr;
pcBuffer = ( char * ) xTxDescriptors[ uxTxBufferIndex ].addr;
memcpy( ( void * ) pcBuffer, ( void * ) uip_buf, emacTOTAL_FRAME_HEADER_SIZE );
/* If there is room, also copy in the application data if any. */
@@ -309,7 +320,7 @@ portCHAR *pcBuffer;
if( uxTxBufferIndex >= ( NB_TX_BUFFERS - 1 ) )
{
/* Fill out the necessary in the descriptor to get the data sent. */
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned portLONG ) AT91C_LENGTH_FRAME )
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned long ) AT91C_LENGTH_FRAME )
| AT91C_LAST_BUFFER
| AT91C_TRANSMIT_WRAP;
uxTxBufferIndex = 0;
@@ -317,7 +328,7 @@ portCHAR *pcBuffer;
else
{
/* Fill out the necessary in the descriptor to get the data sent. */
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned portLONG ) AT91C_LENGTH_FRAME )
xTxDescriptors[ uxTxBufferIndex ].U_Status.status = ( uip_len & ( unsigned long ) AT91C_LENGTH_FRAME )
| AT91C_LAST_BUFFER;
uxTxBufferIndex++;
}
@@ -331,11 +342,11 @@ portCHAR *pcBuffer;
}
/*-----------------------------------------------------------*/
unsigned portLONG ulEMACPoll( void )
unsigned long ulEMACPoll( void )
{
static unsigned portBASE_TYPE ulNextRxBuffer = 0;
unsigned portLONG ulSectionLength = 0, ulLengthSoFar = 0, ulEOF = pdFALSE;
portCHAR *pcSource;
unsigned long ulSectionLength = 0, ulLengthSoFar = 0, ulEOF = pdFALSE;
char *pcSource;
/* Skip any fragments. */
while( ( xRxDescriptors[ ulNextRxBuffer ].addr & AT91C_OWNERSHIP_BIT ) && !( xRxDescriptors[ ulNextRxBuffer ].U_Status.status & AT91C_SOF ) )
@@ -353,7 +364,7 @@ portCHAR *pcSource;
while( ( xRxDescriptors[ ulNextRxBuffer ].addr & AT91C_OWNERSHIP_BIT ) && !ulSectionLength )
{
pcSource = ( portCHAR * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK );
pcSource = ( char * )( xRxDescriptors[ ulNextRxBuffer ].addr & emacADDRESS_MASK );
ulSectionLength = xRxDescriptors[ ulNextRxBuffer ].U_Status.status & emacRX_LENGTH_FRAME;
if( ulSectionLength == 0 )
@@ -412,13 +423,13 @@ portCHAR *pcSource;
static void prvSetupDescriptors(void)
{
unsigned portBASE_TYPE xIndex;
unsigned portLONG ulAddress;
unsigned long ulAddress;
/* Initialise xRxDescriptors descriptor. */
for( xIndex = 0; xIndex < NB_RX_BUFFERS; ++xIndex )
{
/* Calculate the address of the nth buffer within the array. */
ulAddress = ( unsigned portLONG )( pcRxBuffer + ( xIndex * ETH_RX_BUFFER_SIZE ) );
ulAddress = ( unsigned long )( pcRxBuffer + ( xIndex * ETH_RX_BUFFER_SIZE ) );
/* Write the buffer address into the descriptor. The DMA will place
the data at this address when this descriptor is being used. Mask off
@@ -434,7 +445,7 @@ unsigned portLONG ulAddress;
for( xIndex = 0; xIndex < NB_TX_BUFFERS; ++xIndex )
{
/* Calculate the address of the nth buffer within the array. */
ulAddress = ( unsigned portLONG )( pcTxBuffer + ( xIndex * ETH_TX_BUFFER_SIZE ) );
ulAddress = ( unsigned long )( pcTxBuffer + ( xIndex * ETH_TX_BUFFER_SIZE ) );
/* Write the buffer address into the descriptor. The DMA will read
data from here when the descriptor is being used. */
@@ -447,8 +458,8 @@ unsigned portLONG ulAddress;
xTxDescriptors[ NB_TX_BUFFERS - 1 ].U_Status.status = AT91C_TRANSMIT_WRAP | AT91C_TRANSMIT_OK;
/* Tell the EMAC where to find the descriptors. */
AT91C_BASE_EMAC->EMAC_RBQP = ( unsigned portLONG ) xRxDescriptors;
AT91C_BASE_EMAC->EMAC_TBQP = ( unsigned portLONG ) xTxDescriptors;
AT91C_BASE_EMAC->EMAC_RBQP = ( unsigned long ) xRxDescriptors;
AT91C_BASE_EMAC->EMAC_TBQP = ( unsigned long ) xTxDescriptors;
/* Clear all the bits in the receive status register. */
AT91C_BASE_EMAC->EMAC_RSR = ( AT91C_EMAC_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA );
@@ -465,12 +476,12 @@ unsigned portLONG ulAddress;
static void prvSetupMACAddress( void )
{
/* Must be written SA1L then SA1H. */
AT91C_BASE_EMAC->EMAC_SA1L = ( ( unsigned portLONG ) cMACAddress[ 3 ] << 24 ) |
( ( unsigned portLONG ) cMACAddress[ 2 ] << 16 ) |
( ( unsigned portLONG ) cMACAddress[ 1 ] << 8 ) |
AT91C_BASE_EMAC->EMAC_SA1L = ( ( unsigned long ) cMACAddress[ 3 ] << 24 ) |
( ( unsigned long ) cMACAddress[ 2 ] << 16 ) |
( ( unsigned long ) cMACAddress[ 1 ] << 8 ) |
cMACAddress[ 0 ];
AT91C_BASE_EMAC->EMAC_SA1H = ( ( unsigned portLONG ) cMACAddress[ 5 ] << 8 ) |
AT91C_BASE_EMAC->EMAC_SA1H = ( ( unsigned long ) cMACAddress[ 5 ] << 8 ) |
cMACAddress[ 4 ];
}
/*-----------------------------------------------------------*/
@@ -508,7 +519,7 @@ static void prvSetupEMACInterrupt( void )
static portBASE_TYPE prvProbePHY( void )
{
unsigned portLONG ulPHYId1, ulPHYId2, ulStatus;
unsigned long ulPHYId1, ulPHYId2, ulStatus;
portBASE_TYPE xReturn = pdPASS;
/* Code supplied by Atmel (reformatted) -----------------*/
@@ -551,7 +562,7 @@ portBASE_TYPE xReturn = pdPASS;
}
/*-----------------------------------------------------------*/
static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG *pulValue )
static void vReadPHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long *pulValue )
{
/* Code supplied by Atmel (reformatted) ----------------------*/
@@ -573,7 +584,7 @@ static void vReadPHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddres
/*-----------------------------------------------------------*/
#if USE_RMII_INTERFACE != 1
static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddress, unsigned portLONG ulValue )
static void vWritePHY( unsigned char ucPHYAddress, unsigned char ucAddress, unsigned long ulValue )
{
/* Code supplied by Atmel (reformatted) ----------------------*/
@@ -596,7 +607,7 @@ static void vWritePHY( unsigned portCHAR ucPHYAddress, unsigned portCHAR ucAddre
static portBASE_TYPE xGetLinkSpeed( void )
{
unsigned portLONG ulBMSR, ulBMCR, ulLPA, ulMACCfg, ulSpeed, ulDuplex;
unsigned long ulBMSR, ulBMCR, ulLPA, ulMACCfg, ulSpeed, ulDuplex;
/* Code supplied by Atmel (reformatted) -----------------*/

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef SAM_7_EMAC_H
@@ -55,12 +66,12 @@ xSemaphoreHandle xEMACInit( void );
* Send the current uIP buffer. This copies the uIP buffer to one of the
* EMAC Tx buffers, then indicates to the EMAC that the buffer is ready.
*/
portLONG lEMACSend( void );
long lEMACSend( void );
/*
* Called in response to an EMAC Rx interrupt. Copies the received frame
* into the uIP buffer.
*/
unsigned portLONG ulEMACPoll( void );
unsigned long ulEMACPoll( void );
#endif

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef UIP_TASK_H

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
@@ -54,20 +65,23 @@
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
#define configCPU_CLOCK_HZ ( ( unsigned long ) 58982400 ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 24 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configQUEUE_REGISTRY_SIZE 0
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0

View File

@@ -1,36 +1,55 @@
# FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
#/*
# FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
#
#
# This file is part of the FreeRTOS.org distribution.
# ***************************************************************************
# * *
# * FreeRTOS tutorial books are available in pdf and paperback. *
# * Complete, revised, and edited pdf reference manuals are also *
# * available. *
# * *
# * Purchasing FreeRTOS documentation will not only help you, by *
# * ensuring you get running as quickly as possible and with an *
# * in-depth knowledge of how to use FreeRTOS, it will also help *
# * the FreeRTOS project to continue with its mission of providing *
# * professional grade, cross platform, de facto standard solutions *
# * for microcontrollers - completely free of charge! *
# * *
# * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
# * *
# * Thank you for using FreeRTOS, and thank you for your support! *
# * *
# ***************************************************************************
#
# FreeRTOS.org is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# FreeRTOS.org 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. See the
# GNU General Public License for more details.
# This file is part of the FreeRTOS distribution.
#
# You should have received a copy of the GNU General Public License
# along with FreeRTOS.org; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 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. See the GNU General Public License for
# more details. You should have received a copy of the GNU General Public
# License and the FreeRTOS license exception along with FreeRTOS; if not it
# can be viewed here: http://www.freertos.org/a00114.html and also obtained
# by writing to Richard Barry, contact details for whom are available on the
# FreeRTOS WEB site.
#
# A special exception to the GPL can be applied should you wish to distribute
# a combined work that includes FreeRTOS.org, without being obliged to provide
# the source code for any proprietary components. See the licensing section
# of http://www.FreeRTOS.org for full details of how and when the exception
# can be applied.
# 1 tab == 4 spaces!
#
# ***************************************************************************
# See http://www.FreeRTOS.org for documentation, latest information, license
# and contact details. Please ensure to read the configuration and relevant
# port sections of the online documentation.
# ***************************************************************************
# Changes from V2.4.2
# http://www.FreeRTOS.org - Documentation, latest information, license and
# contact details.
#
# + Replaced source/portable/gcc/arm7/portheap.c with source/portable/memmang/heap_2.c.
# http://www.SafeRTOS.com - A version that is certified for use in safety
# critical systems.
#
# http://www.OpenRTOS.com - Commercial support, development, porting,
# licensing and training services.
#*/
CC=arm-elf-gcc
OBJCOPY=arm-elf-objcopy
@@ -44,7 +63,7 @@ WARNINGS=-Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align
#
CFLAGS=$(WARNINGS) -D $(RUN_MODE) -D GCC_ARM7 -I. -I../../Source/include \
-I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
$(OPTIM) -fomit-frame-pointer
$(OPTIM) -fomit-frame-pointer -fno-strict-aliasing -fno-dwarf2-cfi-asm
ifeq ($(USE_THUMB_MODE),YES)
CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
@@ -103,6 +122,7 @@ $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
$(CC) -c $(CFLAGS) $< -o $@
clean :
rm -rf $(ARM_OBJ) $(THUMB_OBJ)
touch Makefile

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -50,9 +61,9 @@
#include "FreeRTOS.h"
#include "partest.h"
#define partstFIRST_IO ( ( unsigned portLONG ) 0x400 )
#define partstFIRST_IO ( ( unsigned long ) 0x400 )
#define partstNUM_LEDS ( 4 )
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) 0xffffffff )
#define partstALL_OUTPUTS_OFF ( ( unsigned long ) 0xffffffff )
/*-----------------------------------------------------------
* Simple parallel port IO routines.
@@ -70,13 +81,13 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
unsigned portLONG ulLED = partstFIRST_IO;
unsigned long ulLED = partstFIRST_IO;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
attached. */
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
/* Set of clear the output. */
if( xValue )
@@ -93,13 +104,13 @@ unsigned portLONG ulLED = partstFIRST_IO;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
attached. */
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
/* If this bit is already set, clear it, and visa versa. */
ulCurrentState = GPIO0_IOPIN;

View File

@@ -47,7 +47,7 @@ _mainCRTStartup:
for system/user, SWI and IRQ modes. Also each mode is setup with
interrupts initially disabled. */
ldr r0, .LC6
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */
mov sp, r0
sub r0, r0, #UND_STACK_SIZE
msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */

View File

@@ -36,6 +36,12 @@ SECTIONS
*(.bss)
} >ram
. = ALIGN(4);
.eh_frame :
{
KEEP (*(.eh_frame))
} > ram
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */

View File

@@ -36,6 +36,12 @@ SECTIONS
*(.bss)
} >ram
. = ALIGN(4);
.eh_frame :
{
KEEP (*(.eh_frame))
} > ram
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -109,29 +120,29 @@
/*-----------------------------------------------------------*/
/* Constants to setup I/O. */
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x0001 )
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x0004 )
#define mainP0_14 ( ( unsigned portLONG ) 0x4000 )
#define mainJTAG_PORT ( ( unsigned portLONG ) 0x3E0000UL )
#define mainTX_ENABLE ( ( unsigned long ) 0x0001 )
#define mainRX_ENABLE ( ( unsigned long ) 0x0004 )
#define mainP0_14 ( ( unsigned long ) 0x4000 )
#define mainJTAG_PORT ( ( unsigned long ) 0x3E0000UL )
/* Constants to setup the PLL. */
#define mainPLL_MUL_4 ( ( unsigned portCHAR ) 0x0003 )
#define mainPLL_DIV_1 ( ( unsigned portCHAR ) 0x0000 )
#define mainPLL_ENABLE ( ( unsigned portCHAR ) 0x0001 )
#define mainPLL_CONNECT ( ( unsigned portCHAR ) 0x0003 )
#define mainPLL_FEED_BYTE1 ( ( unsigned portCHAR ) 0xaa )
#define mainPLL_FEED_BYTE2 ( ( unsigned portCHAR ) 0x55 )
#define mainPLL_LOCK ( ( unsigned portLONG ) 0x0400 )
#define mainPLL_MUL_4 ( ( unsigned char ) 0x0003 )
#define mainPLL_DIV_1 ( ( unsigned char ) 0x0000 )
#define mainPLL_ENABLE ( ( unsigned char ) 0x0001 )
#define mainPLL_CONNECT ( ( unsigned char ) 0x0003 )
#define mainPLL_FEED_BYTE1 ( ( unsigned char ) 0xaa )
#define mainPLL_FEED_BYTE2 ( ( unsigned char ) 0x55 )
#define mainPLL_LOCK ( ( unsigned long ) 0x0400 )
/* Constants to setup the MAM. */
#define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 )
#define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 )
#define mainMAM_TIM_3 ( ( unsigned char ) 0x03 )
#define mainMAM_MODE_FULL ( ( unsigned char ) 0x02 )
/* Constants to setup the peripheral bus. */
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
#define mainBUS_CLK_FULL ( ( unsigned char ) 0x01 )
/* Constants for the ComTest tasks. */
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
#define mainCOM_TEST_LED ( 3 )
/* Priorities for the demo application tasks. */
@@ -146,10 +157,10 @@
error. */
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
#define mainON_BOARD_LED_BIT ( ( unsigned portLONG ) 0x80 )
#define mainON_BOARD_LED_BIT ( ( unsigned long ) 0x80 )
/* Constants used by the vMemCheckTask() task. */
#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )
#define mainNO_TASK ( 0 )
/* The size of the memory blocks allocated by the vMemCheckTask() task. */
@@ -169,7 +180,7 @@ void prvToggleOnBoardLED( void );
* Checks that all the demo application tasks are still executing without error
* - as described at the top of the file.
*/
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount );
static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount );
/*
* The task that executes at the highest priority and calls
@@ -212,7 +223,7 @@ int main( void )
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
/* Start the check task - which is defined in this file. */
xTaskCreate( vErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* Now all the tasks have been started - start the scheduler.
@@ -231,7 +242,7 @@ int main( void )
static void vErrorChecks( void *pvParameters )
{
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
unsigned portLONG ulMemCheckTaskRunningCount;
unsigned long ulMemCheckTaskRunningCount;
xTaskHandle xCreatedTask;
/* The parameters are not used in this function. */
@@ -255,7 +266,7 @@ xTaskHandle xCreatedTask;
ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE;
xCreatedTask = mainNO_TASK;
if( xTaskCreate( vMemCheckTask, ( signed portCHAR * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
if( xTaskCreate( vMemCheckTask, ( signed char * ) "MEM_CHECK", configMINIMAL_STACK_SIZE, ( void * ) &ulMemCheckTaskRunningCount, tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
{
/* Could not create the task - we have probably run out of heap. */
xDelayPeriod = mainERROR_FLASH_PERIOD;
@@ -334,7 +345,7 @@ static void prvSetupHardware( void )
void prvToggleOnBoardLED( void )
{
unsigned portLONG ulState;
unsigned long ulState;
ulState = GPIO0_IOPIN;
if( ulState & mainON_BOARD_LED_BIT )
@@ -348,9 +359,9 @@ unsigned portLONG ulState;
}
/*-----------------------------------------------------------*/
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
static long prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount )
{
portLONG lReturn = ( portLONG ) pdPASS;
long lReturn = ( long ) pdPASS;
/* Check all the demo tasks (other than the flash tasks) to ensure
that they are all still running, and that none of them have detected
@@ -358,44 +369,44 @@ portLONG lReturn = ( portLONG ) pdPASS;
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreComTestTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xArePollingQueuesStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreMathsTaskStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE )
{
/* The vMemCheckTask did not increment the counter - it must
have failed. */
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
return lReturn;
@@ -404,9 +415,9 @@ portLONG lReturn = ( portLONG ) pdPASS;
static void vMemCheckTask( void *pvParameters )
{
unsigned portLONG *pulMemCheckTaskRunningCounter;
unsigned long *pulMemCheckTaskRunningCounter;
void *pvMem1, *pvMem2, *pvMem3;
static portLONG lErrorOccurred = pdFALSE;
static long lErrorOccurred = pdFALSE;
/* This task is dynamically created then deleted during each cycle of the
vErrorChecks task to check the operation of the memory allocator. Each time
@@ -419,7 +430,7 @@ static portLONG lErrorOccurred = pdFALSE;
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the
vErrorChecks() task that this task is still executing without error. */
pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters;
pulMemCheckTaskRunningCounter = ( unsigned long * ) pvParameters;
for( ;; )
{

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -82,20 +93,20 @@
/*-----------------------------------------------------------*/
/* Constants to setup and access the UART. */
#define serDLAB ( ( unsigned portCHAR ) 0x80 )
#define serENABLE_INTERRUPTS ( ( unsigned portCHAR ) 0x03 )
#define serNO_PARITY ( ( unsigned portCHAR ) 0x00 )
#define ser1_STOP_BIT ( ( unsigned portCHAR ) 0x00 )
#define ser8_BIT_CHARS ( ( unsigned portCHAR ) 0x03 )
#define serFIFO_ON ( ( unsigned portCHAR ) 0x01 )
#define serCLEAR_FIFO ( ( unsigned portCHAR ) 0x06 )
#define serWANTED_CLOCK_SCALING ( ( unsigned portLONG ) 16 )
#define serDLAB ( ( unsigned char ) 0x80 )
#define serENABLE_INTERRUPTS ( ( unsigned char ) 0x03 )
#define serNO_PARITY ( ( unsigned char ) 0x00 )
#define ser1_STOP_BIT ( ( unsigned char ) 0x00 )
#define ser8_BIT_CHARS ( ( unsigned char ) 0x03 )
#define serFIFO_ON ( ( unsigned char ) 0x01 )
#define serCLEAR_FIFO ( ( unsigned char ) 0x06 )
#define serWANTED_CLOCK_SCALING ( ( unsigned long ) 16 )
/* Constants to setup and access the VIC. */
#define serUART0_VIC_CHANNEL ( ( unsigned portLONG ) 0x0006 )
#define serUART0_VIC_CHANNEL_BIT ( ( unsigned portLONG ) 0x0040 )
#define serUART0_VIC_ENABLE ( ( unsigned portLONG ) 0x0020 )
#define serCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
#define serUART0_VIC_CHANNEL ( ( unsigned long ) 0x0006 )
#define serUART0_VIC_CHANNEL_BIT ( ( unsigned long ) 0x0040 )
#define serUART0_VIC_ENABLE ( ( unsigned long ) 0x0020 )
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
#define serHANDLE ( ( xComPortHandle ) 1 )
@@ -111,19 +122,19 @@ static xQueueHandle xCharsForTx;
/*-----------------------------------------------------------*/
/* Communication flag between the interrupt service routine and serial API. */
static volatile portLONG *plTHREEmpty;
static volatile long *plTHREEmpty;
/*
* The queues are created in serialISR.c as they are used from the ISR.
* Obtain references to the queues and THRE Empty flag.
*/
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag );
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag );
/*-----------------------------------------------------------*/
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
unsigned portLONG ulDivisor, ulWantedClock;
unsigned long ulDivisor, ulWantedClock;
xComPortHandle xReturn = serHANDLE;
extern void ( vUART_ISR_Wrapper )( void );
@@ -134,7 +145,7 @@ extern void ( vUART_ISR_Wrapper )( void );
if(
( xRxedChars != serINVALID_QUEUE ) &&
( xCharsForTx != serINVALID_QUEUE ) &&
( ulWantedBaud != ( unsigned portLONG ) 0 )
( ulWantedBaud != ( unsigned long ) 0 )
)
{
portENTER_CRITICAL();
@@ -147,9 +158,9 @@ extern void ( vUART_ISR_Wrapper )( void );
UART0_LCR |= serDLAB;
/* Setup the divisor. */
UART0_DLL = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
UART0_DLL = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
ulDivisor >>= 8;
UART0_DLM = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
UART0_DLM = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
/* Turn on the FIFO's and clear the buffers. */
UART0_FCR = ( serFIFO_ON | serCLEAR_FIFO );
@@ -160,7 +171,7 @@ extern void ( vUART_ISR_Wrapper )( void );
/* Setup the VIC for the UART. */
VICIntSelect &= ~( serUART0_VIC_CHANNEL_BIT );
VICIntEnable |= serUART0_VIC_CHANNEL_BIT;
VICVectAddr1 = ( portLONG ) vUART_ISR_Wrapper;
VICVectAddr1 = ( long ) vUART_ISR_Wrapper;
VICVectCntl1 = serUART0_VIC_CHANNEL | serUART0_VIC_ENABLE;
/* Enable UART0 interrupts. */
@@ -177,7 +188,7 @@ extern void ( vUART_ISR_Wrapper )( void );
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
{
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
@@ -195,9 +206,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
}
/*-----------------------------------------------------------*/
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
{
signed portCHAR *pxNext;
signed char *pxNext;
/* NOTE: This implementation does not handle the queue being full as no
block time is used! */
@@ -207,7 +218,7 @@ signed portCHAR *pxNext;
( void ) usStringLength;
/* Send each character in the string, one at a time. */
pxNext = ( signed portCHAR * ) pcString;
pxNext = ( signed char * ) pcString;
while( *pxNext )
{
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
@@ -216,7 +227,7 @@ signed portCHAR *pxNext;
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
{
signed portBASE_TYPE xReturn;
@@ -226,7 +237,7 @@ signed portBASE_TYPE xReturn;
portENTER_CRITICAL();
{
/* Is there space to write directly to the UART? */
if( *plTHREEmpty == ( portLONG ) pdTRUE )
if( *plTHREEmpty == ( long ) pdTRUE )
{
/* We wrote the character directly to the UART, so was
successful. */
@@ -245,7 +256,7 @@ signed portBASE_TYPE xReturn;
were blocked waiting to post interrupts were not disabled. It is
possible that the serial ISR has emptied the Tx queue, in which
case we need to start the Tx off again. */
if( ( *plTHREEmpty == ( portLONG ) pdTRUE ) && ( xReturn == pdPASS ) )
if( ( *plTHREEmpty == ( long ) pdTRUE ) && ( xReturn == pdPASS ) )
{
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
*plTHREEmpty = pdFALSE;

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
@@ -64,20 +75,20 @@
/*-----------------------------------------------------------*/
/* Constant to access the VIC. */
#define serCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )
/* Constants to determine the ISR source. */
#define serSOURCE_THRE ( ( unsigned portCHAR ) 0x02 )
#define serSOURCE_RX_TIMEOUT ( ( unsigned portCHAR ) 0x0c )
#define serSOURCE_ERROR ( ( unsigned portCHAR ) 0x06 )
#define serSOURCE_RX ( ( unsigned portCHAR ) 0x04 )
#define serINTERRUPT_SOURCE_MASK ( ( unsigned portCHAR ) 0x0f )
#define serSOURCE_THRE ( ( unsigned char ) 0x02 )
#define serSOURCE_RX_TIMEOUT ( ( unsigned char ) 0x0c )
#define serSOURCE_ERROR ( ( unsigned char ) 0x06 )
#define serSOURCE_RX ( ( unsigned char ) 0x04 )
#define serINTERRUPT_SOURCE_MASK ( ( unsigned char ) 0x0f )
/* Queues used to hold received characters, and characters waiting to be
transmitted. */
static xQueueHandle xRxedChars;
static xQueueHandle xCharsForTx;
static volatile portLONG lTHREEmpty;
static volatile long lTHREEmpty;
/*-----------------------------------------------------------*/
@@ -85,21 +96,21 @@ static volatile portLONG lTHREEmpty;
* The queues are created in serialISR.c as they are used from the ISR.
* Obtain references to the queues and THRE Empty flag.
*/
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag );
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag );
/* UART0 interrupt service routine entry point. */
void vUART_ISR_Wrapper( void ) __attribute__ ((naked));
/* UART0 interrupt service routine handler. */
void vUART_ISR_Handler( void );
void vUART_ISR_Handler( void ) __attribute__ ((noinline));
/*-----------------------------------------------------------*/
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars,
xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag )
xQueueHandle *pxCharsForTx, long volatile **pplTHREEmptyFlag )
{
/* Create the queues used to hold Rx and Tx characters. */
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
/* Pass back a reference to the queues so the serial API file can
post/receive characters. */
@@ -107,7 +118,7 @@ void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle
*pxCharsForTx = xCharsForTx;
/* Initialise the THRE empty flag - and pass back a reference. */
lTHREEmpty = ( portLONG ) pdTRUE;
lTHREEmpty = ( long ) pdTRUE;
*pplTHREEmptyFlag = &lTHREEmpty;
}
/*-----------------------------------------------------------*/
@@ -119,7 +130,7 @@ void vUART_ISR_Wrapper( void )
/* Call the handler. This must be a separate function from the wrapper
to ensure the correct stack frame is set up. */
vUART_ISR_Handler();
__asm volatile ("bl vUART_ISR_Handler");
/* Restore the context of whichever task is going to run next. */
portRESTORE_CONTEXT();
@@ -128,8 +139,8 @@ void vUART_ISR_Wrapper( void )
void vUART_ISR_Handler( void )
{
signed portCHAR cChar;
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
signed char cChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt? */
switch( UART0_IIR & serINTERRUPT_SOURCE_MASK )
@@ -140,7 +151,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
case serSOURCE_THRE : /* The THRE is empty. If there is another
character in the Tx queue, send it now. */
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
{
UART0_THR = cChar;
}
@@ -157,17 +168,14 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
case serSOURCE_RX : /* A character was received. Place it in
the queue of received characters. */
cChar = UART0_RBR;
if( xQueueSendFromISR( xRxedChars, &cChar, ( portBASE_TYPE ) pdFALSE ) )
{
xTaskWokenByRx = pdTRUE;
}
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
break;
default : /* There is nothing to do, leave the ISR. */
break;
}
if( xTaskWokenByTx || xTaskWokenByRx )
if( xHigherPriorityTaskWoken )
{
portYIELD_FROM_ISR();
}

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
@@ -53,16 +64,18 @@
* application requirements.
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */
#define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 100 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 0

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*-----------------------------------------------------------
@@ -52,7 +63,7 @@
#include "partest.h"
/* Board specific defines. */
#define partstFIRST_IO ( ( unsigned portLONG ) 0x10000 )
#define partstFIRST_IO ( ( unsigned long ) 0x10000 )
#define partstNUM_LEDS ( 8 )
/*-----------------------------------------------------------*/
@@ -65,13 +76,13 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
unsigned portLONG ulLED = partstFIRST_IO;
unsigned long ulLED = partstFIRST_IO;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 1. Only P16 to P23 have an LED
attached. */
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
/* Set or clear the output. */
if( xValue )
@@ -88,13 +99,13 @@ unsigned portLONG ulLED = partstFIRST_IO;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 1. Only P10 to P13 have an LED
attached. */
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
/* If this bit is already set, clear it, and visa versa. */
ulCurrentState = IO1PIN;

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
@@ -99,29 +110,29 @@
#define mainCHECK_TASK_LED ( 7 )
/* Constants for the ComTest tasks. */
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
#define mainCOM_TEST_LED ( 4 )
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x0001 )
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x0004 )
#define mainTX_ENABLE ( ( unsigned long ) 0x0001 )
#define mainRX_ENABLE ( ( unsigned long ) 0x0004 )
/* Constants to setup the PLL. */
#define mainPLL_MUL_4 ( ( unsigned portCHAR ) 0x0003 )
#define mainPLL_DIV_1 ( ( unsigned portCHAR ) 0x0000 )
#define mainPLL_ENABLE ( ( unsigned portCHAR ) 0x0001 )
#define mainPLL_CONNECT ( ( unsigned portCHAR ) 0x0003 )
#define mainPLL_FEED_BYTE1 ( ( unsigned portCHAR ) 0xaa )
#define mainPLL_FEED_BYTE2 ( ( unsigned portCHAR ) 0x55 )
#define mainPLL_LOCK ( ( unsigned portLONG ) 0x0400 )
#define mainPLL_MUL_5 ( ( unsigned char ) 0x0004 )
#define mainPLL_DIV_1 ( ( unsigned char ) 0x0000 )
#define mainPLL_ENABLE ( ( unsigned char ) 0x0001 )
#define mainPLL_CONNECT ( ( unsigned char ) 0x0003 )
#define mainPLL_FEED_BYTE1 ( ( unsigned char ) 0xaa )
#define mainPLL_FEED_BYTE2 ( ( unsigned char ) 0x55 )
#define mainPLL_LOCK ( ( unsigned long ) 0x0400 )
/* Constants to setup the MAM. */
#define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 )
#define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 )
#define mainMAM_TIM_3 ( ( unsigned char ) 0x03 )
#define mainMAM_MODE_FULL ( ( unsigned char ) 0x02 )
/* Constants to setup the peripheral bus. */
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
#define mainBUS_CLK_FULL ( ( unsigned char ) 0x01 )
/* And finally, constant to setup the port for the LED's. */
#define mainLED_TO_OUTPUT ( ( unsigned portLONG ) 0xff0000 )
#define mainLED_TO_OUTPUT ( ( unsigned long ) 0xff0000 )
/*
* The task that executes at the highest priority and calls
@@ -139,7 +150,7 @@ static void prvSetupHardware( void );
* Checks that all the demo application tasks are still executing without error
* - as described at the top of the file.
*/
static portLONG prvCheckOtherTasksAreStillRunning( void );
static long prvCheckOtherTasksAreStillRunning( void );
/*-----------------------------------------------------------*/
@@ -181,8 +192,8 @@ void main( void )
static void prvSetupHardware( void )
{
/* Setup the PLL to multiply the XTAL input by 4. */
PLLCFG = ( mainPLL_MUL_4 | mainPLL_DIV_1 );
/* Setup the PLL to multiply the XTAL input by 5. */
PLLCFG = ( mainPLL_MUL_5 | mainPLL_DIV_1 );
/* Activate the PLL by turning it on then feeding the correct sequence of
bytes. */
@@ -205,7 +216,7 @@ static void prvSetupHardware( void )
MAMCR = mainMAM_MODE_FULL;
/* Setup the peripheral bus to be the same as the PLL output. */
VPBDIV = mainBUS_CLK_FULL;
APBDIV = mainBUS_CLK_FULL;
/* Configure the RS2332 pins. All other pins remain at their default of 0. */
PINSEL0 |= mainTX_ENABLE;
@@ -215,7 +226,7 @@ static void prvSetupHardware( void )
IO1DIR = mainLED_TO_OUTPUT;
/* Setup the peripheral bus to be the same as the PLL output. */
VPBDIV = mainBUS_CLK_FULL;
APBDIV = mainBUS_CLK_FULL;
}
/*-----------------------------------------------------------*/
@@ -249,9 +260,9 @@ portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
}
/*-----------------------------------------------------------*/
static portLONG prvCheckOtherTasksAreStillRunning( void )
static long prvCheckOtherTasksAreStillRunning( void )
{
portLONG lReturn = ( portLONG ) pdPASS;
long lReturn = ( long ) pdPASS;
/* Check all the demo tasks (other than the flash tasks) to ensure
that they are all still running, and that none of them have detected
@@ -259,32 +270,32 @@ portLONG lReturn = ( portLONG ) pdPASS;
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xArePollingQueuesStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreComTestTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
lReturn = ( portLONG ) pdFAIL;
lReturn = ( long ) pdFAIL;
}
return lReturn;

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>1</fileVersion>
<fileVersion>2</fileVersion>
<configuration>
<name>Flash Debug</name>
<toolchain>
@@ -12,7 +12,7 @@
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>15</version>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -89,16 +89,12 @@
</option>
<option>
<name>OCLastSavedByProductVersion</name>
<state>5.11.0.50615</state>
<state>5.40.0.51529</state>
</option>
<option>
<name>OCDownloadAttachToProgram</name>
<state>0</state>
</option>
<option>
<name>FlashLoaders</name>
<state>,,,,(default),</state>
</option>
<option>
<name>UseFlashLoader</name>
<state>1</state>
@@ -111,6 +107,46 @@
<name>OCBE8Slave</name>
<state>1</state>
</option>
<option>
<name>MacFile2</name>
<state></state>
</option>
<option>
<name>CDevice</name>
<state>1</state>
</option>
<option>
<name>FlashLoadersV3</name>
<state>$TOOLKIT_DIR$\config\flashloader\NXP\FlashNXPLPC256k.board</state>
</option>
<option>
<name>OCImagesSuppressCheck1</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath1</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck2</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath2</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck3</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath3</name>
<state></state>
</option>
<option>
<name>OverrideDefFlashBoard</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -257,7 +293,7 @@
<name>JLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>9</version>
<version>10</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -370,13 +406,17 @@
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCJLinkInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>LMIFTDI_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>1</version>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -395,13 +435,21 @@
<name>CCLmiftdiLogFile</name>
<state>$TOOLKIT_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCLmiFtdiInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCLmiFtdiInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>MACRAIGOR_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<version>3</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -476,6 +524,14 @@
<name>CCJTagUpdateBreakpoints</name>
<state>main</state>
</option>
<option>
<name>CCMacraigorInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCMacraigorInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -539,6 +595,19 @@
</option>
</data>
</settings>
<settings>
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>THIRDPARTY_ID</name>
<archiveVersion>2</archiveVersion>
@@ -566,11 +635,11 @@
</settings>
<debuggerPlugins>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
@@ -586,7 +655,11 @@
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
@@ -609,6 +682,10 @@
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
<configuration>
@@ -621,7 +698,7 @@
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<data>
<version>15</version>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@@ -704,10 +781,6 @@
<name>OCDownloadAttachToProgram</name>
<state>0</state>
</option>
<option>
<name>FlashLoaders</name>
<state>,,,,(default),</state>
</option>
<option>
<name>UseFlashLoader</name>
<state>1</state>
@@ -720,6 +793,46 @@
<name>OCBE8Slave</name>
<state>1</state>
</option>
<option>
<name>MacFile2</name>
<state></state>
</option>
<option>
<name>CDevice</name>
<state>1</state>
</option>
<option>
<name>FlashLoadersV3</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck1</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath1</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck2</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath2</name>
<state></state>
</option>
<option>
<name>OCImagesSuppressCheck3</name>
<state>0</state>
</option>
<option>
<name>OCImagesPath3</name>
<state></state>
</option>
<option>
<name>OverrideDefFlashBoard</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -866,7 +979,7 @@
<name>JLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>9</version>
<version>10</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@@ -979,13 +1092,17 @@
<version>0</version>
<state>0</state>
</option>
<option>
<name>CCJLinkInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>LMIFTDI_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>1</version>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@@ -1004,13 +1121,21 @@
<name>CCLmiftdiLogFile</name>
<state>$TOOLKIT_DIR$\cspycomm.log</state>
</option>
<option>
<name>CCLmiFtdiInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCLmiFtdiInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>MACRAIGOR_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>2</version>
<version>3</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@@ -1085,6 +1210,14 @@
<name>CCJTagUpdateBreakpoints</name>
<state>main</state>
</option>
<option>
<name>CCMacraigorInterfaceRadio</name>
<state>0</state>
</option>
<option>
<name>CCMacraigorInterfaceCmdLine</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -1148,6 +1281,19 @@
</option>
</data>
</settings>
<settings>
<name>STLINK_ID</name>
<archiveVersion>2</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
<name>OCDriverInfo</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>THIRDPARTY_ID</name>
<archiveVersion>2</archiveVersion>
@@ -1175,11 +1321,11 @@
</settings>
<debuggerPlugins>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
@@ -1195,7 +1341,11 @@
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ewplugin</file>
<file>$TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
@@ -1218,6 +1368,10 @@
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
</project>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>1</fileVersion>
<fileVersion>2</fileVersion>
<configuration>
<name>Flash Debug</name>
<toolchain>
@@ -12,7 +12,7 @@
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>14</version>
<version>17</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -29,7 +29,7 @@
</option>
<option>
<name>Variant</name>
<version>7</version>
<version>11</version>
<state>1</state>
</option>
<option>
@@ -93,11 +93,6 @@
<name>OGLastSavedByProductVersion</name>
<state>5.11.0.50615</state>
</option>
<option>
<name>GeneralMisraRules</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralEnableMisra</name>
<state>0</state>
@@ -122,13 +117,31 @@
<name>OGBufferedTerminalOutput</name>
<state>0</state>
</option>
<option>
<name>GenStdoutInterface</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralMisraVer</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>19</version>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -260,11 +273,6 @@
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>CompilerMisraRules</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraOverride</name>
<state>0</state>
@@ -310,6 +318,16 @@
<name>CCOptLevelSlave</name>
<state>0</state>
</option>
<option>
<name>CompilerMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
</data>
</settings>
<settings>
@@ -492,7 +510,7 @@
<debug>1</debug>
<option>
<name>OOCOutputFormat</name>
<version>1</version>
<version>2</version>
<state>0</state>
</option>
<option>
@@ -538,7 +556,7 @@
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>5</version>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@@ -681,10 +699,6 @@
<name>IlinkProgramEntryLabel</name>
<state>__iar_program_start</state>
</option>
<option>
<name>IlinkNXPLPCChecksum</name>
<state>0</state>
</option>
<option>
<name>DoFill</name>
<state>0</state>
@@ -744,6 +758,18 @@
<name>IlinkBufferedTerminalOutput</name>
<state>1</state>
</option>
<option>
<name>IlinkStdoutInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>CrcFullSize</name>
<state>0</state>
</option>
<option>
<name>IlinkIElfToolPostProcess</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@@ -783,7 +809,7 @@
<name>General</name>
<archiveVersion>3</archiveVersion>
<data>
<version>14</version>
<version>17</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@@ -800,7 +826,7 @@
</option>
<option>
<name>Variant</name>
<version>7</version>
<version>11</version>
<state>1</state>
</option>
<option>
@@ -864,11 +890,6 @@
<name>OGLastSavedByProductVersion</name>
<state>5.11.0.50615</state>
</option>
<option>
<name>GeneralMisraRules</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralEnableMisra</name>
<state>0</state>
@@ -893,13 +914,31 @@
<name>OGBufferedTerminalOutput</name>
<state>0</state>
</option>
<option>
<name>GenStdoutInterface</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>GeneralMisraVer</name>
<state>0</state>
</option>
<option>
<name>GeneralMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
</data>
</settings>
<settings>
<name>ICCARM</name>
<archiveVersion>2</archiveVersion>
<data>
<version>19</version>
<version>21</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@@ -1031,11 +1070,6 @@
<name>PreInclude</name>
<state></state>
</option>
<option>
<name>CompilerMisraRules</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraOverride</name>
<state>0</state>
@@ -1081,6 +1115,16 @@
<name>CCOptLevelSlave</name>
<state>3</state>
</option>
<option>
<name>CompilerMisraRules98</name>
<version>0</version>
<state>1000111110110101101110011100111111101110011011000101110111101101100111111111111100110011111001110111001111111111111111111111111</state>
</option>
<option>
<name>CompilerMisraRules04</name>
<version>0</version>
<state>111101110010111111111000110111111111111111111111111110010111101111010101111111111111111111111111101111111011111001111011111011111111111111111</state>
</option>
</data>
</settings>
<settings>
@@ -1263,7 +1307,7 @@
<debug>0</debug>
<option>
<name>OOCOutputFormat</name>
<version>1</version>
<version>2</version>
<state>0</state>
</option>
<option>
@@ -1309,7 +1353,7 @@
<name>ILINK</name>
<archiveVersion>0</archiveVersion>
<data>
<version>5</version>
<version>8</version>
<wantNonLocal>1</wantNonLocal>
<debug>0</debug>
<option>
@@ -1452,10 +1496,6 @@
<name>IlinkProgramEntryLabel</name>
<state>__iar_program_start</state>
</option>
<option>
<name>IlinkNXPLPCChecksum</name>
<state>0</state>
</option>
<option>
<name>DoFill</name>
<state>0</state>
@@ -1515,6 +1555,18 @@
<name>IlinkBufferedTerminalOutput</name>
<state>1</state>
</option>
<option>
<name>IlinkStdoutInterfaceSlave</name>
<state>1</state>
</option>
<option>
<name>CrcFullSize</name>
<state>0</state>
</option>
<option>
<name>IlinkIElfToolPostProcess</name>
<state>0</state>
</option>
</data>
</settings>
<settings>

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
@@ -59,27 +70,27 @@
/*-----------------------------------------------------------*/
/* Constants to setup and access the UART. */
#define serDLAB ( ( unsigned portCHAR ) 0x80 )
#define serENABLE_INTERRUPTS ( ( unsigned portCHAR ) 0x03 )
#define serNO_PARITY ( ( unsigned portCHAR ) 0x00 )
#define ser1_STOP_BIT ( ( unsigned portCHAR ) 0x00 )
#define ser8_BIT_CHARS ( ( unsigned portCHAR ) 0x03 )
#define serFIFO_ON ( ( unsigned portCHAR ) 0x01 )
#define serCLEAR_FIFO ( ( unsigned portCHAR ) 0x06 )
#define serWANTED_CLOCK_SCALING ( ( unsigned portLONG ) 16 )
#define serDLAB ( ( unsigned char ) 0x80 )
#define serENABLE_INTERRUPTS ( ( unsigned char ) 0x03 )
#define serNO_PARITY ( ( unsigned char ) 0x00 )
#define ser1_STOP_BIT ( ( unsigned char ) 0x00 )
#define ser8_BIT_CHARS ( ( unsigned char ) 0x03 )
#define serFIFO_ON ( ( unsigned char ) 0x01 )
#define serCLEAR_FIFO ( ( unsigned char ) 0x06 )
#define serWANTED_CLOCK_SCALING ( ( unsigned long ) 16 )
/* Constants to setup and access the VIC. */
#define serU0VIC_CHANNEL ( ( unsigned portLONG ) 0x0006 )
#define serU0VIC_CHANNEL_BIT ( ( unsigned portLONG ) 0x0040 )
#define serU0VIC_ENABLE ( ( unsigned portLONG ) 0x0020 )
#define serCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
#define serU0VIC_CHANNEL ( ( unsigned long ) 0x0006 )
#define serU0VIC_CHANNEL_BIT ( ( unsigned long ) 0x0040 )
#define serU0VIC_ENABLE ( ( unsigned long ) 0x0020 )
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )
/* Constants to determine the ISR source. */
#define serSOURCE_THRE ( ( unsigned portCHAR ) 0x02 )
#define serSOURCE_RX_TIMEOUT ( ( unsigned portCHAR ) 0x0c )
#define serSOURCE_ERROR ( ( unsigned portCHAR ) 0x06 )
#define serSOURCE_RX ( ( unsigned portCHAR ) 0x04 )
#define serINTERRUPT_SOURCE_MASK ( ( unsigned portCHAR ) 0x0f )
#define serSOURCE_THRE ( ( unsigned char ) 0x02 )
#define serSOURCE_RX_TIMEOUT ( ( unsigned char ) 0x0c )
#define serSOURCE_ERROR ( ( unsigned char ) 0x06 )
#define serSOURCE_RX ( ( unsigned char ) 0x04 )
#define serINTERRUPT_SOURCE_MASK ( ( unsigned char ) 0x0f )
/* Misc. */
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
@@ -92,7 +103,7 @@
transmitted. */
static xQueueHandle xRxedChars;
static xQueueHandle xCharsForTx;
static volatile portLONG lTHREEmpty = pdFALSE;
static volatile long lTHREEmpty = pdFALSE;
/*-----------------------------------------------------------*/
@@ -103,15 +114,15 @@ __arm void vSerialISR( void );
/*-----------------------------------------------------------*/
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
unsigned portLONG ulDivisor, ulWantedClock;
unsigned long ulDivisor, ulWantedClock;
xComPortHandle xReturn = serHANDLE;
extern void ( vSerialISREntry) ( void );
/* Create the queues used to hold Rx and Tx characters. */
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
/* Initialise the THRE empty flag. */
lTHREEmpty = pdTRUE;
@@ -119,7 +130,7 @@ extern void ( vSerialISREntry) ( void );
if(
( xRxedChars != serINVALID_QUEUE ) &&
( xCharsForTx != serINVALID_QUEUE ) &&
( ulWantedBaud != ( unsigned portLONG ) 0 )
( ulWantedBaud != ( unsigned long ) 0 )
)
{
portENTER_CRITICAL();
@@ -132,9 +143,9 @@ extern void ( vSerialISREntry) ( void );
U0LCR |= serDLAB;
/* Setup the divisor. */
U0DLL = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
U0DLL = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
ulDivisor >>= 8;
U0DLM = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
U0DLM = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
/* Turn on the FIFO's and clear the buffers. */
U0FCR = ( serFIFO_ON | serCLEAR_FIFO );
@@ -145,7 +156,7 @@ extern void ( vSerialISREntry) ( void );
/* Setup the VIC for the UART. */
VICIntSelect &= ~( serU0VIC_CHANNEL_BIT );
VICIntEnable |= serU0VIC_CHANNEL_BIT;
VICVectAddr1 = ( unsigned portLONG ) vSerialISREntry;
VICVectAddr1 = ( unsigned long ) vSerialISREntry;
VICVectCntl1 = serU0VIC_CHANNEL | serU0VIC_ENABLE;
/* Enable UART0 interrupts. */
@@ -164,7 +175,7 @@ extern void ( vSerialISREntry) ( void );
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
{
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
@@ -182,9 +193,9 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
}
/*-----------------------------------------------------------*/
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
{
signed portCHAR *pxNext;
signed char *pxNext;
/* NOTE: This implementation does not handle the queue being full as no
block time is used! */
@@ -194,7 +205,7 @@ signed portCHAR *pxNext;
( void ) usStringLength;
/* Send each character in the string, one at a time. */
pxNext = ( signed portCHAR * ) pcString;
pxNext = ( signed char * ) pcString;
while( *pxNext )
{
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
@@ -203,7 +214,7 @@ signed portCHAR *pxNext;
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
{
signed portBASE_TYPE xReturn;
@@ -213,7 +224,7 @@ signed portBASE_TYPE xReturn;
portENTER_CRITICAL();
{
/* Is there space to write directly to the UART? */
if( lTHREEmpty == ( portLONG ) pdTRUE )
if( lTHREEmpty == ( long ) pdTRUE )
{
/* We wrote the character directly to the UART, so was
successful. */
@@ -233,7 +244,7 @@ signed portBASE_TYPE xReturn;
were blocked waiting to post interrupts were not disabled. It is
possible that the serial ISR has emptied the Tx queue, in which
case we need to start the Tx off again. */
if( lTHREEmpty == ( portLONG ) pdTRUE )
if( lTHREEmpty == ( long ) pdTRUE )
{
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
lTHREEmpty = pdFALSE;
@@ -249,8 +260,8 @@ signed portBASE_TYPE xReturn;
__arm void vSerialISR( void )
{
signed portCHAR cChar;
portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
signed char cChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* What caused the interrupt? */
switch( U0IIR & serINTERRUPT_SOURCE_MASK )
@@ -261,7 +272,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
case serSOURCE_THRE : /* The THRE is empty. If there is another
character in the Tx queue, send it now. */
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
{
U0THR = cChar;
}
@@ -278,10 +289,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
case serSOURCE_RX : /* A character was received. Place it in
the queue of received characters. */
cChar = U0RBR;
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
{
xTaskWokenByRx = pdTRUE;
}
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
break;
default : /* There is nothing to do, leave the ISR. */
@@ -290,7 +298,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
/* Exit the ISR. If a task was woken by either a character being received
or transmitted then a context switch will occur. */
portEND_SWITCHING_ISR( ( xTaskWokenByTx || xTaskWokenByRx ) );
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
/* Clear the ISR in the VIC. */
VICVectAddr = serCLEAR_VIC_INTERRUPT;

View File

@@ -37,10 +37,10 @@ Category=_ 0
[TermIOLog]
LoggingEnabled=_ 0
LogFile=_ ""
[TraceHelper]
Enabled=0
ShowSource=1
[Disassemble mode]
mode=0
[Breakpoints]
Count=0
[TraceHelper]
Enabled=0
ShowSource=1

View File

@@ -11,7 +11,7 @@
<Column0>191</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
<Column0>244</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
</Workspace>
<Build><ColumnWidth0>18</ColumnWidth0><ColumnWidth1>1155</ColumnWidth1><ColumnWidth2>308</ColumnWidth2><ColumnWidth3>77</ColumnWidth3></Build>
<Debug-Log/>
@@ -28,7 +28,7 @@
<Windows>
<Wnd0>
<Wnd2>
<Tabs>
<Tab>
<Identity>TabID-17425-14382</Identity>
@@ -40,20 +40,20 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-22109-27077</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-12074-10873</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory><Session/></Tab><Tab><Identity>TabID-18349-15872</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-30013-18825</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-22109-27077</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-12074-10873</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory><Session/></Tab><Tab><Identity>TabID-18349-15872</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-30013-18825</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\Demo\ARM7_LPC2129_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2129_IAR\main.c</Filename><XPos>0</XPos><YPos>57</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-01284348><key>iaridepm.enu1</key></Toolbar-01284348></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>605</Bottom><Right>265</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>190714</sizeVertCX><sizeVertCY>618126</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>333</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>335</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>341141</sizeHorzCY><sizeVertCX>55000</sizeVertCX><sizeVertCY>78411</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-00abae00><key>iaridepm.enu1</key></Toolbar-00abae00></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>605</Bottom><Right>318</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>190476</sizeVertCX><sizeVertCY>618126</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>333</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>335</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>341141</sizeHorzCY><sizeVertCX>54762</sizeVertCX><sizeVertCY>78411</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@@ -1,88 +0,0 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
***************************************************************************
Please ensure to read the configuration and relevant port sections of the
online documentation.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
*/
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
#include <lpc21xx.h>
/*-----------------------------------------------------------
* Application specific definitions.
*
* These definitions should be adjusted for your particular hardware and
* application requirements.
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 100 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14250 )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#endif /* FREERTOS_CONFIG_H */

View File

@@ -1,107 +0,0 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
***************************************************************************
Please ensure to read the configuration and relevant port sections of the
online documentation.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
*/
#include "FreeRTOS.h"
#include "portable.h"
#include "partest.h"
#define partstFIRST_IO ( ( unsigned portLONG ) 0x10000 )
#define partstNUM_LEDS ( 8 )
/*-----------------------------------------------------------
* Simple parallel port IO routines.
*-----------------------------------------------------------*/
void vParTestInitialise( void )
{
/* This is performed from main() as the io bits are shared with other setup
functions. */
}
/*-----------------------------------------------------------*/
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
unsigned portLONG ulLED = partstFIRST_IO;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 0. Only P16 to P23 have an LED
attached. */
ulLED <<= ( unsigned portLONG ) uxLED;
/* Set or clear the output. */
if( xValue )
{
IOSET1 = ulLED;
}
else
{
IOCLR1 = ulLED;
}
}
}
/*-----------------------------------------------------------*/
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
attached. */
ulLED <<= ( unsigned portLONG ) uxLED;
/* If this bit is already set, clear it, and visa versa. */
ulCurrentState = IOPIN1;
if( ulCurrentState & ulLED )
{
IOCLR1 = ulLED;
}
else
{
IOSET1 = ulLED;
}
}
}

View File

@@ -1,379 +0,0 @@
/***********************************************************************/
/* This file is part of the uVision/ARM development tools */
/* Copyright KEIL ELEKTRONIK GmbH 2002-2004 */
/***********************************************************************/
/* */
/* STARTUP.S: Startup file for Philips LPC2000 device series */
/* */
/***********************************************************************/
/*
//*** <<< Use Configuration Wizard in Context Menu >>> ***
*/
// *** Startup Code (executed after Reset) ***
// Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs
Mode_USR EQU 0x10
Mode_FIQ EQU 0x11
Mode_IRQ EQU 0x12
Mode_SVC EQU 0x13
Mode_ABT EQU 0x17
Mode_UND EQU 0x1B
Mode_SYS EQU 0x1F
I_Bit EQU 0x80 /* when I bit is set, IRQ is disabled */
F_Bit EQU 0x40 /* when F bit is set, FIQ is disabled */
/*
// <h> Stack Configuration (Stack Sizes in Bytes)
// <o0> Undefined Mode <0x0-0xFFFFFFFF>
// <o1> Supervisor Mode <0x0-0xFFFFFFFF>
// <o2> Abort Mode <0x0-0xFFFFFFFF>
// <o3> Fast Interrupt Mode <0x0-0xFFFFFFFF>
// <o4> Interrupt Mode <0x0-0xFFFFFFFF>
// <o5> User/System Mode <0x0-0xFFFFFFFF>
// </h>
*/
UND_Stack_Size EQU 0x00000004
SVC_Stack_Size EQU 0x00000100
ABT_Stack_Size EQU 0x00000004
FIQ_Stack_Size EQU 0x00000004
IRQ_Stack_Size EQU 0x00000300
USR_Stack_Size EQU 0x00000200
AREA STACK, DATA, READWRITE, ALIGN=2
DS (USR_Stack_Size+3)&~3 ; Stack for User/System Mode
DS (IRQ_Stack_Size+3)&~3 ; Stack for Interrupt Mode
DS (FIQ_Stack_Size+3)&~3 ; Stack for Fast Interrupt Mode
DS (ABT_Stack_Size+3)&~3 ; Stack for Abort Mode
DS (SVC_Stack_Size+3)&~3 ; Stack for Supervisor Mode
DS (UND_Stack_Size+3)&~3 ; Stack for Undefined Mode
Top_Stack:
// Phase Locked Loop (PLL) definitions
PLL_BASE EQU 0xE01FC080 /* PLL Base Address */
PLLCON_OFS EQU 0x00 /* PLL Control Offset*/
PLLCFG_OFS EQU 0x04 /* PLL Configuration Offset */
PLLSTAT_OFS EQU 0x08 /* PLL Status Offset */
PLLFEED_OFS EQU 0x0C /* PLL Feed Offset */
PLLCON_PLLE EQU (1<<0) /* PLL Enable */
PLLCON_PLLC EQU (1<<1) /* PLL Connect */
PLLCFG_MSEL EQU (0x1F<<0) /* PLL Multiplier */
PLLCFG_PSEL EQU (0x03<<5) /* PLL Divider */
PLLSTAT_PLOCK EQU (1<<10) /* PLL Lock Status */
/*
// <e> PLL Setup
// <i> Phase Locked Loop
// <o1.0..4> MSEL: PLL Multiplier Selection
// <1-32><#-1>
// <i> M Value
// <o1.5..6> PSEL: PLL Divider Selection
// <0=> 1 <1=> 2 <2=> 4 <3=> 8
// <i> P Value
// </e>
*/
PLL_SETUP EQU 1
PLLCFG_Val EQU 0x00000024
// Memory Accelerator Module (MAM) definitions
MAM_BASE EQU 0xE01FC000 /* MAM Base Address */
MAMCR_OFS EQU 0x00 /* MAM Control Offset*/
MAMTIM_OFS EQU 0x04 /* MAM Timing Offset */
/*
// <e> MAM Setup
// <i> Memory Accelerator Module
// <o1.0..1> MAM Control
// <0=> Disabled
// <1=> Partially Enabled
// <2=> Fully Enabled
// <i> Mode
// <o2.0..2> MAM Timing
// <0=> Reserved <1=> 1 <2=> 2 <3=> 3
// <4=> 4 <5=> 5 <6=> 6 <7=> 7
// <i> Fetch Cycles
// </e>
*/
MAM_SETUP EQU 1
MAMCR_Val EQU 0x00000002
MAMTIM_Val EQU 0x00000003
// External Memory Controller (EMC) definitions
EMC_BASE EQU 0xFFE00000 /* EMC Base Address */
BCFG0_OFS EQU 0x00 /* BCFG0 Offset */
BCFG1_OFS EQU 0x04 /* BCFG1 Offset */
BCFG2_OFS EQU 0x08 /* BCFG2 Offset */
BCFG3_OFS EQU 0x0C /* BCFG3 Offset */
/*
// <e> External Memory Controller (EMC)
*/
EMC_SETUP EQU 0
/*
// <e> Bank Configuration 0 (BCFG0)
// <o1.0..3> IDCY: Idle Cycles <0-15>
// <o1.5..9> WST1: Wait States 1 <0-31>
// <o1.11..15> WST2: Wait States 2 <0-31>
// <o1.10> RBLE: Read Byte Lane Enable
// <o1.26> WP: Write Protect
// <o1.27> BM: Burst ROM
// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
// <2=> 32-bit <3=> Reserved
// </e>
*/
BCFG0_SETUP EQU 0
BCFG0_Val EQU 0x0000FBEF
/*
// <e> Bank Configuration 1 (BCFG1)
// <o1.0..3> IDCY: Idle Cycles <0-15>
// <o1.5..9> WST1: Wait States 1 <0-31>
// <o1.11..15> WST2: Wait States 2 <0-31>
// <o1.10> RBLE: Read Byte Lane Enable
// <o1.26> WP: Write Protect
// <o1.27> BM: Burst ROM
// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
// <2=> 32-bit <3=> Reserved
// </e>
*/
BCFG1_SETUP EQU 0
BCFG1_Val EQU 0x0000FBEF
/*
// <e> Bank Configuration 0 (BCFG2)
// <o1.0..3> IDCY: Idle Cycles <0-15>
// <o1.5..9> WST1: Wait States 1 <0-31>
// <o1.11..15> WST2: Wait States 2 <0-31>
// <o1.10> RBLE: Read Byte Lane Enable
// <o1.26> WP: Write Protect
// <o1.27> BM: Burst ROM
// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
// <2=> 32-bit <3=> Reserved
// </e>
*/
BCFG2_SETUP EQU 0
BCFG2_Val EQU 0x0000FBEF
/*
// <e> Bank Configuration 3 (BCFG3)
// <o1.0..3> IDCY: Idle Cycles <0-15>
// <o1.5..9> WST1: Wait States 1 <0-31>
// <o1.11..15> WST2: Wait States 2 <0-31>
// <o1.10> RBLE: Read Byte Lane Enable
// <o1.26> WP: Write Protect
// <o1.27> BM: Burst ROM
// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
// <2=> 32-bit <3=> Reserved
// </e>
*/
BCFG3_SETUP EQU 0
BCFG3_Val EQU 0x0000FBEF
/*
// </e> End of EMC
*/
// External Memory Pins definitions
PINSEL2 EQU 0xE002C014 /* PINSEL2 Address */
PINSEL2_Val EQU 0x0E6149E4 /* CS0..3, OE, WE, BLS0..3,
D0..31, A2..23, JTAG Pins */
// Starupt Code must be linked first at Address at which it expects to run.
$IF (EXTERNAL_MODE)
CODE_BASE EQU 0x80000000
$ELSE
CODE_BASE EQU 0x00000000
$ENDIF
AREA STARTUPCODE, CODE, AT CODE_BASE // READONLY, ALIGN=4
PUBLIC __startup
EXTERN CODE32 (?C?INIT)
__startup PROC CODE32
// Pre-defined interrupt handlers that may be directly
// overwritten by C interrupt functions
EXTERN CODE32 (Undef_Handler?A)
EXTERN CODE32 (vPortYieldProcessor?A)
EXTERN CODE32 (PAbt_Handler?A)
EXTERN CODE32 (DAbt_Handler?A)
EXTERN CODE32 (IRQ_Handler?A)
EXTERN CODE32 (FIQ_Handler?A)
// Exception Vectors
// Mapped to Address 0.
// Absolute addressing mode must be used.
Vectors: LDR PC,Reset_Addr
LDR PC,Undef_Addr
LDR PC,SWI_Addr
LDR PC,PAbt_Addr
LDR PC,DAbt_Addr
NOP /* Reserved Vector */
; LDR PC,IRQ_Addr
LDR PC,[PC, #-0x0FF0] /* Vector from VicVectAddr */
LDR PC,FIQ_Addr
Reset_Addr: DD Reset_Handler
Undef_Addr: DD Undef_Handler?A
SWI_Addr: DD vPortYieldProcessor?A
PAbt_Addr: DD PAbt_Handler?A
DAbt_Addr: DD DAbt_Handler?A
DD 0 /* Reserved Address */
IRQ_Addr: DD IRQ_Handler?A
FIQ_Addr: DD FIQ_Handler?A
// Reset Handler
Reset_Handler:
$IF (EXTERNAL_MODE)
LDR R0, =PINSEL2
LDR R1, =PINSEL2_Val
STR R1, [R0]
$ENDIF
IF (EMC_SETUP != 0)
LDR R0, =EMC_BASE
IF (BCFG0_SETUP != 0)
LDR R1, =BCFG0_Val
STR R1, [R0, #BCFG0_OFS]
ENDIF
IF (BCFG1_SETUP != 0)
LDR R1, =BCFG1_Val
STR R1, [R0, #BCFG1_OFS]
ENDIF
IF (BCFG2_SETUP != 0)
LDR R1, =BCFG2_Val
STR R1, [R0, #BCFG2_OFS]
ENDIF
IF (BCFG3_SETUP != 0)
LDR R1, =BCFG3_Val
STR R1, [R0, #BCFG3_OFS]
ENDIF
ENDIF
IF (PLL_SETUP != 0)
LDR R0, =PLL_BASE
MOV R1, #0xAA
MOV R2, #0x55
// Configure and Enable PLL
MOV R3, #PLLCFG_Val
STR R3, [R0, #PLLCFG_OFS]
MOV R3, #PLLCON_PLLE
STR R3, [R0, #PLLCON_OFS]
STR R1, [R0, #PLLFEED_OFS]
STR R2, [R0, #PLLFEED_OFS]
// Wait until PLL Locked
PLL_Loop: LDR R3, [R0, #PLLSTAT_OFS]
ANDS R3, R3, #PLLSTAT_PLOCK
BEQ PLL_Loop
// Switch to PLL Clock
MOV R3, #(PLLCON_PLLE | PLLCON_PLLC)
STR R3, [R0, #PLLCON_OFS]
STR R1, [R0, #PLLFEED_OFS]
STR R2, [R0, #PLLFEED_OFS]
ENDIF
IF (MAM_SETUP != 0)
LDR R0, =MAM_BASE
MOV R1, #MAMTIM_Val
STR R1, [R0, #MAMTIM_OFS]
MOV R1, #MAMCR_Val
STR R1, [R0, #MAMCR_OFS]
ENDIF
// Memory Mapping (when Interrupt Vectors are in RAM)
MEMMAP EQU 0xE01FC040 /* Memory Mapping Control */
$IF (RAM_INTVEC)
LDR R0, =MEMMAP
MOV R1, #2
STR R1, [R0]
$ENDIF
// Setup Stack for each mode
LDR R0, =Top_Stack
// Enter Undefined Instruction Mode and set its Stack Pointer
MSR CPSR_c, #Mode_UND|I_Bit|F_Bit
MOV SP, R0
SUB R0, R0, #UND_Stack_Size
// Enter Abort Mode and set its Stack Pointer
MSR CPSR_c, #Mode_ABT|I_Bit|F_Bit
MOV SP, R0
SUB R0, R0, #ABT_Stack_Size
// Enter FIQ Mode and set its Stack Pointer
MSR CPSR_c, #Mode_FIQ|I_Bit|F_Bit
MOV SP, R0
SUB R0, R0, #FIQ_Stack_Size
// Enter IRQ Mode and set its Stack Pointer
MSR CPSR_c, #Mode_IRQ|I_Bit|F_Bit
MOV SP, R0
SUB R0, R0, #IRQ_Stack_Size
// Enter Supervisor Mode and set its Stack Pointer
MSR CPSR_c, #Mode_SVC|I_Bit|F_Bit
MOV SP, R0
SUB R0, R0, #SVC_Stack_Size
// Enter S Mode and set its Stack Pointer
MSR CPSR_c, #Mode_SYS
MOV SP, R0
// Start in supervisor mode
MSR CPSR_c, #Mode_SVC|I_Bit|F_Bit
// Enter the C code
LDR R0,=?C?INIT
TST R0,#1 ; Bit-0 set: INIT is Thumb
LDREQ LR,=exit?A ; ARM Mode
LDRNE LR,=exit?T ; Thumb Mode
BX R0
ENDP
PUBLIC exit?A
exit?A PROC CODE32
B exit?A
ENDP
PUBLIC exit?T
exit?T PROC CODE16
exit: B exit?T
ENDP
END

View File

@@ -1,58 +0,0 @@
### uVision2 Project, (C) Keil Software
### Do not modify !
cExt (*.c)
aExt (*.s*; *.src; *.a*)
oExt (*.obj)
lExt (*.lib)
tExt (*.txt; *.h; *.inc)
pExt (*.plm)
CppX (*.cpp)
DaveTm { 0,0,0,0,0,0,0,0 }
Target (FreeRTOS), 0x0005 // Tools: ''
GRPOPT 1,(ARM_DEMO),1,0,0
OPTFFF 1,1,1,2,0,127,137,0,<.\main.c><main.c> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,228,255,255,255,27,0,0,0,27,0,0,0,41,4,0,0,102,2,0,0 }
OPTFFF 1,2,2,0,0,0,0,0,<.\Startup.s><Startup.s>
OPTFFF 1,3,1,0,0,0,0,0,<.\ParTest\ParTest.c><ParTest.c>
OPTFFF 1,4,1,0,0,0,0,0,<.\serial\serial.c><serial.c>
OPTFFF 1,5,1,0,0,0,0,0,<.\serial\serialISR.c><serialISR.c>
OPTFFF 1,6,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
OPTFFF 1,7,1,0,0,0,0,0,<..\..\Source\queue.c><queue.c>
OPTFFF 1,8,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
OPTFFF 1,9,1,0,0,0,0,0,<..\..\Source\portable\Keil\ARM7\port.c><port.c>
OPTFFF 1,10,1,0,0,0,0,0,<..\..\Source\portable\Keil\ARM7\portISR.c><portISR.c>
OPTFFF 1,11,1,0,0,0,0,0,<..\Common\Minimal\flash.c><flash.c>
OPTFFF 1,12,1,16777216,0,0,0,0,<..\Common\Minimal\comtest.c><comtest.c>
OPTFFF 1,13,1,0,0,0,0,0,<..\Common\Minimal\integer.c><integer.c>
OPTFFF 1,14,1,0,0,0,0,0,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
TARGOPT 1, (FreeRTOS)
KACLK=12000000
OPTTT 1,1,1,0
OPTHX 0,65535,0,0,0
OPTLX 120,65,8,<.\>
OPTOX 16
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
OPTXL 1,1,1,1,1,1,1,0,0
OPTFL 1,0,1
OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129.PDF>
OPTBL 1,(User Manual)<DATASHTS\PHILIPS\UM_LPC21XX_LPC22XX.PDF>
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
OPTDBG 44029,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
OPTKEY 0,(UL2ARM)(-U174073036 -O7 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
OPTKEY 0,(ARMDBGFLAGS)(-T5F)
OPTMM 1,0,(0x40001800)
OPTDF 0x1000080
OPTLE <>
OPTLC <>
OPTLA 0,((Port1 & 0x10000) >> 16)(FF00FF000000000000000000000000000000F0BF010000006400000000E8764817000000506F72743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020370000)
OPTLA 1,((Port1 & 0x20000) >> 17)(FF0000000000000000000000000000000000F0BF010000006400000000E8764817000000506F72743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020370000)
OPTLA 2,((Port1 & 0x40000) >> 18)(008000000000000000000000000000000000F0BF010000006400000000E8764817000000506F72743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020370000)
OPTLA 3,((Port1 & 0x80000) >> 19)(0000FF000000000000000000000000000000F0BF010000006400000000E8764817000000506F72743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000020370000)
EndOpt

View File

@@ -1,106 +0,0 @@
### uVision2 Project, (C) Keil Software
### Do not modify !
Target (FreeRTOS), 0x0005 // Tools: ''
Group (ARM_DEMO)
File 1,1,<.\main.c><main.c> 0x4162D96A
File 1,2,<.\Startup.s><Startup.s> 0x415AF382
File 1,1,<.\ParTest\ParTest.c><ParTest.c> 0x415AF50E
File 1,1,<.\serial\serial.c><serial.c> 0x4162D488
File 1,1,<.\serial\serialISR.c><serialISR.c> 0x4162D404
File 1,1,<..\..\Source\tasks.c><tasks.c> 0x4162D9E6
File 1,1,<..\..\Source\queue.c><queue.c> 0x411B5F14
File 1,1,<..\..\Source\list.c><list.c> 0x411B5F24
File 1,1,<..\..\Source\portable\Keil\ARM7\port.c><port.c> 0x4162D434
File 1,1,<..\..\Source\portable\Keil\ARM7\portISR.c><portISR.c> 0x415A85E0
File 1,1,<..\Common\Minimal\flash.c><flash.c> 0x411B5F8E
File 1,1,<..\Common\Minimal\comtest.c><comtest.c> 0x413335E6
File 1,1,<..\Common\Minimal\integer.c><integer.c> 0x415FB7EE
File 1,1,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c> 0x0
Options 1,0,0 // Target 'FreeRTOS'
Device (LPC2129)
Vendor (Philips)
Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
StupF ("STARTUP\Philips\Startup.s" ("Philips LPC2100 Startup Code"))
FlashDR (UL2ARM(-U40296420 -O7 -C0 -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000))
Rgf (LPC21xx.H)
Mem ()
C ()
A ()
RL ()
OH ()
DBC_IFX ()
DBC_CMS ()
DBC_AMS ()
DBC_LMS ()
UseEnv=0
EnvBin (D:\DevTools\Keil\arm\ARM\BIN\)
EnvInc ()
EnvLib ()
EnvReg (<28>Philips\)
OrgReg (<28>Philips\)
TgStat=16
OutDir (.\)
OutName (rtosdemo_ARM)
GenApp=1
GenLib=0
GenHex=0
Debug=1
Browse=0
LstDir (.\)
HexSel=0
MG32K=0
TGMORE=0
RunUsr 0 0 <>
RunUsr 1 0 <>
BrunUsr 0 0 <>
BrunUsr 1 0 <>
SVCSID <>
KACPU (ARM7TDMI)
TKAFL { 0,27,183,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KIROM { 1,0,0,0,0,0,0,4,0 }
KIRAM { 0,0,0,0,64,0,64,0,0 }
KXRAM { 0,0,0,0,0,0,0,0,0 }
KAOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KCAFLG { 197,132,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KCAMSC (INTERWORK)
KCADEF (KEIL_ARM7)
KCAUDF ()
KCAINC (..\Common\include\;..\..\Source\include\;..\..\Source\portable\Keil\ARM7\)
KAAFLG { 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KAAMSC ()
KAASET ()
KAARST ()
KAAINC ()
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
IncBld=1
AlwaysBuild=0
GenAsm=0
AsmAsm=0
PublicsOnly=0
StopCode=3
CustArgs ()
LibMods ()
KLAFLG { 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KLAMSC ()
KLADWN (25)
KLACFI ()
KLAASN ()
KLARES ()
KLACCL ()
KLAUCL ()
KLACSC ()
KLAUCS ()
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
OPTDBG 44029,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
FLASH1 { 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
FLASH2 (BIN\UL2ARM.DLL)
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
FLASH4 ()
EndOpt

View File

@@ -1,63 +0,0 @@
### uVision2 Project, (C) Keil Software
### Do not modify !
cExt (*.c)
aExt (*.s*; *.src; *.a*)
oExt (*.obj)
lExt (*.lib)
tExt (*.txt; *.h; *.inc)
pExt (*.plm)
CppX (*.cpp)
DaveTm { 0,0,0,0,0,0,0,0 }
Target (FreeRTOS), 0x0005 // Tools: ''
GRPOPT 1,(THUMB_DEMO),1,0,0
OPTFFF 1,1,1,1,0,121,137,0,<.\main.c><main.c> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,228,255,255,255,0,0,0,0,0,0,0,0,14,4,0,0,75,2,0,0 }
OPTFFF 1,2,2,0,0,0,0,0,<.\Startup.s><Startup.s>
OPTFFF 1,3,1,1040187392,0,0,0,0,<.\ParTest\ParTest.c><ParTest.c>
OPTFFF 1,4,1,0,0,0,0,0,<.\serial\serial.c><serial.c>
OPTFFF 1,5,1,0,0,0,0,0,<.\serial\serialISR.c><serialISR.c>
OPTFFF 1,6,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
OPTFFF 1,7,1,0,0,0,0,0,<..\..\Source\queue.c><queue.c>
OPTFFF 1,8,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
OPTFFF 1,9,1,553648128,0,0,0,0,<..\..\Source\portable\Keil\ARM7\port.c><port.c>
OPTFFF 1,10,1,0,0,0,0,0,<..\..\Source\portable\Keil\ARM7\portISR.c><portISR.c>
OPTFFF 1,11,1,0,0,0,0,0,<..\Common\Minimal\BlockQ.c><BlockQ.c>
OPTFFF 1,12,1,402653184,0,0,0,0,<..\Common\Minimal\semtest.c><semtest.c>
OPTFFF 1,13,1,0,0,0,0,0,<..\Common\Minimal\PollQ.c><PollQ.c>
OPTFFF 1,14,1,0,0,0,0,0,<..\Common\Minimal\flash.c><flash.c>
OPTFFF 1,15,1,0,0,0,0,0,<..\Common\Minimal\comtest.c><comtest.c>
OPTFFF 1,16,1,0,0,0,0,0,<..\Common\Minimal\integer.c><integer.c>
OPTFFF 1,17,1,0,0,0,0,0,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
OPTFFF 1,18,1,0,0,0,0,0,<..\Common\Minimal\dynamic.c><dynamic.c>
ExtF <..\..\SOURCE\PORTABLE\KEIL\ARM7\PORTMACRO.H> 127,127,0,{ 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,228,255,255,255,27,0,0,0,27,0,0,0,72,4,0,0,33,2,0,0 }
TARGOPT 1, (FreeRTOS)
KACLK=12000000
OPTTT 1,1,1,0
OPTHX 0,65535,0,0,0
OPTLX 120,65,8,<.\>
OPTOX 16
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
OPTXL 1,1,1,1,1,1,1,0,0
OPTFL 1,0,1
OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129.PDF>
OPTBL 1,(User Manual)<DATASHTS\PHILIPS\UM_LPC21XX_LPC22XX.PDF>
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
OPTDBG 44029,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
OPTKEY 0,(UL2ARM)(-U170927308 -O7 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
OPTKEY 0,(ARMDBGFLAGS)(-T5F)
OPTMM 1,0,(0x40000840)
OPTDF 0x1000086
OPTLE <>
OPTLC <>
OPTLA 0,((Port1 & 0x10000) >> 16)(0000FF000000000000000000000000000000F0BF010000006400000000743BA40B000000506F7274310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001C030000)
OPTLA 1,((Port1 & 0x20000) >> 17)(0000FF000000000000000000000000000000F0BF010000006400000000743BA40B000000506F7274310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001C030000)
OPTLA 2,((Port1 & 0x40000) >> 18)(0000FF000000000000000000000000000000F0BF010000006400000000743BA40B000000506F7274310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001C030000)
OPTLA 3,((Port1 & 0x80000) >> 19)(0000FF000000000000000000000000000000F0BF010000006400000000743BA40B000000506F7274310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000001C030000)
EndOpt

View File

@@ -1,110 +0,0 @@
### uVision2 Project, (C) Keil Software
### Do not modify !
Target (FreeRTOS), 0x0005 // Tools: ''
Group (THUMB_DEMO)
File 1,1,<.\main.c><main.c> 0x4162D96A
File 1,2,<.\Startup.s><Startup.s> 0x415AF382
File 1,1,<.\ParTest\ParTest.c><ParTest.c> 0x415AF50E
File 1,1,<.\serial\serial.c><serial.c> 0x4162D488
File 1,1,<.\serial\serialISR.c><serialISR.c> 0x4162D404
File 1,1,<..\..\Source\tasks.c><tasks.c> 0x4162D9E6
File 1,1,<..\..\Source\queue.c><queue.c> 0x411B5F14
File 1,1,<..\..\Source\list.c><list.c> 0x411B5F24
File 1,1,<..\..\Source\portable\Keil\ARM7\port.c><port.c> 0x4162D434
File 1,1,<..\..\Source\portable\Keil\ARM7\portISR.c><portISR.c> 0x415A85E0
File 1,1,<..\Common\Minimal\BlockQ.c><BlockQ.c> 0x411B5F8C
File 1,1,<..\Common\Minimal\semtest.c><semtest.c> 0x411B5F8C
File 1,1,<..\Common\Minimal\PollQ.c><PollQ.c> 0x411B5F8E
File 1,1,<..\Common\Minimal\flash.c><flash.c> 0x411B5F8E
File 1,1,<..\Common\Minimal\comtest.c><comtest.c> 0x413335E6
File 1,1,<..\Common\Minimal\integer.c><integer.c> 0x415FB7EE
File 1,1,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c> 0x0
File 1,1,<..\Common\Minimal\dynamic.c><dynamic.c> 0x0
Options 1,0,0 // Target 'FreeRTOS'
Device (LPC2129)
Vendor (Philips)
Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
StupF ("STARTUP\Philips\Startup.s" ("Philips LPC2100 Startup Code"))
FlashDR (UL2ARM(-U40296420 -O7 -C0 -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000))
Rgf (LPC21xx.H)
Mem ()
C ()
A ()
RL ()
OH ()
DBC_IFX ()
DBC_CMS ()
DBC_AMS ()
DBC_LMS ()
UseEnv=0
EnvBin (D:\DevTools\Keil\arm\ARM\BIN\)
EnvInc ()
EnvLib ()
EnvReg (<28>Philips\)
OrgReg (<28>Philips\)
TgStat=16
OutDir (.\)
OutName (rtosdemo_THUMB)
GenApp=1
GenLib=0
GenHex=0
Debug=1
Browse=0
LstDir (.\)
HexSel=0
MG32K=0
TGMORE=0
RunUsr 0 0 <>
RunUsr 1 0 <>
BrunUsr 0 0 <>
BrunUsr 1 0 <>
SVCSID <>
KACPU (ARM7TDMI)
TKAFL { 0,27,183,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KIROM { 1,0,0,0,0,0,0,4,0 }
KIRAM { 0,0,0,0,64,0,64,0,0 }
KXRAM { 0,0,0,0,0,0,0,0,0 }
KAOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KCAFLG { 197,156,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KCAMSC (INTERWORK)
KCADEF (KEIL_ARM7 KEIL_THUMB_INTERWORK)
KCAUDF ()
KCAINC (..\Common\include\;..\..\Source\include\;..\..\Source\portable\Keil\ARM7\)
KAAFLG { 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KAAMSC ()
KAASET ()
KAARST ()
KAAINC ()
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
IncBld=1
AlwaysBuild=0
GenAsm=0
AsmAsm=0
PublicsOnly=0
StopCode=3
CustArgs ()
LibMods ()
KLAFLG { 44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
KLAMSC ()
KLADWN (25)
KLACFI ()
KLAASN ()
KLARES ()
KLACCL ()
KLAUCL ()
KLACSC ()
KLAUCS ()
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
OPTDBG 44029,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
FLASH1 { 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
FLASH2 (BIN\UL2ARM.DLL)
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
FLASH4 ()
EndOpt

View File

@@ -1,257 +0,0 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
***************************************************************************
Please ensure to read the configuration and relevant port sections of the
online documentation.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
*/
/*
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
This file contains all the serial port components that can be compiled to
either ARM or THUMB mode. Components that must be compiled to ARM mode are
contained in serialISR.c.
*/
/* Standard includes. */
#include <stdlib.h>
/* Scheduler includes. */
#include "FreeRTOS.h"
#include "queue.h"
#include "task.h"
/* Demo application includes. */
#include "serial.h"
/*-----------------------------------------------------------*/
/* Constants to setup and access the UART. */
#define serDLAB ( ( unsigned portCHAR ) 0x80 )
#define serENABLE_INTERRUPTS ( ( unsigned portCHAR ) 0x03 )
#define serNO_PARITY ( ( unsigned portCHAR ) 0x00 )
#define ser1_STOP_BIT ( ( unsigned portCHAR ) 0x00 )
#define ser8_BIT_CHARS ( ( unsigned portCHAR ) 0x03 )
#define serFIFO_ON ( ( unsigned portCHAR ) 0x01 )
#define serCLEAR_FIFO ( ( unsigned portCHAR ) 0x06 )
#define serWANTED_CLOCK_SCALING ( ( unsigned portLONG ) 16 )
/* Constants to setup and access the VIC. */
#define serU0VIC_CHANNEL ( ( unsigned portLONG ) 0x0006 )
#define serU0VIC_CHANNEL_BIT ( ( unsigned portLONG ) 0x0040 )
#define serU0VIC_ENABLE ( ( unsigned portLONG ) 0x0020 )
/* Misc. */
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
#define serHANDLE ( ( xComPortHandle ) 1 )
#define serNO_BLOCK ( ( portTickType ) 0 )
/*-----------------------------------------------------------*/
/* Queues used to hold received characters, and characters waiting to be
transmitted. */
static xQueueHandle xRxedChars;
static xQueueHandle xCharsForTx;
/*-----------------------------------------------------------*/
/* Communication flag between the interrupt service routine and serial API. */
static volatile portLONG *plTHREEmpty;
/*
* The queues are created in serialISR.c as they are used from the ISR.
* Obtain references to the queues and THRE Empty flag.
*/
extern void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag );
/*-----------------------------------------------------------*/
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
unsigned portLONG ulDivisor, ulWantedClock;
xComPortHandle xReturn = serHANDLE;
/* The queues are used in the serial ISR routine, so are created from
serialISR.c (which is always compiled to ARM mode). */
vSerialISRCreateQueues( uxQueueLength, &xRxedChars, &xCharsForTx, &plTHREEmpty );
if(
( xRxedChars != serINVALID_QUEUE ) &&
( xCharsForTx != serINVALID_QUEUE ) &&
( ulWantedBaud != ( unsigned portLONG ) 0 )
)
{
portENTER_CRITICAL();
{
/* The reference to the ISR function is required to load into the
interrupt controller. The prototype is slightly different
depending on whether in ARM or THUMB mode. */
#ifdef KEIL_THUMB_INTERWORK
extern void ( vUART_ISR )( void ) __arm __task;
#else
extern void ( vUART_ISR )( void ) __task;
#endif
/* Setup the baud rate: Calculate the divisor value. */
ulWantedClock = ulWantedBaud * serWANTED_CLOCK_SCALING;
ulDivisor = configCPU_CLOCK_HZ / ulWantedClock;
/* Set the DLAB bit so we can access the divisor. */
U0LCR |= serDLAB;
/* Setup the divisor. */
U0DLL = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
ulDivisor >>= 8;
U0DLM = ( unsigned portCHAR ) ( ulDivisor & ( unsigned portLONG ) 0xff );
/* Turn on the FIFO's and clear the buffers. */
U0FCR = ( serFIFO_ON | serCLEAR_FIFO );
/* Setup transmission format. */
U0LCR = serNO_PARITY | ser1_STOP_BIT | ser8_BIT_CHARS;
/* Setup the VIC for the UART. */
VICIntSelect &= ~( serU0VIC_CHANNEL_BIT );
VICIntEnable |= serU0VIC_CHANNEL_BIT;
VICVectAddr1 = ( unsigned portLONG ) vUART_ISR;
VICVectCntl1 = serU0VIC_CHANNEL | serU0VIC_ENABLE;
/* Enable UART0 interrupts. */
U0IER |= serENABLE_INTERRUPTS;
}
portEXIT_CRITICAL();
}
else
{
xReturn = ( xComPortHandle ) 0;
}
return xReturn;
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
{
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
/* Get the next character from the buffer. Return false if no characters
are available, or arrive before xBlockTime expires. */
if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
{
return pdTRUE;
}
else
{
return pdFALSE;
}
}
/*-----------------------------------------------------------*/
void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )
{
signed portCHAR *pxNext;
/* NOTE: This implementation does not handle the queue being full as no
block time is used! */
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
( void ) usStringLength;
/* Send each character in the string, one at a time. */
pxNext = ( signed portCHAR * ) pcString;
while( *pxNext )
{
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
pxNext++;
}
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
{
signed portBASE_TYPE xReturn;
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
portENTER_CRITICAL();
{
/* Is there space to write directly to the UART? */
if( *plTHREEmpty == ( portLONG ) pdTRUE )
{
/* We wrote the character directly to the UART, so was
successful. */
*plTHREEmpty = pdFALSE;
U0THR = cOutChar;
xReturn = pdPASS;
}
else
{
/* We cannot write directly to the UART, so queue the character.
Block for a maximum of xBlockTime if there is no space in the
queue. It is ok to block within a critical section as each
task has it's own critical section management. */
xReturn = xQueueSend( xCharsForTx, &cOutChar, xBlockTime );
/* Depending on queue sizing and task prioritisation: While we
were blocked waiting to post interrupts were not disabled. It is
possible that the serial ISR has emptied the Tx queue, in which
case we need to start the Tx off again. */
if( *plTHREEmpty == ( portLONG ) pdTRUE )
{
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
*plTHREEmpty = pdFALSE;
U0THR = cOutChar;
}
}
}
portEXIT_CRITICAL();
return xReturn;
}
/*-----------------------------------------------------------*/

View File

@@ -1,170 +0,0 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
This file is part of the FreeRTOS.org distribution.
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
***************************************************************************
Please ensure to read the configuration and relevant port sections of the
online documentation.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
*/
/*
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
This file contains all the serial port components that must be compiled
to ARM mode. The components that can be compiled to either ARM or THUMB
mode are contained in serial.c.
*/
/* This file must always be compiled to ARM mode as it contains ISR
definitions. */
#pragma ARM
/* Standard includes. */
#include <stdlib.h>
/* Scheduler includes. */
#include "FreeRTOS.h"
#include "queue.h"
#include "task.h"
/* Demo application includes. */
#include "serial.h"
/*-----------------------------------------------------------*/
/* Constant to access the VIC. */
#define serCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
/* Constants to determine the ISR source. */
#define serSOURCE_THRE ( ( unsigned portCHAR ) 0x02 )
#define serSOURCE_RX_TIMEOUT ( ( unsigned portCHAR ) 0x0c )
#define serSOURCE_ERROR ( ( unsigned portCHAR ) 0x06 )
#define serSOURCE_RX ( ( unsigned portCHAR ) 0x04 )
#define serINTERRUPT_SOURCE_MASK ( ( unsigned portCHAR ) 0x0f )
/* Queues used to hold received characters, and characters waiting to be
transmitted. */
static xQueueHandle xRxedChars;
static xQueueHandle xCharsForTx;
static volatile portLONG lTHREEmpty;
/*-----------------------------------------------------------*/
/* UART0 interrupt service routine. This can cause a context switch so MUST
be declared "naked". */
void vUART_ISR( void );
/*-----------------------------------------------------------*/
void vSerialISRCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars,
xQueueHandle *pxCharsForTx, portLONG volatile **pplTHREEmptyFlag )
{
/* Create the queues used to hold Rx and Tx characters. */
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
/* Pass back a reference to the queues so the serial API file can
post/receive characters. */
*pxRxedChars = xRxedChars;
*pxCharsForTx = xCharsForTx;
/* Initialise the THRE empty flag - and pass back a reference. */
lTHREEmpty = pdTRUE;
*pplTHREEmptyFlag = &lTHREEmpty;
}
/*-----------------------------------------------------------*/
void vUART_ISR( void ) __task
{
portENTER_SWITCHING_ISR()
/* Now we can declare the local variables. */
static signed portCHAR cChar;
static portBASE_TYPE xTaskWokenByRx, xTaskWokenByTx;
xTaskWokenByTx = pdFALSE;
xTaskWokenByRx = pdFALSE;
/* What caused the interrupt? */
switch( U0IIR & serINTERRUPT_SOURCE_MASK )
{
case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */
cChar = U0LSR;
break;
case serSOURCE_THRE : /* The THRE is empty. If there is another
character in the Tx queue, send it now. */
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
{
U0THR = cChar;
}
else
{
/* There are no further characters
queued to send so we can indicate
that the THRE is available. */
lTHREEmpty = pdTRUE;
}
break;
case serSOURCE_RX_TIMEOUT :
case serSOURCE_RX : /* A character was received. Place it in
the queue of received characters. */
cChar = U0RBR;
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
{
xTaskWokenByRx = pdTRUE;
}
break;
default : /* There is nothing to do, leave the ISR. */
break;
}
/* Clear the ISR in the VIC. */
VICVectAddr = serCLEAR_VIC_INTERRUPT;
/* Exit the ISR. If a task was woken by either a character being received
or transmitted then a context switch will occur. */
portEXIT_SWITCHING_ISR( ( xTaskWokenByTx || xTaskWokenByRx ) );
}
/*-----------------------------------------------------------*/

View File

@@ -0,0 +1,103 @@
/*
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
1 tab == 4 spaces!
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
#include <lpc21xx.h>
/*-----------------------------------------------------------
* Application specific definitions.
*
* These definitions should be adjusted for your particular hardware and
* application requirements.
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned long ) 60000000 ) /* =12.0MHz xtal multiplied by 5 using the PLL. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 90 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) 13 * 1024 )
#define configMAX_TASK_NAME_LEN ( 8 )
#define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configQUEUE_REGISTRY_SIZE 0
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#endif /* FREERTOS_CONFIG_H */

View File

@@ -0,0 +1,118 @@
/*
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
1 tab == 4 spaces!
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#include "FreeRTOS.h"
#include "portable.h"
#include "partest.h"
#define partstFIRST_IO ( ( unsigned long ) 0x10000 )
#define partstNUM_LEDS ( 8 )
/*-----------------------------------------------------------
* Simple parallel port IO routines.
*-----------------------------------------------------------*/
void vParTestInitialise( void )
{
/* This is performed from main() as the io bits are shared with other setup
functions. */
}
/*-----------------------------------------------------------*/
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
unsigned long ulLED = partstFIRST_IO;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 0. Only P16 to P23 have an LED
attached. */
ulLED <<= ( unsigned long ) uxLED;
/* Set or clear the output. */
if( xValue )
{
IOSET1 = ulLED;
}
else
{
IOCLR1 = ulLED;
}
}
}
/*-----------------------------------------------------------*/
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
attached. */
ulLED <<= ( unsigned long ) uxLED;
/* If this bit is already set, clear it, and visa versa. */
ulCurrentState = IOPIN1;
if( ulCurrentState & ulLED )
{
IOCLR1 = ulLED;
}
else
{
IOSET1 = ulLED;
}
}
}

View File

@@ -0,0 +1,83 @@
### uVision2 Project, (C) Keil Software
### Do not modify !
cExt (*.c)
aExt (*.s*; *.src; *.a*)
oExt (*.obj)
lExt (*.lib)
tExt (*.txt; *.h; *.inc)
pExt (*.plm)
CppX (*.cpp)
DaveTm { 0,0,0,0,0,0,0,0 }
Target (RTOSDemo_ARM), 0x0004 // Tools: 'ARM-ADS'
Target (RTOSDemo_THUMB), 0x0004 // Tools: 'ARM-ADS'
GRPOPT 1,(Other),1,0,0
GRPOPT 2,(FreeRTOS),0,0,0
GRPOPT 3,(Stadard Demo),0,0,0
OPTFFF 1,1,2,0,0,0,0,0,<.\Startup.s><Startup.s>
OPTFFF 1,2,1,503316480,0,0,0,0,<.\ParTest\ParTest.c><ParTest.c>
OPTFFF 1,3,1,167772162,0,143,163,0,<.\main.c><main.c> { 44,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,66,0,0,0,66,0,0,0,135,4,0,0,33,2,0,0 }
OPTFFF 1,4,1,0,0,0,0,0,<.\serial\serial.c><serial.c>
OPTFFF 1,5,2,0,0,0,0,0,<.\serial\serialISR.s><serialISR.s>
OPTFFF 2,6,1,0,0,0,0,0,<..\..\Source\tasks.c><tasks.c>
OPTFFF 2,7,1,0,0,0,0,0,<..\..\Source\list.c><list.c>
OPTFFF 2,8,1,754974720,0,0,0,0,<..\..\Source\queue.c><queue.c>
OPTFFF 2,9,1,0,0,0,0,0,<..\..\Source\portable\RVDS\ARM7_LPC21xx\port.c><port.c>
OPTFFF 2,10,1,520093696,0,0,0,0,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
OPTFFF 2,11,2,301989888,0,0,0,0,<..\..\Source\portable\RVDS\ARM7_LPC21xx\portASM.s><portASM.s>
OPTFFF 3,12,1,0,0,0,0,0,<..\Common\Minimal\flash.c><flash.c>
OPTFFF 3,13,1,0,0,0,0,0,<..\Common\Minimal\comtest.c><comtest.c>
OPTFFF 3,14,1,0,0,0,0,0,<..\Common\Minimal\BlockQ.c><BlockQ.c>
OPTFFF 3,15,1,0,0,0,0,0,<..\Common\Minimal\dynamic.c><dynamic.c>
OPTFFF 3,16,1,0,0,0,0,0,<..\Common\Minimal\PollQ.c><PollQ.c>
OPTFFF 3,17,1,0,0,0,0,0,<..\Common\Minimal\semtest.c><semtest.c>
TARGOPT 1, (RTOSDemo_ARM)
ADSCLK=12000000
OPTTT 1,1,1,0
OPTHX 1,65535,0,0,0
OPTLX 79,66,8,<.\>
OPTOX 16
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
OPTXL 1,1,1,1,1,1,1,0,0
OPTFL 1,0,0
OPTAX 8
OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129.PDF>
OPTBL 1,(User Manual)<DATASHTS\PHILIPS\user_manual_LPC2119_2129_2194_2292_2294.PDF>
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=932,102,1307,529,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
OPTKEY 0,(UL2ARM)(-UU0605F6E -O47 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
OPTKEY 0,(ARMDBGFLAGS)(-T5F)
OPTDF 0x86
OPTLE <>
OPTLC <>
EndOpt
TARGOPT 2, (RTOSDemo_THUMB)
ADSCLK=12000000
OPTTT 1,1,1,0
OPTHX 1,65535,0,0,0
OPTLX 79,66,8,<.\>
OPTOX 16
OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
OPTXL 1,1,1,1,1,1,1,0,0
OPTFL 1,0,1
OPTAX 8
OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129.PDF>
OPTBL 1,(User Manual)<DATASHTS\PHILIPS\user_manual_LPC2119_2129_2194_2292_2294.PDF>
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
OPTKEY 0,(UL2ARM)(-UU0605F6E -O39 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO19 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
OPTKEY 0,(DLGDARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=-1,-1,-1,-1,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
OPTKEY 0,(ARMDBGFLAGS)(-T5F)
OPTDF 0x82
OPTLE <>
OPTLC <>
EndOpt

View File

@@ -0,0 +1,209 @@
### uVision2 Project, (C) Keil Software
### Do not modify !
Target (RTOSDemo_ARM), 0x0004 // Tools: 'ARM-ADS'
Target (RTOSDemo_THUMB), 0x0004 // Tools: 'ARM-ADS'
Group (Other)
Group (FreeRTOS)
Group (Stadard Demo)
File 1,2,<.\Startup.s><Startup.s>
File 1,1,<.\ParTest\ParTest.c><ParTest.c>
File 1,1,<.\main.c><main.c>
File 1,1,<.\serial\serial.c><serial.c>
File 1,2,<.\serial\serialISR.s><serialISR.s>
File 2,1,<..\..\Source\tasks.c><tasks.c>
File 2,1,<..\..\Source\list.c><list.c>
File 2,1,<..\..\Source\queue.c><queue.c>
File 2,1,<..\..\Source\portable\RVDS\ARM7_LPC21xx\port.c><port.c>
File 2,1,<..\..\Source\portable\MemMang\heap_2.c><heap_2.c>
File 2,2,<..\..\Source\portable\RVDS\ARM7_LPC21xx\portASM.s><portASM.s>
File 3,1,<..\Common\Minimal\flash.c><flash.c>
File 3,1,<..\Common\Minimal\comtest.c><comtest.c>
File 3,1,<..\Common\Minimal\BlockQ.c><BlockQ.c>
File 3,1,<..\Common\Minimal\dynamic.c><dynamic.c>
File 3,1,<..\Common\Minimal\PollQ.c><PollQ.c>
File 3,1,<..\Common\Minimal\semtest.c><semtest.c>
Options 1,0,0 // Target 'RTOSDemo_ARM'
Device (LPC2129)
Vendor (NXP (founded by Philips))
Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
StupF ("STARTUP\Philips\Startup.s" ("Philips LPC2100 Startup Code"))
FlashDR (UL2ARM(-U40296420 -O7 -C0 -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000))
DevID (3648)
Rgf (LPC21xx.H)
Mem ()
C ()
A ()
RL ()
OH ()
DBC_IFX ()
DBC_CMS ()
DBC_AMS ()
DBC_LMS ()
UseEnv=0
EnvBin ()
EnvInc ()
EnvLib ()
EnvReg (<28>Philips\)
OrgReg (<28>Philips\)
TgStat=16
OutDir (.\)
OutName (RTOSDemo)
GenApp=1
GenLib=0
GenHex=0
Debug=1
Browse=1
LstDir (.\)
HexSel=1
MG32K=0
TGMORE=0
RunUsr 0 0 <>
RunUsr 1 0 <>
BrunUsr 0 0 <>
BrunUsr 1 0 <>
CrunUsr 0 0 <>
CrunUsr 1 0 <>
SVCSID <>
GLFLAGS=1790
ADSFLGA { 243,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ACPUTYP (ARM7TDMI)
RVDEV ()
ADSTFLGA { 0,12,0,2,99,0,0,66,0,0,0,0,0,0,0,0,0,0,0,0 }
OCMADSOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
OCMADSIRAM { 0,0,0,0,64,0,64,0,0 }
OCMADSIROM { 1,0,0,0,0,0,0,4,0 }
OCMADSXRAM { 0,0,0,0,0,0,0,0,0 }
OCR_RVCT { 1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,64,0,0,0,0,0,0,0,0,0,0,0 }
RV_STAVEC ()
ADSCCFLG { 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSCMISC ()
ADSCDEFN (ARM7_LPC21xx_KEIL_RVDS)
ADSCUDEF ()
ADSCINCD (.;..\..\Source\portable\RVDS\ARM7_LPC21xx;..\Common\include;..\..\Source\include)
ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSAMISC ()
ADSADEFN ()
ADSAUDEF ()
ADSAINCD (..\..\Source\portable\RVDS\ARM7_LPC21xx)
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
IncBld=1
AlwaysBuild=0
GenAsm=0
AsmAsm=0
PublicsOnly=0
StopCode=3
CustArgs ()
LibMods ()
ADSLDFG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSLDTA (0x00000000)
ADSLDDA (0x40000000)
ADSLDSC ()
ADSLDIB ()
ADSLDIC ()
ADSLDMC ()
ADSLDIF ()
ADSLDDW ()
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
FLASH1 { 1,0,0,0,1,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0 }
FLASH2 (BIN\UL2ARM.DLL)
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
FLASH4 ()
EndOpt
Options 2,0,0 // Target 'RTOSDemo_THUMB'
Device (LPC2129)
Vendor (NXP (founded by Philips))
Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
StupF ("STARTUP\Philips\Startup.s" ("Philips LPC2100 Startup Code"))
FlashDR (UL2ARM(-U40296420 -O7 -C0 -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000))
DevID (3648)
Rgf (LPC21xx.H)
Mem ()
C ()
A ()
RL ()
OH ()
DBC_IFX ()
DBC_CMS ()
DBC_AMS ()
DBC_LMS ()
UseEnv=0
EnvBin ()
EnvInc ()
EnvLib ()
EnvReg (<28>Philips\)
OrgReg (<28>Philips\)
TgStat=16
OutDir (.\bin\)
OutName (RTOSDemo)
GenApp=1
GenLib=0
GenHex=1
Debug=1
Browse=1
LstDir (.\)
HexSel=1
MG32K=0
TGMORE=0
RunUsr 0 0 <>
RunUsr 1 0 <>
BrunUsr 0 0 <>
BrunUsr 1 0 <>
CrunUsr 0 0 <>
CrunUsr 1 0 <>
SVCSID <>
GLFLAGS=1790
ADSFLGA { 243,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ACPUTYP (ARM7TDMI)
RVDEV ()
ADSTFLGA { 0,12,0,2,99,4,0,66,0,0,0,0,0,0,0,0,0,0,0,0 }
OCMADSOCM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
OCMADSIRAM { 0,0,0,0,64,0,64,0,0 }
OCMADSIROM { 1,0,0,0,0,0,0,4,0 }
OCMADSXRAM { 0,0,0,0,0,0,0,0,0 }
OCR_RVCT { 1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,4,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,64,0,0,0,0,0,0,0,0,0,0,0 }
RV_STAVEC ()
ADSCCFLG { 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSCMISC ()
ADSCDEFN (ARM7_LPC21xx_KEIL_RVDS KEIL_THUMB_INTERWORK)
ADSCUDEF ()
ADSCINCD (.;..\..\Source\portable\RVDS\ARM7_LPC21xx;..\Common\include;..\..\Source\include)
ADSASFLG { 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSAMISC ()
ADSADEFN ()
ADSAUDEF ()
ADSAINCD (..\..\Source\portable\RVDS\ARM7_LPC21xx)
PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
IncBld=1
AlwaysBuild=0
GenAsm=0
AsmAsm=0
PublicsOnly=0
StopCode=3
CustArgs ()
LibMods ()
ADSLDFG { 17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
ADSLDTA (0x00000000)
ADSLDDA (0x40000000)
ADSLDSC ()
ADSLDIB ()
ADSLDIC ()
ADSLDMC ()
ADSLDIF ()
ADSLDDW ()
OPTDL (SARM.DLL)(-cLPC2100)(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
OPTDBG 49150,0,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
FLASH1 { 1,0,0,0,1,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0 }
FLASH2 (BIN\UL2ARM.DLL)
FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
FLASH4 ()
EndOpt

View File

@@ -0,0 +1,15 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x00000000 0x00040000 { ; load region size_region
ER_IROM1 0x00000000 0x00040000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
}
RW_IRAM1 0x40000000 0x00004000 { ; RW data
.ANY (+RW +ZI)
}
}

View File

@@ -0,0 +1,35 @@
*** Creating Trace Output File 'RTOSDemo.tra' Ok.
### Preparing for ADS-LD.
### Creating ADS-LD Command Line
### List of Objects: adding '"startup.o"'
### List of Objects: adding '"partest.o"'
### List of Objects: adding '"main.o"'
### List of Objects: adding '"serial.o"'
### List of Objects: adding '"serialisr.o"'
### List of Objects: adding '"tasks.o"'
### List of Objects: adding '"list.o"'
### List of Objects: adding '"queue.o"'
### List of Objects: adding '"port.o"'
### List of Objects: adding '"heap_2.o"'
### List of Objects: adding '".\portasm.o"'
### List of Objects: adding '"flash.o"'
### List of Objects: adding '"comtest.o"'
### List of Objects: adding '"blockq.o"'
### List of Objects: adding '"dynamic.o"'
### List of Objects: adding '"pollq.o"'
### List of Objects: adding '"semtest.o"'
### ADS-LD Command completed:
--device DARMP "startup.o" "partest.o" "main.o" "serial.o" "serialisr.o" "tasks.o" "list.o" "queue.o" "port.o" "heap_2.o" ".\portasm.o" "flash.o" "comtest.o" "blockq.o" "dynamic.o" "pollq.o" "semtest.o" --strict --scatter "RTOSDemo.sct"
--autoat --summary_stderr --info summarysizes --map --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers
--list ".\RTOSDemo.map" -o "RTOSDemo.axf"### Preparing Environment (PrepEnvAds)
### ADS-LD Output File: 'RTOSDemo.axf'
### ADS-LD Command File: 'RTOSDemo.lnp'
### Checking for dirty Components...
### Creating CmdFile 'RTOSDemo.lnp', Handle=0x000002E0
### Writing '.lnp' file
### ADS-LD Command file 'RTOSDemo.lnp' is ready.
### ADS-LD: About to start ADS-LD Thread.

View File

@@ -0,0 +1,2 @@
Dependencies for Project 'RTOSDemo', Target 'Target 1': (DO NOT MODIFY !)
F (.\Startup.s)(0x47F4A5D0)(--device DARMP -g --apcs=interwork -I "C:\Devtools\Keil305_2\ARM\INC\Philips" --list "Startup.lst" --xref -o "Startup.o")

View File

@@ -0,0 +1,429 @@
;/*****************************************************************************/
;/* STARTUP.S: Startup file for Philips LPC2000 */
;/*****************************************************************************/
;/* <<< Use Configuration Wizard in Context Menu >>> */
;/*****************************************************************************/
;/* This file is part of the uVision/ARM development tools. */
;/* Copyright (c) 2005-2007 Keil Software. All rights reserved. */
;/* This software may only be used under the terms of a valid, current, */
;/* end user licence from KEIL for a compatible version of KEIL software */
;/* development tools. Nothing else gives you the right to use this software. */
;/*****************************************************************************/
;/*
; * The STARTUP.S code is executed after CPU Reset. This file may be
; * translated with the following SET symbols. In uVision these SET
; * symbols are entered under Options - ASM - Define.
; *
; * REMAP: when set the startup code initializes the register MEMMAP
; * which overwrites the settings of the CPU configuration pins. The
; * startup and interrupt vectors are remapped from:
; * 0x00000000 default setting (not remapped)
; * 0x80000000 when EXTMEM_MODE is used
; * 0x40000000 when RAM_MODE is used
; *
; * EXTMEM_MODE: when set the device is configured for code execution
; * from external memory starting at address 0x80000000.
; *
; * RAM_MODE: when set the device is configured for code execution
; * from on-chip RAM starting at address 0x40000000.
; *
; * EXTERNAL_MODE: when set the PIN2SEL values are written that enable
; * the external BUS at startup.
; */
; Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs
Mode_USR EQU 0x10
Mode_FIQ EQU 0x11
Mode_IRQ EQU 0x12
Mode_SVC EQU 0x13
Mode_ABT EQU 0x17
Mode_UND EQU 0x1B
Mode_SYS EQU 0x1F
I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled
F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled
;// <h> Stack Configuration (Stack Sizes in Bytes)
;// <o0> Undefined Mode <0x0-0xFFFFFFFF:8>
;// <o1> Supervisor Mode <0x0-0xFFFFFFFF:8>
;// <o2> Abort Mode <0x0-0xFFFFFFFF:8>
;// <o3> Fast Interrupt Mode <0x0-0xFFFFFFFF:8>
;// <o4> Interrupt Mode <0x0-0xFFFFFFFF:8>
;// <o5> User/System Mode <0x0-0xFFFFFFFF:8>
;// </h>
UND_Stack_Size EQU 0x00000008
SVC_Stack_Size EQU 0x00000300
ABT_Stack_Size EQU 0x00000008
FIQ_Stack_Size EQU 0x00000008
IRQ_Stack_Size EQU 0x00000300
USR_Stack_Size EQU 0x00000008
Stack_Size EQU (UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + \
FIQ_Stack_Size + IRQ_Stack_Size + USR_Stack_Size )
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
;__initial_sp SPACE ISR_Stack_Size
Stack_Top EQU Stack_Mem + Stack_Size
;// <h> Heap Configuration
;// <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF>
;// </h>
Heap_Size EQU 0x00000000
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
; VPBDIV definitions
VPBDIV EQU 0xE01FC100 ; VPBDIV Address
;// <e> VPBDIV Setup
;// <i> Peripheral Bus Clock Rate
;// <o1.0..1> VPBDIV: VPB Clock
;// <0=> VPB Clock = CPU Clock / 4
;// <1=> VPB Clock = CPU Clock
;// <2=> VPB Clock = CPU Clock / 2
;// <o1.4..5> XCLKDIV: XCLK Pin
;// <0=> XCLK Pin = CPU Clock / 4
;// <1=> XCLK Pin = CPU Clock
;// <2=> XCLK Pin = CPU Clock / 2
;// </e>
VPBDIV_SETUP EQU 0
VPBDIV_Val EQU 0x00000000
; Phase Locked Loop (PLL) definitions
PLL_BASE EQU 0xE01FC080 ; PLL Base Address
PLLCON_OFS EQU 0x00 ; PLL Control Offset
PLLCFG_OFS EQU 0x04 ; PLL Configuration Offset
PLLSTAT_OFS EQU 0x08 ; PLL Status Offset
PLLFEED_OFS EQU 0x0C ; PLL Feed Offset
PLLCON_PLLE EQU (1<<0) ; PLL Enable
PLLCON_PLLC EQU (1<<1) ; PLL Connect
PLLCFG_MSEL EQU (0x1F<<0) ; PLL Multiplier
PLLCFG_PSEL EQU (0x03<<5) ; PLL Divider
PLLSTAT_PLOCK EQU (1<<10) ; PLL Lock Status
;// <e> PLL Setup
;// <o1.0..4> MSEL: PLL Multiplier Selection
;// <1-32><#-1>
;// <i> M Value
;// <o1.5..6> PSEL: PLL Divider Selection
;// <0=> 1 <1=> 2 <2=> 4 <3=> 8
;// <i> P Value
;// </e>
PLL_SETUP EQU 1
PLLCFG_Val EQU 0x00000024
; Memory Accelerator Module (MAM) definitions
MAM_BASE EQU 0xE01FC000 ; MAM Base Address
MAMCR_OFS EQU 0x00 ; MAM Control Offset
MAMTIM_OFS EQU 0x04 ; MAM Timing Offset
;// <e> MAM Setup
;// <o1.0..1> MAM Control
;// <0=> Disabled
;// <1=> Partially Enabled
;// <2=> Fully Enabled
;// <i> Mode
;// <o2.0..2> MAM Timing
;// <0=> Reserved <1=> 1 <2=> 2 <3=> 3
;// <4=> 4 <5=> 5 <6=> 6 <7=> 7
;// <i> Fetch Cycles
;// </e>
MAM_SETUP EQU 1
MAMCR_Val EQU 0x00000002
MAMTIM_Val EQU 0x00000004
; External Memory Controller (EMC) definitions
EMC_BASE EQU 0xFFE00000 ; EMC Base Address
BCFG0_OFS EQU 0x00 ; BCFG0 Offset
BCFG1_OFS EQU 0x04 ; BCFG1 Offset
BCFG2_OFS EQU 0x08 ; BCFG2 Offset
BCFG3_OFS EQU 0x0C ; BCFG3 Offset
;// <e> External Memory Controller (EMC)
EMC_SETUP EQU 0
;// <e> Bank Configuration 0 (BCFG0)
;// <o1.0..3> IDCY: Idle Cycles <0-15>
;// <o1.5..9> WST1: Wait States 1 <0-31>
;// <o1.11..15> WST2: Wait States 2 <0-31>
;// <o1.10> RBLE: Read Byte Lane Enable
;// <o1.26> WP: Write Protect
;// <o1.27> BM: Burst ROM
;// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
;// <2=> 32-bit <3=> Reserved
;// </e>
BCFG0_SETUP EQU 0
BCFG0_Val EQU 0x0000FBEF
;// <e> Bank Configuration 1 (BCFG1)
;// <o1.0..3> IDCY: Idle Cycles <0-15>
;// <o1.5..9> WST1: Wait States 1 <0-31>
;// <o1.11..15> WST2: Wait States 2 <0-31>
;// <o1.10> RBLE: Read Byte Lane Enable
;// <o1.26> WP: Write Protect
;// <o1.27> BM: Burst ROM
;// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
;// <2=> 32-bit <3=> Reserved
;// </e>
BCFG1_SETUP EQU 0
BCFG1_Val EQU 0x0000FBEF
;// <e> Bank Configuration 2 (BCFG2)
;// <o1.0..3> IDCY: Idle Cycles <0-15>
;// <o1.5..9> WST1: Wait States 1 <0-31>
;// <o1.11..15> WST2: Wait States 2 <0-31>
;// <o1.10> RBLE: Read Byte Lane Enable
;// <o1.26> WP: Write Protect
;// <o1.27> BM: Burst ROM
;// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
;// <2=> 32-bit <3=> Reserved
;// </e>
BCFG2_SETUP EQU 0
BCFG2_Val EQU 0x0000FBEF
;// <e> Bank Configuration 3 (BCFG3)
;// <o1.0..3> IDCY: Idle Cycles <0-15>
;// <o1.5..9> WST1: Wait States 1 <0-31>
;// <o1.11..15> WST2: Wait States 2 <0-31>
;// <o1.10> RBLE: Read Byte Lane Enable
;// <o1.26> WP: Write Protect
;// <o1.27> BM: Burst ROM
;// <o1.28..29> MW: Memory Width <0=> 8-bit <1=> 16-bit
;// <2=> 32-bit <3=> Reserved
;// </e>
BCFG3_SETUP EQU 0
BCFG3_Val EQU 0x0000FBEF
;// </e> End of EMC
; External Memory Pins definitions
PINSEL2 EQU 0xE002C014 ; PINSEL2 Address
PINSEL2_Val EQU 0x0E6149E4 ; CS0..3, OE, WE, BLS0..3,
; D0..31, A2..23, JTAG Pins
PRESERVE8
; Area Definition and Entry Point
; Startup Code must be linked first at Address at which it expects to run.
AREA RESET, CODE, READONLY
ARM
; Exception Vectors
; Mapped to Address 0.
; Absolute addressing mode must be used.
; Dummy Handlers are implemented as infinite loops which can be modified.
IMPORT vPortYieldProcessor
Vectors LDR PC, Reset_Addr
LDR PC, Undef_Addr
LDR PC, SWI_Addr
LDR PC, PAbt_Addr
LDR PC, DAbt_Addr
NOP ; Reserved Vector
; LDR PC, IRQ_Addr
LDR PC, [PC, #-0x0FF0] ; Vector from VicVectAddr
LDR PC, FIQ_Addr
Reset_Addr DCD Reset_Handler
Undef_Addr DCD Undef_Handler
SWI_Addr DCD vPortYieldProcessor
PAbt_Addr DCD PAbt_Handler
DAbt_Addr DCD DAbt_Handler
DCD 0 ; Reserved Address
IRQ_Addr DCD IRQ_Handler
FIQ_Addr DCD FIQ_Handler
Undef_Handler B Undef_Handler
SWI_Handler B SWI_Handler
PAbt_Handler B PAbt_Handler
DAbt_Handler B DAbt_Handler
IRQ_Handler B IRQ_Handler
FIQ_Handler B FIQ_Handler
; Reset Handler
EXPORT Reset_Handler
Reset_Handler
; Setup External Memory Pins
IF :DEF:EXTERNAL_MODE
LDR R0, =PINSEL2
LDR R1, =PINSEL2_Val
STR R1, [R0]
ENDIF
; Setup External Memory Controller
IF EMC_SETUP <> 0
LDR R0, =EMC_BASE
IF BCFG0_SETUP <> 0
LDR R1, =BCFG0_Val
STR R1, [R0, #BCFG0_OFS]
ENDIF
IF BCFG1_SETUP <> 0
LDR R1, =BCFG1_Val
STR R1, [R0, #BCFG1_OFS]
ENDIF
IF BCFG2_SETUP <> 0
LDR R1, =BCFG2_Val
STR R1, [R0, #BCFG2_OFS]
ENDIF
IF BCFG3_SETUP <> 0
LDR R1, =BCFG3_Val
STR R1, [R0, #BCFG3_OFS]
ENDIF
ENDIF ; EMC_SETUP
; Setup VPBDIV
IF VPBDIV_SETUP <> 0
LDR R0, =VPBDIV
LDR R1, =VPBDIV_Val
STR R1, [R0]
ENDIF
; Setup PLL
IF PLL_SETUP <> 0
LDR R0, =PLL_BASE
MOV R1, #0xAA
MOV R2, #0x55
; Configure and Enable PLL
MOV R3, #PLLCFG_Val
STR R3, [R0, #PLLCFG_OFS]
MOV R3, #PLLCON_PLLE
STR R3, [R0, #PLLCON_OFS]
STR R1, [R0, #PLLFEED_OFS]
STR R2, [R0, #PLLFEED_OFS]
; Wait until PLL Locked
PLL_Loop LDR R3, [R0, #PLLSTAT_OFS]
ANDS R3, R3, #PLLSTAT_PLOCK
BEQ PLL_Loop
; Switch to PLL Clock
MOV R3, #(PLLCON_PLLE:OR:PLLCON_PLLC)
STR R3, [R0, #PLLCON_OFS]
STR R1, [R0, #PLLFEED_OFS]
STR R2, [R0, #PLLFEED_OFS]
ENDIF ; PLL_SETUP
; Setup MAM
IF MAM_SETUP <> 0
LDR R0, =MAM_BASE
MOV R1, #MAMTIM_Val
STR R1, [R0, #MAMTIM_OFS]
MOV R1, #MAMCR_Val
STR R1, [R0, #MAMCR_OFS]
ENDIF ; MAM_SETUP
; Memory Mapping (when Interrupt Vectors are in RAM)
MEMMAP EQU 0xE01FC040 ; Memory Mapping Control
IF :DEF:REMAP
LDR R0, =MEMMAP
IF :DEF:EXTMEM_MODE
MOV R1, #3
ELIF :DEF:RAM_MODE
MOV R1, #2
ELSE
MOV R1, #1
ENDIF
STR R1, [R0]
ENDIF
; Initialise Interrupt System
; ...
; Setup Stack for each mode
LDR R0, =Stack_Top
; Enter Undefined Instruction Mode and set its Stack Pointer
MSR CPSR_c, #Mode_UND:OR:I_Bit:OR:F_Bit
MOV SP, R0
SUB R0, R0, #UND_Stack_Size
; Enter Abort Mode and set its Stack Pointer
MSR CPSR_c, #Mode_ABT:OR:I_Bit:OR:F_Bit
MOV SP, R0
SUB R0, R0, #ABT_Stack_Size
; Enter FIQ Mode and set its Stack Pointer
MSR CPSR_c, #Mode_FIQ:OR:I_Bit:OR:F_Bit
MOV SP, R0
SUB R0, R0, #FIQ_Stack_Size
; Enter IRQ Mode and set its Stack Pointer
MSR CPSR_c, #Mode_IRQ:OR:I_Bit:OR:F_Bit
MOV SP, R0
SUB R0, R0, #IRQ_Stack_Size
; Enter Supervisor Mode and set its Stack Pointer
MSR CPSR_c, #Mode_SVC:OR:I_Bit:OR:F_Bit
MOV SP, R0
SUB R0, R0, #SVC_Stack_Size
; Enter the C code
IMPORT __main
LDR R0, =__main
BX R0
IF :DEF:__MICROLIB
EXPORT __heap_base
EXPORT __heap_limit
ELSE
; User Initial Stack & Heap
AREA |.text|, CODE, READONLY
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap
LDR R0, = Heap_Mem
LDR R1, = (Stack_Mem + IRQ_Stack_Size + USR_Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
ENDIF
END

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -77,28 +88,18 @@
/* Demo application includes. */
#include "partest.h"
#include "flash.h"
#include "integer.h"
#include "comtest2.h"
#include "serial.h"
#ifdef KEIL_THUMB_INTERWORK
/*
THUMB mode allows more tasks to be created without the executable
binary exceeding the limits allowed by the evaluation version of
uVision3.
*/
#include "PollQ.h"
#include "BlockQ.h"
#include "semtest.h"
#include "dynamic.h"
#endif
#include "PollQ.h"
#include "BlockQ.h"
#include "semtest.h"
#include "dynamic.h"
/*-----------------------------------------------------------*/
/* Constants to setup I/O and processor. */
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x0001 )
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x0004 )
#define mainTX_ENABLE ( ( unsigned portLONG ) 0x00010000 ) /* UART1. */
#define mainRX_ENABLE ( ( unsigned portLONG ) 0x00040000 ) /* UART1. */
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
#define mainLED_TO_OUTPUT ( ( unsigned portLONG ) 0xff0000 )
@@ -107,12 +108,12 @@
#define mainCOM_TEST_LED ( 3 )
/* Priorities for the demo application tasks. */
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
/* Constants used by the "check" task. As described at the head of this file
the check task toggles an LED. The rate at which the LED flashes is used to
@@ -159,18 +160,12 @@ int main( void )
prvSetupHardware();
/* Start the demo/test application tasks. */
vStartIntegerMathTasks( tskIDLE_PRIORITY );
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
#ifdef KEIL_THUMB_INTERWORK
/* When using THUMB mode we can start more tasks without the executable
exceeding the size limit imposed by the evaluation version of uVision3. */
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
vStartDynamicPriorityTasks();
#endif
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
vStartDynamicPriorityTasks();
/* Start the check task - which is defined in this file. This is the task
that periodically checks to see that all the other tasks are executing
@@ -186,8 +181,9 @@ int main( void )
these demo application projects then ensure Supervisor mode is used here. */
vTaskStartScheduler();
/* Should never reach here! */
return 0;
/* Should never reach here! If you do then there was not enough heap
available for the idle task to be created. */
for( ;; );
}
/*-----------------------------------------------------------*/
@@ -229,7 +225,7 @@ static void prvSetupHardware( void )
/* Perform the hardware setup required. This is minimal as most of the
setup is managed by the settings in the project file. */
/* Configure the RS2332 pins. All other pins remain at their default of 0. */
/* Configure the UART1 pins. All other pins remain at their default of 0. */
PINSEL0 |= mainTX_ENABLE;
PINSEL0 |= mainRX_ENABLE;
@@ -248,42 +244,30 @@ portLONG lReturn = pdPASS;
/* Check all the demo tasks (other than the flash tasks) to ensure
that they are all still running, and that none of them have detected
an error. */
if( xAreIntegerMathsTaskStillRunning() != pdPASS )
{
lReturn = pdFAIL;
}
if( xAreComTestTasksStillRunning() != pdPASS )
{
lReturn = pdFAIL;
}
#ifdef KEIL_THUMB_INTERWORK
if( xArePollingQueuesStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
/* When using THUMB mode we can start more tasks without the executable
exceeding the size limit imposed by the evaluation version of uVision3. */
if( xArePollingQueuesStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
#endif
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
lReturn = pdFAIL;
}
return lReturn;
}

View File

@@ -0,0 +1,332 @@
/*
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
1 tab == 4 spaces!
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
Note this driver is used to test the FreeRTOS port. It is NOT intended to
be an example of an efficient implementation!
*/
/* Standard includes. */
#include <stdlib.h>
/* Scheduler includes. */
#include "FreeRTOS.h"
#include "queue.h"
#include "task.h"
/* Demo application includes. */
#include "serial.h"
/*-----------------------------------------------------------*/
/* Constants to setup and access the UART. */
#define serDLAB ( ( unsigned char ) 0x80 )
#define serENABLE_INTERRUPTS ( ( unsigned char ) 0x03 )
#define serNO_PARITY ( ( unsigned char ) 0x00 )
#define ser1_STOP_BIT ( ( unsigned char ) 0x00 )
#define ser8_BIT_CHARS ( ( unsigned char ) 0x03 )
#define serFIFO_ON ( ( unsigned char ) 0x01 )
#define serCLEAR_FIFO ( ( unsigned char ) 0x06 )
#define serWANTED_CLOCK_SCALING ( ( unsigned long ) 16 )
/* Constants to setup and access the VIC. */
#define serU1VIC_CHANNEL ( ( unsigned long ) 0x0007 )
#define serU1VIC_CHANNEL_BIT ( ( unsigned long ) 0x0080 )
#define serU1VIC_ENABLE ( ( unsigned long ) 0x0020 )
/* Misc. */
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
#define serHANDLE ( ( xComPortHandle ) 1 )
#define serNO_BLOCK ( ( portTickType ) 0 )
/* Constant to access the VIC. */
#define serCLEAR_VIC_INTERRUPT ( ( unsigned long ) 0 )
/* Constants to determine the ISR source. */
#define serSOURCE_THRE ( ( unsigned char ) 0x02 )
#define serSOURCE_RX_TIMEOUT ( ( unsigned char ) 0x0c )
#define serSOURCE_ERROR ( ( unsigned char ) 0x06 )
#define serSOURCE_RX ( ( unsigned char ) 0x04 )
#define serINTERRUPT_SOURCE_MASK ( ( unsigned char ) 0x0f )
#define serINTERRUPT_IS_PENDING ( ( unsigned char ) 0x01 )
/*-----------------------------------------------------------*/
/*
* The asm wrapper for the interrupt service routine.
*/
extern void vUART_ISREntry( void );
/*
* The C function called from the asm wrapper.
*/
void vUART_ISRHandler( void );
/*-----------------------------------------------------------*/
/* Queues used to hold received characters, and characters waiting to be
transmitted. */
static xQueueHandle xRxedChars;
static xQueueHandle xCharsForTx;
/* Communication flag between the interrupt service routine and serial API. */
static volatile long lTHREEmpty;
/*-----------------------------------------------------------*/
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
unsigned long ulDivisor, ulWantedClock;
xComPortHandle xReturn = serHANDLE;
/* Create the queues used to hold Rx and Tx characters. */
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
/* Initialise the THRE empty flag. */
lTHREEmpty = pdTRUE;
if(
( xRxedChars != serINVALID_QUEUE ) &&
( xCharsForTx != serINVALID_QUEUE ) &&
( ulWantedBaud != ( unsigned long ) 0 )
)
{
portENTER_CRITICAL()
{
/* Setup the baud rate: Calculate the divisor value. */
ulWantedClock = ulWantedBaud * serWANTED_CLOCK_SCALING;
ulDivisor = configCPU_CLOCK_HZ / ulWantedClock;
/* Set the DLAB bit so we can access the divisor. */
U1LCR |= serDLAB;
/* Setup the divisor. */
U1DLL = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
ulDivisor >>= 8;
U1DLM = ( unsigned char ) ( ulDivisor & ( unsigned long ) 0xff );
/* Turn on the FIFO's and clear the buffers. */
U1FCR = ( serFIFO_ON | serCLEAR_FIFO );
/* Setup transmission format. */
U1LCR = serNO_PARITY | ser1_STOP_BIT | ser8_BIT_CHARS;
/* Setup the VIC for the UART. */
VICIntSelect &= ~( serU1VIC_CHANNEL_BIT );
VICIntEnable |= serU1VIC_CHANNEL_BIT;
VICVectAddr1 = ( unsigned long ) vUART_ISREntry;
VICVectCntl1 = serU1VIC_CHANNEL | serU1VIC_ENABLE;
/* Enable UART0 interrupts. */
U1IER |= serENABLE_INTERRUPTS;
}
portEXIT_CRITICAL();
}
else
{
xReturn = ( xComPortHandle ) 0;
}
return xReturn;
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
{
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
/* Get the next character from the buffer. Return false if no characters
are available, or arrive before xBlockTime expires. */
if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
{
return pdTRUE;
}
else
{
return pdFALSE;
}
}
/*-----------------------------------------------------------*/
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
{
signed char *pxNext;
/* NOTE: This implementation does not handle the queue being full as no
block time is used! */
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
( void ) usStringLength;
/* Send each character in the string, one at a time. */
pxNext = ( signed char * ) pcString;
while( *pxNext )
{
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
pxNext++;
}
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
{
signed portBASE_TYPE xReturn;
/* The port handle is not required as this driver only supports UART0. */
( void ) pxPort;
portENTER_CRITICAL();
{
/* Is there space to write directly to the UART? */
if( lTHREEmpty == ( long ) pdTRUE )
{
/* We wrote the character directly to the UART, so was
successful. */
lTHREEmpty = pdFALSE;
U1THR = cOutChar;
xReturn = pdPASS;
}
else
{
/* We cannot write directly to the UART, so queue the character.
Block for a maximum of xBlockTime if there is no space in the
queue. It is ok to block within a critical section as each
task has it's own critical section management. */
xReturn = xQueueSend( xCharsForTx, &cOutChar, xBlockTime );
/* Depending on queue sizing and task prioritisation: While we
were blocked waiting to post interrupts were not disabled. It is
possible that the serial ISR has emptied the Tx queue, in which
case we need to start the Tx off again. */
if( lTHREEmpty == ( long ) pdTRUE )
{
xQueueReceive( xCharsForTx, &cOutChar, serNO_BLOCK );
lTHREEmpty = pdFALSE;
U1THR = cOutChar;
}
}
}
portEXIT_CRITICAL();
return xReturn;
}
/*-----------------------------------------------------------*/
void vUART_ISRHandler( void )
{
signed char cChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
unsigned char ucInterrupt;
ucInterrupt = U1IIR;
/* The interrupt pending bit is active low. */
while( ( ucInterrupt & serINTERRUPT_IS_PENDING ) == 0 )
{
/* What caused the interrupt? */
switch( ucInterrupt & serINTERRUPT_SOURCE_MASK )
{
case serSOURCE_ERROR : /* Not handling this, but clear the interrupt. */
cChar = U1LSR;
break;
case serSOURCE_THRE : /* The THRE is empty. If there is another
character in the Tx queue, send it now. */
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
{
U1THR = cChar;
}
else
{
/* There are no further characters
queued to send so we can indicate
that the THRE is available. */
lTHREEmpty = pdTRUE;
}
break;
case serSOURCE_RX_TIMEOUT :
case serSOURCE_RX : /* A character was received. Place it in
the queue of received characters. */
cChar = U1RBR;
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
break;
default : /* There is nothing to do, leave the ISR. */
break;
}
ucInterrupt = U1IIR;
}
/* Clear the ISR in the VIC. */
VICVectAddr = serCLEAR_VIC_INTERRUPT;
/* Exit the ISR. If a task was woken by either a character being received
or transmitted then a context switch will occur. */
portEXIT_SWITCHING_ISR( xHigherPriorityTaskWoken );
}
/*-----------------------------------------------------------*/

View File

@@ -0,0 +1,89 @@
;/*
; FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
;
;
; ***************************************************************************
; * *
; * FreeRTOS tutorial books are available in pdf and paperback. *
; * Complete, revised, and edited pdf reference manuals are also *
; * available. *
; * *
; * Purchasing FreeRTOS documentation will not only help you, by *
; * ensuring you get running as quickly as possible and with an *
; * in-depth knowledge of how to use FreeRTOS, it will also help *
; * the FreeRTOS project to continue with its mission of providing *
; * professional grade, cross platform, de facto standard solutions *
; * for microcontrollers - completely free of charge! *
; * *
; * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
; * *
; * Thank you for using FreeRTOS, and thank you for your support! *
; * *
; ***************************************************************************
;
;
; 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. See the GNU General Public License for
; more details. You should have received a copy of the GNU General Public
; License and the FreeRTOS license exception along with FreeRTOS; if not it
; can be viewed here: http://www.freertos.org/a00114.html and also obtained
; by writing to Richard Barry, contact details for whom are available on the
; FreeRTOS WEB site.
;
; 1 tab == 4 spaces!
;
; http://www.FreeRTOS.org - Documentation, latest information, license and
; contact details.
;
; http://www.SafeRTOS.com - A version that is certified for use in safety
; critical systems.
;
; http://www.OpenRTOS.com - Commercial support, development, porting,
; licensing and training services.
;*/
INCLUDE portmacro.inc
;The UART interrupt entry point is defined within an assembly wrapper
;within this file. This takes care of the task context saving before it
;calls the main handler (vUART_ISRHandler()) which is written in C within
;serial.c. The execution of the handler can unblock tasks that were blocked
;waiting for UART events. Once the handler completes the asm wrapper
;finishes off by restoring the context of whichever task is now selected to
;enter the RUNNING state (which might now be a different task to that which
;was originally interrupted.
IMPORT vUART_ISRHandler
EXPORT vUART_ISREntry
;/* Interrupt entry must always be in ARM mode. */
ARM
AREA |.text|, CODE, READONLY
vUART_ISREntry
PRESERVE8
; Save the context of the interrupted task.
portSAVE_CONTEXT
; Call the C handler function - defined within serial.c.
LDR R0, =vUART_ISRHandler
MOV LR, PC
BX R0
; Finish off by restoring the context of the task that has been chosen to
; run next - which might be a different task to that which was originally
; interrupted.
portRESTORE_CONTEXT
END

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
@@ -62,27 +73,31 @@
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
/* In this case configCPU_CLOCK_HZ is actually set to the pclk frequency, not
the CPU frequency. */
#define configCPU_CLOCK_HZ ( 58982400UL ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 15 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configUSE_RECURSIVE_MUTEXES 1
#define configCPU_CLOCK_HZ ( 58982400UL ) /* =14.7456MHz xtal multiplied by 4 using the PLL. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 6 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 15 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configUSE_RECURSIVE_MUTEXES 1
#define configCHECK_FOR_STACK_OVERFLOW 2
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,9 @@
<!DOCTYPE CrossStudio_Project_File>
<solution Name="RTOSDemo" version="1">
<solution Name="RTOSDemo" version="2">
<project Name="RTOSDemo">
<configuration Name="Common" Target="LPC2138" arm_architecture="v4T" arm_core_type="ARM7TDMI-S" arm_simulator_memory_simulation_filename="$(StudioDir)/targets/Philips_LPC210X/LPC2000SimulatorMemory.dll" arm_simulator_memory_simulation_parameter="LPC21;0x80000;0x10000" arm_target_debug_interface_type="ARM7TDI" arm_target_loader_parameter="14745600" gcc_entry_point="reset_handler" link_include_startup_code="No" linker_additional_files="$(StudioDir)/lib/liblpc2000$(LibExt)$(LIB)" linker_memory_map_file="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC2138_MemoryMap.xml" oscillator_frequency="14.7456MHz" project_directory="" project_type="Executable" property_groups_file_path="$(StudioDir)/targets/Philips_LPC210X/propertyGroups.xml"/>
<configuration Name="Common" Target="LPC2138" arm_architecture="v4T" arm_core_type="ARM7TDMI-S" arm_simulator_memory_simulation_filename="$(TargetsDir)/Philips_LPC210X/LPC2000SimulatorMemory.dll" arm_simulator_memory_simulation_parameter="LPC21;0x80000;0x10000" arm_target_debug_interface_type="ARM7TDI" arm_target_loader_parameter="14745600" c_only_additional_options="-Wall;-Wextra" gcc_entry_point="reset_handler" link_include_startup_code="No" linker_additional_files="$(PackagesDir)/lib/liblpc2000$(LibExt)$(LIB)" linker_memory_map_file="$(TargetsDir)/Philips_LPC210X/Philips_LPC2138_MemoryMap.xml" oscillator_frequency="14.7456MHz" project_directory="" project_type="Executable" property_groups_file_path="$(TargetsDir)/Philips_LPC210X/propertyGroups.xml"/>
<configuration Name="RAM" Placement="RAM" linker_section_placement_file="$(StudioDir)/targets/sram_placement.xml" target_reset_script="SRAMReset()"/>
<configuration Name="Flash" Placement="Flash" arm_target_flash_loader_file_path="$(StudioDir)/targets/Philips_LPC210X/Release/Loader.elf" arm_target_flash_loader_type="Comms Channel Loader" linker_section_placement_file="$(StudioDir)/targets/flash_placement.xml" target_reset_script="FLASHReset()"/>
<configuration Name="Flash" Placement="Flash" arm_target_flash_loader_file_path="$(TargetsDir)/Philips_LPC210X/Release/Loader.elf" arm_target_flash_loader_type="Comms Channel Loader" linker_section_placement_file="$(StudioDir)/targets/flash_placement.xml" target_reset_script="FLASHReset()"/>
<folder Name="Source Files">
<configuration Name="Common" filter="c;cpp;cxx;cc;h;s;asm;inc"/>
<folder Name="RTOS Source">
@@ -35,13 +35,14 @@
</folder>
<folder Name="System Files">
<file Name="crt0.s" file_name="$(StudioDir)/source/crt0.s"/>
<file Name="Philips_LPC210X_Startup.s" file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC210X_Startup.s"/>
<file Name="Philips_LPC210X_Target.js" file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC210X_Target.js">
<file Name="Philips_LPC210X_Startup.s" file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC210X_Startup.s"/>
<file Name="Philips_LPC210X_Target.js" file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC210X_Target.js">
<configuration Name="Common" file_type="Reset Script"/>
</file>
</folder>
<file Name="threads.js" file_name="threads.js"/>
<configuration Name="THUMB Flash Debug" build_quietly="No"/>
<configuration Name="THUMB Flash Debug" build_quietly="No" c_only_additional_options=""/>
<configuration Name="Release" gcc_optimization_level="Level 3"/>
</project>
<configuration Name="ARM Flash Debug" inherited_configurations="ARM;Flash;Debug"/>
<configuration Name="ARM" arm_instruction_set="ARM" arm_library_instruction_set="ARM" c_preprocessor_definitions="__ARM" hidden="Yes"/>

View File

@@ -1,26 +1,7 @@
<!DOCTYPE CrossStudio_for_ARM_Session_File>
<session>
<Autos>
<Watches active="0" />
</Autos>
<Bookmarks/>
<Breakpoints>
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="D_Abort" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="FIQ" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="IRQ" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="P_Abort" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="Reset" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="SWI" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="Undef" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="BusFault" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="ExceptionEntryReturnFault" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="HardFault" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="MemManage" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="Reset" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_CheckingError" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_Coprocessor" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" defaultBreakType="true" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_StateError" filename="" />
</Breakpoints>
<Breakpoints/>
<ExecutionCountWindow/>
<Memory1>
<MemoryWindow autoEvaluate="0" addressText="0x102248" numColumns="8" sizeText="128" dataSize="1" radix="16" addressSpace="" />
@@ -34,22 +15,14 @@
<Memory4>
<MemoryWindow autoEvaluate="0" addressText="" numColumns="8" sizeText="" dataSize="1" radix="16" addressSpace="" />
</Memory4>
<MemoryUsageWindow>
<ProjectSessionItem path="RTOSDemo" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;Demo Source" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;RTOS Source" name="unnamed" />
</MemoryUsageWindow>
<Project>
<ProjectSessionItem path="RTOSDemo" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;Demo Source" name="unnamed" />
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Source Files;RTOS Source" name="unnamed" />
</Project>
<Register1>
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
<RegisterWindow openNodes="CPU - Current Mode;CPU - Current Mode/cpsr" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
</Register1>
<Register2>
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
@@ -60,42 +33,30 @@
<Register4>
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
</Register4>
<SourceNavigatorWindow/>
<TargetWindow programAction="" uploadFileType="" programLoadAddress="" programSize="" uploadFileName="" uploadMemoryInterface="" programFileName="" uploadStartAddress="" programFileType="" uploadSize="" programMemoryInterface="" />
<TraceWindow>
<Trace wrap="Yes" type="1" enabled="Yes" />
<Trace enabled="Yes" />
</TraceWindow>
<Watch1>
<Watches active="0" >
<Watches active="1" update="Never" >
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="-1" name="pxCurrentTCB" expression="pxCurrentTCB" filename="" />
</Watches>
</Watch1>
<Watch2>
<Watches active="0" />
<Watches active="0" update="Never" />
</Watch2>
<Watch3>
<Watches active="0" />
<Watches active="0" update="Never" />
</Watch3>
<Watch4>
<Watches active="1" >
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="16" name="pxMutex" expression="pxMutex" filename="" />
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="-1" name="pxCurrentTCB" expression="pxCurrentTCB" filename="" />
<Watches active="0" update="Never" >
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="-1" name="(xQUEUE *)xMutex" expression="(xQUEUE *)xMutex" filename="" />
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="-1" name="pxCurrentTCB" expression="pxCurrentTCB" filename="" />
<Watchpoint evalMode="1" linenumber="0" evalType="1" radix="16" name="pxMutex" expression="pxMutex" filename="" />
</Watches>
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2138_Rowley\main.c" y="156" path="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2138_Rowley\main.c" left="0" selected="0" name="unnamed" top="151" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\recmutex.c" y="223" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\recmutex.c" left="0" selected="1" name="unnamed" top="219" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="31" debugPath="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2138_Rowley\FreeRTOSConfig.h" y="60" path="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2138_Rowley\FreeRTOSConfig.h" left="0" selected="0" name="unnamed" top="55" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\queue.c" y="336" path="C:\E\Dev\FreeRTOS\Source\queue.c" left="0" selected="0" name="unnamed" top="303" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="128" debugPath="C:\E\Dev\FreeRTOS\\Source\\include\semphr.h" y="156" path="C:\E\Dev\FreeRTOS\\Source\\include\semphr.h" left="0" selected="0" name="unnamed" top="137" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\tasks.c" y="1226" path="C:\E\Dev\FreeRTOS\Source\tasks.c" left="0" selected="0" name="unnamed" top="1199" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\blocktim.c" y="123" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\blocktim.c" left="0" selected="0" name="unnamed" top="94" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\portable\GCC\ARM7_LPC2000\port.c" y="237" path="C:\E\Dev\FreeRTOS\Source\portable\GCC\ARM7_LPC2000\port.c" left="0" selected="0" name="unnamed" top="218" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\portable\GCC\ARM7_LPC2000\portISR.c" y="223" path="C:\E\Dev\FreeRTOS\Source\portable\GCC\ARM7_LPC2000\portISR.c" left="0" selected="0" name="unnamed" top="190" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\integer.c" y="141" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\integer.c" left="0" selected="0" name="unnamed" top="118" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="20" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\dynamic.c" y="351" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\dynamic.c" left="0" selected="0" name="unnamed" top="342" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\semtest.c" y="193" path="C:\E\Dev\FreeRTOS\Demo\Common\Minimal\semtest.c" left="0" selected="0" name="unnamed" top="173" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\Source\list.c" y="163" path="C:\E\Dev\FreeRTOS\Source\list.c" left="0" selected="0" name="unnamed" top="130" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2138_Rowley\main.c" y="391" path="C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2138_Rowley\main.c" left="0" selected="1" name="unnamed" top="42" />
</Files>
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="/USB CrossConnect for ARM" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\Demo\Common\Minimal" fileDialogDefaultFilter="*.cpp;*.cxx;*.cc;*.c;*.h;*.hpp;*.hxx" autoConnectCapabilities="1407" debugSearchPath="" buildConfiguration="THUMB Flash Debug" />
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="USB CrossConnect for ARM" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\Demo\Common\Minimal" fileDialogDefaultFilter="*.*" autoConnectCapabilities="388479" debugSearchPath="" buildConfiguration="ARM Flash Debug" />
</session>

View File

@@ -1,73 +1,84 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
* This file contains a demo created to execute on the Rowley Associates
* LPC2138 CrossFire development board.
*
* main() creates all the demo application tasks, then starts the scheduler.
* The WEB documentation provides more details of the standard demo application
* main() creates all the demo application tasks, then starts the scheduler.
* The WEB documentation provides more details of the standard demo application
* tasks.
*
* Main.c also creates a task called "Check". This only executes every few
* seconds but has a high priority so is guaranteed to get processor time.
*
* Main.c also creates a task called "Check". This only executes every few
* seconds but has a high priority so is guaranteed to get processor time.
* Its function is to check that all the other tasks are still operational.
* Each standard demo task maintains a unique count that is incremented each
* time the task successfully completes its function. Should any error occur
* within such a task the count is permanently halted. The check task inspects
* the count of each task to ensure it has changed since the last time the
* check task executed. If all the count variables have changed all the tasks
* Each standard demo task maintains a unique count that is incremented each
* time the task successfully completes its function. Should any error occur
* within such a task the count is permanently halted. The check task inspects
* the count of each task to ensure it has changed since the last time the
* check task executed. If all the count variables have changed all the tasks
* are still executing error free, and the check task writes "PASS" to the
* CrossStudio terminal IO window. Should any task contain an error at any time
* CrossStudio terminal IO window. Should any task contain an error at any time
* the error is latched and "FAIL" written to the terminal IO window.
*
* Finally, main() sets up an interrupt service routine and task to handle
* pushes of the button that is built into the CrossFire board. When the button
* is pushed the ISR wakes the button task - which generates a table of task
* status information which is also displayed on the terminal IO window.
* status information which is also displayed on the terminal IO window.
*
* A print task is defined to ensure exclusive and consistent access to the
* A print task is defined to ensure exclusive and consistent access to the
* terminal IO. This is the only task that is allowed to access the terminal.
* The check and button task therefore do not access the terminal directly but
* The check and button task therefore do not access the terminal directly but
* instead pass a pointer to the message they wish to display to the print task.
*/
@@ -76,7 +87,7 @@
/* Scheduler includes. */
#include "FreeRTOS.h"
#include "Task.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"
@@ -88,9 +99,10 @@
#include "PollQ.h"
#include "blocktim.h"
#include "recmutex.h"
#include "semtest.h"
/* Hardware configuration definitions. */
#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )
#define mainBUS_CLK_FULL ( ( unsigned char ) 0x01 )
#define mainLED_BIT 0x80000000
#define mainP0_14__EINT_1 ( 2 << 28 )
#define mainEINT_1_EDGE_SENSITIVE 2
@@ -122,7 +134,7 @@
handler. */
xSemaphoreHandle xButtonSemaphore;
/* The queue that is used to send message to vPrintTask for display in the
/* The queue that is used to send message to vPrintTask for display in the
terminal output window. */
xQueueHandle xPrintQueue;
@@ -169,7 +181,7 @@ int main( void )
VPBDIV = mainBUS_CLK_FULL;
/* Create the queue used to pass message to vPrintTask. */
xPrintQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( portCHAR * ) );
xPrintQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( char * ) );
/* Create the semaphore used to wake vButtonHandlerTask(). */
vSemaphoreCreateBinary( xButtonSemaphore );
@@ -184,7 +196,7 @@ int main( void )
#if configUSE_PREEMPTION == 1
{
/* The timing of console output when not using the preemptive
/* The timing of console output when not using the preemptive
scheduler causes the block time tests to detect a timing problem. */
vCreateBlockTimeTasks();
}
@@ -193,10 +205,10 @@ int main( void )
vStartRecursiveMutexTasks();
/* Start the tasks defined within this file. */
xTaskCreate( vLEDTask, "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL );
xTaskCreate( vCheckTask, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
xTaskCreate( vPrintTask, "Print", configMINIMAL_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );
xTaskCreate( vButtonHandlerTask, "Button", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
xTaskCreate( vLEDTask, ( signed char * ) "LED", configMINIMAL_STACK_SIZE, NULL, mainLED_TASK_PRIORITY, NULL );
xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
xTaskCreate( vPrintTask, ( signed char * ) "Print", configMINIMAL_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );
xTaskCreate( vButtonHandlerTask, ( signed char * ) "Button", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* Start the scheduler. */
vTaskStartScheduler();
@@ -210,6 +222,9 @@ int main( void )
static void vLEDTask( void *pvParameters )
{
/* Just to remove compiler warnings. */
( void ) pvParameters;
/* Configure IO. */
IO0DIR |= mainLED_BIT;
IO0SET = mainLED_BIT;
@@ -235,8 +250,11 @@ static void vCheckTask( void *pvParameters )
{
portBASE_TYPE xErrorOccurred = pdFALSE;
portTickType xLastExecutionTime;
const portCHAR * const pcPassMessage = "PASS\n";
const portCHAR * const pcFailMessage = "FAIL\n";
const char * const pcPassMessage = "PASS\n";
const char * const pcFailMessage = "FAIL\n";
/* Just to remove compiler warnings. */
( void ) pvParameters;
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()
works correctly. */
@@ -253,22 +271,22 @@ const portCHAR * const pcFailMessage = "FAIL\n";
{
xErrorOccurred = pdTRUE;
}
if( xArePollingQueuesStillRunning() != pdTRUE )
{
xErrorOccurred = pdTRUE;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
{
xErrorOccurred = pdTRUE;
}
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
xErrorOccurred = pdTRUE;
}
if( xAreBlockingQueuesStillRunning() != pdTRUE )
{
xErrorOccurred = pdTRUE;
@@ -276,7 +294,7 @@ const portCHAR * const pcFailMessage = "FAIL\n";
#if configUSE_PREEMPTION == 1
{
/* The timing of console output when not using the preemptive
/* The timing of console output when not using the preemptive
scheduler causes the block time tests to detect a timing problem. */
if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
{
@@ -307,7 +325,10 @@ const portCHAR * const pcFailMessage = "FAIL\n";
static void vPrintTask( void *pvParameters )
{
portCHAR *pcMessage;
char *pcMessage;
/* Just to stop compiler warnings. */
( void ) pvParameters;
for( ;; )
{
@@ -324,23 +345,26 @@ portCHAR *pcMessage;
static void vButtonHandlerTask( void *pvParameters )
{
static portCHAR cListBuffer[ mainLIST_BUFFER_SIZE ];
const portCHAR *pcList = &( cListBuffer[ 0 ] );
const portCHAR * const pcHeader = "\nTask State Priority Stack #\n************************************************";
static signed char cListBuffer[ mainLIST_BUFFER_SIZE ];
const signed char *pcList = &( cListBuffer[ 0 ] );
const char * const pcHeader = "\nTask State Priority Stack #\n************************************************";
extern void (vButtonISRWrapper) ( void );
/* Just to stop compiler warnings. */
( void ) pvParameters;
/* Configure the interrupt. */
portENTER_CRITICAL();
portENTER_CRITICAL();
{
/* Configure P0.14 to generate interrupts. */
PINSEL0 |= mainP0_14__EINT_1;
PINSEL0 |= mainP0_14__EINT_1;
EXTMODE = mainEINT_1_EDGE_SENSITIVE;
EXTPOLAR = mainEINT_1_FALLING_EDGE_SENSITIVE;
/* Setup the VIC for EINT 1. */
VICIntSelect &= ~mainEINT_1_VIC_CHANNEL_BIT;
VICIntEnable |= mainEINT_1_VIC_CHANNEL_BIT;
VICVectAddr1 = ( portLONG ) vButtonISRWrapper;
VICVectAddr1 = ( long ) vButtonISRWrapper;
VICVectCntl1 = mainEINT_1_ENABLE_BIT | mainEINT_1_CHANNEL;
}
portEXIT_CRITICAL();
@@ -366,6 +390,14 @@ extern void (vButtonISRWrapper) ( void );
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
{
/* Check pcTaskName for the name of the offending task, or pxCurrentTCB
if pcTaskName has itself been corrupted. */
( void ) pxTask;
( void ) pcTaskName;
for( ;; );
}

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#include "FreeRTOS.h"
#include "semphr.h"
@@ -52,13 +63,16 @@
* you are absolutely sure that no stack space is used.
*/
void vButtonISRWrapper( void ) __attribute__ ((naked));
void vButtonHandler( void );
void vButtonHandler( void ) __attribute__ ((noinline));
void vButtonHandler( void )
{
extern xSemaphoreHandle xButtonSemaphore;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
if( xSemaphoreGiveFromISR( xButtonSemaphore, pdFALSE ) )
xSemaphoreGiveFromISR( xButtonSemaphore, &xHigherPriorityTaskWoken );
if( xHigherPriorityTaskWoken )
{
/* We have woken a task. Calling "yield from ISR" here will ensure
the interrupt returns to the woken task if it has a priority higher
@@ -78,7 +92,7 @@ void vButtonISRWrapper( void )
/* Call the handler to do the work. This must be a separate function to
the wrapper to ensure the correct stack frame is set up. */
vButtonHandler();
__asm volatile( "bl vButtonHandler" );
/* Restore the context of whichever task is going to run once the interrupt
completes. */

View File

@@ -3,14 +3,8 @@ function decode_stack(sp)
var i;
var a = new Array();
var current_task;
current_task = Debug.evaluate("pxCurrentTCB");
if( current_task == 0 )
return;
sp += 4; /* skip stored ulCriticalNesting */
a[16] = Debug.evaluate("*(unsigned long*)" + sp);
for (i = 0; i <= 15; i++)
@@ -24,42 +18,44 @@ function decode_stack(sp)
function add_task(task, state)
{
var tcb, task_name;
var current_task;
var tcb, task_name, current_task, regs;
current_task = Debug.evaluate("pxCurrentTCB");
if( current_task == 0 )
return;
tcb = Debug.evaluate("*(tskTCB *)" + task);
task_name = Debug.evaluate("(char*)&(*(tskTCB *)" + task + ").pcTaskName[0]");
Threads.add("#" + tcb.uxTCBNumber + " \"" + task_name + "\"", tcb.uxPriority, state, decode_stack(tcb.pxTopOfStack));
task_name = "#" + tcb.uxTCBNumber + " \"" + task_name + "\"";
if (task == current_task)
{
state = "executing";
regs = [];
}
else
{
regs = decode_stack(tcb.pxTopOfStack);
}
Threads.add(task_name, tcb.uxPriority, state, regs);
}
function add_list(list, state, current_task)
function add_list(list, state)
{
var i, index, item, end;
var current_task;
var i, index, item, task;
current_task = Debug.evaluate("pxCurrentTCB");
if( current_task == 0 )
return;
if (list.uxNumberOfItems)
if (list && list.uxNumberOfItems>0)
{
index = list.pxIndex;
end = list.xListEnd;
index = list.xListEnd.pxNext;
for (i = 0; i < list.uxNumberOfItems; i++)
{
item = Debug.evaluate("*(xListItem *)" + index);
if (index != end)
{
task = item.pvOwner;
if (task) add_task(task, (task == current_task) ? "executing" : state);
}
task = item ? item.pvOwner : 0;
if (task)
add_task(task, state);
index = item.pxNext;
}
}
@@ -67,52 +63,43 @@ function add_list(list, state, current_task)
function update()
{
var i, current_task, list, lists, max_priority;
var i, list, lists, max_priority;
Threads.clear();
current_task = Debug.evaluate("pxCurrentTCB");
if( current_task == 0 )
if( Debug.evaluate("pxCurrentTCB") == 0 )
return;
Threads.newqueue("Ready");
lists = Debug.evaluate("pxReadyTasksLists");
if (lists)
{
max_priority = Debug.evaluate("uxTopUsedPriority");
max_priority = Debug.evaluate("*(long *)" + max_priority);
max_priority = Debug.evaluate("uxTopUsedPriority");
for (i = 0; i <= max_priority; i++)
{
list = Debug.evaluate("((xList*)" + lists + ")[" + (max_priority - i) + "]");
add_list(list, "ready", current_task);
}
Threads.newqueue("Ready");
for (i = max_priority; i >= 0; i--)
{
list = Debug.evaluate("pxReadyTasksLists[" + i + "]");
add_list(list, "ready");
}
Threads.newqueue("Blocked");
list = Debug.evaluate("pxDelayedTaskList");
if (list)
{
list = Debug.evaluate("**(xList **)" + list);
list = Debug.evaluate("*(xList *)" + list);
add_list(list, "blocked");
}
list = Debug.evaluate("pxOverflowDelayedTaskList");
if (list)
{
list = Debug.evaluate("**(xList **)" + list);
list = Debug.evaluate("*(xList *)" + list);
add_list(list, "blocked");
}
Threads.newqueue("Suspended");
list = Debug.evaluate("xSuspendedTaskList");
if (list)
{
list = Debug.evaluate("*(xList *)" + list);
add_list(list, "suspended");
}
}

View File

@@ -1,33 +1,54 @@
/*
FreeRTOS V4.6.1 - Copyright (C) 2003-2005 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
@@ -35,6 +56,7 @@
#include <stdio.h>
#include "lpc23xx.h"
/*-----------------------------------------------------------
* Application specific definitions.
*
@@ -43,6 +65,8 @@
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
/* Value to use on old rev '-' devices. */
@@ -58,10 +82,10 @@
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 1
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 48000000 ) /* =12Mhz xtal multiplied by 5 using the PLL. */
#define configCPU_CLOCK_HZ ( ( unsigned long ) 48000000 ) /* =12Mhz xtal multiplied by 5 using the PLL. */
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 104 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 104 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 10 )
#define configUSE_TRACE_FACILITY 1

View File

@@ -21,7 +21,7 @@
#include "portlcd.h"
#include "FreeRTOS.h"
#include "Task.h"
#include "task.h"
/* Please note, on old MCB2300 board, the LCD_E bit is p1.30, on the new board
it's p1.31, please check the schematic carefully, and change LCD_CTRL and LCD_E

View File

@@ -1,32 +1,55 @@
# FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
#/*
# FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
#
#
# This file is part of the FreeRTOS.org distribution.
# ***************************************************************************
# * *
# * FreeRTOS tutorial books are available in pdf and paperback. *
# * Complete, revised, and edited pdf reference manuals are also *
# * available. *
# * *
# * Purchasing FreeRTOS documentation will not only help you, by *
# * ensuring you get running as quickly as possible and with an *
# * in-depth knowledge of how to use FreeRTOS, it will also help *
# * the FreeRTOS project to continue with its mission of providing *
# * professional grade, cross platform, de facto standard solutions *
# * for microcontrollers - completely free of charge! *
# * *
# * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
# * *
# * Thank you for using FreeRTOS, and thank you for your support! *
# * *
# ***************************************************************************
#
# FreeRTOS.org is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# FreeRTOS.org 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. See the
# GNU General Public License for more details.
# This file is part of the FreeRTOS distribution.
#
# You should have received a copy of the GNU General Public License
# along with FreeRTOS.org; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# 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. See the GNU General Public License for
# more details. You should have received a copy of the GNU General Public
# License and the FreeRTOS license exception along with FreeRTOS; if not it
# can be viewed here: http://www.freertos.org/a00114.html and also obtained
# by writing to Richard Barry, contact details for whom are available on the
# FreeRTOS WEB site.
#
# A special exception to the GPL can be applied should you wish to distribute
# a combined work that includes FreeRTOS.org, without being obliged to provide
# the source code for any proprietary components. See the licensing section
# of http://www.FreeRTOS.org for full details of how and when the exception
# can be applied.
# 1 tab == 4 spaces!
#
# ***************************************************************************
# See http://www.FreeRTOS.org for documentation, latest information, license
# and contact details. Please ensure to read the configuration and relevant
# port sections of the online documentation.
# ***************************************************************************
# http://www.FreeRTOS.org - Documentation, latest information, license and
# contact details.
#
# http://www.SafeRTOS.com - A version that is certified for use in safety
# critical systems.
#
# http://www.OpenRTOS.com - Commercial support, development, porting,
# licensing and training services.
#*/
RTOS_SOURCE_DIR=../../../Source
@@ -41,7 +64,7 @@ LDSCRIPT=lpc2368.ld
LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
DEBUG=-g
OPTIM=-O1
OPTIM=-O0
CFLAGS= $(DEBUG) \
@@ -59,8 +82,10 @@ CFLAGS= $(DEBUG) \
-D PACK_STRUCT_END=__attribute\(\(packed\)\) \
-D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \
-fomit-frame-pointer \
-mthumb-interwork
-mthumb-interwork \
-fno-dwarf2-cfi-asm \
-fno-strict-aliasing
THUMB_SOURCE= \
main.c \
./ParTest/ParTest.c \
@@ -86,7 +111,8 @@ THUMB_SOURCE= \
$(RTOS_SOURCE_DIR)/queue.c \
$(RTOS_SOURCE_DIR)/tasks.c \
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/port.c \
$(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c
$(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \
syscalls.c
ARM_SOURCE= \
$(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/portISR.c \

View File

@@ -1,33 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* FreeRTOS.org includes. */

View File

@@ -47,7 +47,7 @@ _mainCRTStartup:
for system/user, SWI and IRQ modes. Also each mode is setup with
interrupts initially disabled. */
ldr r0, .LC6
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode
msr CPSR_c, #MODE_UND|I_BIT|F_BIT /* Undefined Instruction Mode */
mov sp, r0
sub r0, r0, #UND_STACK_SIZE
msr CPSR_c, #MODE_ABT|I_BIT|F_BIT /* Abort Mode */

View File

@@ -8,8 +8,10 @@ MEMORY
__stack_end__ = 0x40000000 + 32K - 4;
SECTIONS
{
. = 0;
startup : { *(.startup)} >flash
@@ -20,6 +22,7 @@ SECTIONS
*(.rodata*)
*(.glue_7)
*(.glue_7t)
KEEP(*(.eh_frame))
} >flash
__end_of_text__ = .;
@@ -42,6 +45,7 @@ SECTIONS
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */
. = ALIGN(32 / 8);
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
.usbram (NOLOAD):
{
@@ -61,7 +65,7 @@ SECTIONS
}
. = ALIGN(32 / 8);
_end = .;
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
PROVIDE (end = .);

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/*
@@ -65,7 +76,7 @@
/* Scheduler includes. */
#include "FreeRTOS.h"
#include "Task.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"
@@ -169,6 +180,7 @@ void vApplicationTickHook( void )
unsigned portBASE_TYPE uxColumn = 0;
static xLCDMessage xMessage = { 0, "PASS" };
static unsigned portLONG ulTicksSinceLastDisplay = 0;
static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Called from every tick interrupt. Have enough ticks passed to make it
time to perform our health status check again? */
@@ -207,7 +219,8 @@ static unsigned portLONG ulTicksSinceLastDisplay = 0;
xMessage.xColumn++;
/* Send the message to the LCD gatekeeper for display. */
xQueueSendToBackFromISR( xLCDQueue, &xMessage, pdFALSE );
xHigherPriorityTaskWoken = pdFALSE;
xQueueSendToBackFromISR( xLCDQueue, &xMessage, &xHigherPriorityTaskWoken );
}
}
/*-----------------------------------------------------------*/

View File

@@ -0,0 +1,162 @@
/****************************************************************************
* Copyright (c) 2009 by Michael Fischer. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
****************************************************************************
* History:
*
* 28.03.09 mifi First Version, based on the original syscall.c from
* newlib version 1.17.0
****************************************************************************/
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
/***************************************************************************/
int _read_r (struct _reent *r, int file, char * ptr, int len)
{
r = r;
file = file;
ptr = ptr;
len = len;
errno = EINVAL;
return -1;
}
/***************************************************************************/
int _lseek_r (struct _reent *r, int file, int ptr, int dir)
{
r = r;
file = file;
ptr = ptr;
dir = dir;
return 0;
}
/***************************************************************************/
int _write_r (struct _reent *r, int file, char * ptr, int len)
{
r = r;
file = file;
ptr = ptr;
#if 0
int index;
/* For example, output string by UART */
for(index=0; index<len; index++)
{
if (ptr[index] == '\n')
{
uart_putc('\r');
}
uart_putc(ptr[index]);
}
#endif
return len;
}
/***************************************************************************/
int _close_r (struct _reent *r, int file)
{
return 0;
}
/***************************************************************************/
/* Register name faking - works in collusion with the linker. */
register char * stack_ptr __asm ("sp");
caddr_t _sbrk_r (struct _reent *r, int incr)
{
extern char end __asm ("end"); /* Defined by the linker. */
static char * heap_end;
char * prev_heap_end;
if (heap_end == NULL)
heap_end = & end;
prev_heap_end = heap_end;
if (heap_end + incr > stack_ptr)
{
/* Some of the libstdc++-v3 tests rely upon detecting
out of memory errors, so do not abort here. */
#if 0
extern void abort (void);
_write (1, "_sbrk: Heap and stack collision\n", 32);
abort ();
#else
errno = ENOMEM;
return (caddr_t) -1;
#endif
}
heap_end += incr;
return (caddr_t) prev_heap_end;
}
/***************************************************************************/
int _fstat_r (struct _reent *r, int file, struct stat * st)
{
r = r;
file = file;
memset (st, 0, sizeof (* st));
st->st_mode = S_IFCHR;
return 0;
}
/***************************************************************************/
int _isatty_r(struct _reent *r, int fd)
{
r = r;
fd = fd;
return 1;
}
/*** EOF ***/

View File

@@ -1,26 +1,28 @@
#include "FreeRTOS.h"
#include "Semphr.h"
#include "Task.h"
#include "semphr.h"
#include "task.h"
/* The interrupt entry point. */
void vEMAC_ISR_Wrapper( void ) __attribute__((naked));
/* The handler that does the actual work. */
void vEMAC_ISR_Handler( void );
void vEMAC_ISR_Handler( void ) __attribute__((noinline));
extern xSemaphoreHandle xEMACSemaphore;
void vEMAC_ISR_Handler( void )
{
portBASE_TYPE xSwitchRequired = pdFALSE;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Clear the interrupt. */
MAC_INTCLEAR = 0xffff;
VICVectAddr = 0;
/* Ensure the uIP task is not blocked as data has arrived. */
if( xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE ) )
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
if( xHigherPriorityTaskWoken )
{
/* Giving the semaphore woke a task. */
portYIELD_FROM_ISR();
@@ -35,7 +37,7 @@ void vEMAC_ISR_Wrapper( void )
/* Call the handler. This must be a separate function unless you can
guarantee that no stack will be used. */
vEMAC_ISR_Handler();
__asm volatile ( "bl vEMAC_ISR_Handler" );
/* Restore the context of whichever task is going to run next. */
portRESTORE_CONTEXT();

View File

@@ -18,9 +18,9 @@
/* Adapted from file originally written by Andreas Dannenberg. Supplied with permission. */
#include "FreeRTOS.h"
#include "Semphr.h"
#include "semphr.h"
#include "task.h"
#include "EMAC.h"
#include "emac.h"
/* The semaphore used to wake the uIP task when data arives. */
xSemaphoreHandle xEMACSemaphore = NULL;

View File

@@ -235,7 +235,7 @@ extern unsigned long uxParTextGetLED( unsigned long uxLED );
static unsigned short generate_io_state( void *arg )
{
for( ulString = 0; ulString < 4; ulString++ )
for( ulString = 0; ulString < 3; ulString++ )
{
if( uxParTextGetLED( ulString + 5 ) )
{

View File

@@ -1,33 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* Standard includes. */
#include <string.h>

View File

@@ -1,33 +1,54 @@
/*
FreeRTOS V4.6.1 - Copyright (C) 2003-2005 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
#ifndef FREERTOS_CONFIG_H
@@ -36,6 +57,7 @@
#include <stdio.h>
#include <targets/LPC2368.h>
#define vPortYieldProcessor swi_handler
/*-----------------------------------------------------------
* Application specific definitions.
*
@@ -44,8 +66,11 @@
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
/* Value to use on old rev '-' devices. */
//#define configPINSEL2_VALUE 0x50151105
@@ -59,10 +84,10 @@
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 57600000 )
#define configCPU_CLOCK_HZ ( ( unsigned long ) 57600000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 120 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 120 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 18 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 1

View File

@@ -22,7 +22,7 @@
#include <targets/LPC2368.h>
#include "portlcd.h"
#include "FreeRTOS.h"
#include "Task.h"
#include "task.h"
/* Please note, on old MCB2300 board, the LCD_E bit is p1.30, on the new board
it's p1.31, please check the schematic carefully, and change LCD_CTRL and LCD_E

View File

@@ -1,33 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* FreeRTOS.org includes. */
@@ -36,9 +57,9 @@
/* Demo application includes. */
#include "partest.h"
#define partstFIRST_IO ( ( unsigned portLONG ) 0x01 )
#define partstFIRST_IO ( ( unsigned long ) 0x01 )
#define partstNUM_LEDS ( 8 )
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) 0xff )
#define partstALL_OUTPUTS_OFF ( ( unsigned long ) 0xff )
/*-----------------------------------------------------------
* Simple parallel port IO routines.
@@ -58,12 +79,12 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
unsigned portLONG ulLED = partstFIRST_IO;
unsigned long ulLED = partstFIRST_IO;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port */
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
/* Set of clear the output. */
if( xValue )
@@ -80,13 +101,13 @@ unsigned portLONG ulLED = partstFIRST_IO;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
attached. */
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
/* If this bit is already set, clear it, and visa versa. */
ulCurrentState = FIO2PIN;
@@ -104,9 +125,9 @@ unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
/*-----------------------------------------------------------*/
unsigned portBASE_TYPE uxParTextGetLED( unsigned portBASE_TYPE uxLED )
{
unsigned portLONG ulLED = partstFIRST_IO;
unsigned long ulLED = partstFIRST_IO;
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
return ( FIO2PIN & ulLED );
}

View File

@@ -1,103 +1,103 @@
<!DOCTYPE CrossStudio_Project_File>
<solution version="1" Name="RTOSDemo" >
<project Name="RTOSDemo" >
<configuration arm_target_loader_parameter="12000000" Target="LPC2368" arm_target_flash_loader_file_path="$(StudioDir)/targets/Philips_LPC210X/Release/Loader_lpc2300.elf" arm_simulator_memory_simulation_parameter="LPC23;0x80000;0x8000;0x10000;0x10000" property_groups_file_path="$(StudioDir)/targets/Philips_LPC210X/propertyGroups23xx.xml" oscillator_frequency="12MHz" linker_memory_map_file="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC2368_MemoryMap.xml" gcc_entry_point="reset_handler" build_remove_unused_symbols="No" c_preprocessor_definitions="GCC_ARM7;SUPERVISOR_START;VECTORED_IRQ_INTERRUPTS;PACK_STRUCT_END=__attribute__((packed));ALIGN_STRUCT_END=__attribute__((aligned(4)))" arm_architecture="v4T" linker_additional_files="$(StudioDir)/lib/liblpc2000$(LibExt)$(LIB)" c_user_include_directories=".;$(ProjectDir)\\..\\..\\Source\\include;$(ProjectDir)\\..\\..\\Source\\GCC\\ARM7_LPC2000;$(ProjectDir)\\..\\Common\\Include;$(ProjectDir)\\LCD;$(ProjectDir)\\webserver;$(ProjectDir)\\..\\Common\\ethernet\\uIP\\uip-1.0\\uip" project_directory="" link_include_startup_code="No" gcc_optimization_level="Level 1" arm_target_flash_loader_type="LIBMEM RPC Loader" project_type="Executable" c_additional_options="" linker_printf_fmt_level="long" arm_linker_stack_size="10" Name="Common" c_system_include_directories="$(StudioDir)\include" arm_target_debug_interface_type="ARM7TDI" arm_core_type="ARM7TDMI-S" arm_simulator_memory_simulation_filename="$(StudioDir)/targets/Philips_LPC210X/LPC2000SimulatorMemory.dll" arm_linker_svc_stack_size="1024" />
<configuration linker_section_placement_file="$(StudioDir)/targets/sram_placement.xml" target_reset_script="SRAMReset()" Name="RAM" Placement="RAM" />
<configuration arm_target_flash_loader_file_path="$(StudioDir)/targets/Philips_LPC210X/Release/Loader_lpc2300.elf" linker_section_placement_file="$(StudioDir)/targets/flash_placement.xml" target_reset_script="FLASHReset()" arm_target_flash_loader_type="LIBMEM RPC Loader" Name="Flash" Placement="Flash" />
<folder Name="Demo Source" >
<configuration filter="c;cpp;cxx;cc;h;s;asm;inc" Name="Common" />
<file file_name="main.c" Name="main.c" />
<file file_name="LCD/portlcd.c" Name="portlcd.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<solution Name="RTOSDemo" version="2">
<project Name="RTOSDemo">
<configuration Name="Common" Target="LPC2368" arm_architecture="v4T" arm_core_type="ARM7TDMI-S" arm_linker_stack_size="10" arm_linker_svc_stack_size="1024" arm_simulator_memory_simulation_filename="$(TargetsDir)/Philips_LPC210X/LPC2000SimulatorMemory.dll" arm_simulator_memory_simulation_parameter="LPC23;0x80000;0x8000;0x10000;0x10000" arm_target_debug_interface_type="ARM7TDI" arm_target_flash_loader_file_path="$(TargetsDir)/Philips_LPC210X/Release/Loader_lpc2300.elf" arm_target_flash_loader_type="LIBMEM RPC Loader" arm_target_loader_parameter="12000000" build_remove_unused_symbols="No" c_additional_options="" c_preprocessor_definitions="GCC_ARM7;SUPERVISOR_START;VECTORED_IRQ_INTERRUPTS;PACK_STRUCT_END=__attribute__((packed));ALIGN_STRUCT_END=__attribute__((aligned(4)))" c_system_include_directories="$(StudioDir)\include;$(PackagesDir)\include" c_user_include_directories=".;$(ProjectDir)\\..\\..\\Source\\include;$(ProjectDir)\\..\\..\\Source\\GCC\\ARM7_LPC2000;$(ProjectDir)\\..\\Common\\Include;$(ProjectDir)\\LCD;$(ProjectDir)\\webserver;$(ProjectDir)\\..\\Common\\ethernet\\uIP\\uip-1.0\\uip" gcc_entry_point="reset_handler" gcc_optimization_level="Level 1" link_include_startup_code="No" linker_additional_files="$(PackagesDir)/lib/liblpc2000$(LibExt)$(LIB)" linker_memory_map_file="$(TargetsDir)/Philips_LPC210X/Philips_LPC2368_MemoryMap.xml" linker_printf_fmt_level="long" oscillator_frequency="12MHz" project_directory="" project_type="Executable" property_groups_file_path="$(TargetsDir)/Philips_LPC210X/propertyGroups23xx.xml" c_enforce_ansi_checking="No" />
<configuration Name="RAM" Placement="RAM" linker_section_placement_file="$(StudioDir)/targets/sram_placement.xml" target_reset_script="SRAMReset()"/>
<configuration Name="Flash" Placement="Flash" arm_target_flash_loader_file_path="$(TargetsDir)/Philips_LPC210X/Release/Loader_lpc2300.elf" arm_target_flash_loader_type="LIBMEM RPC Loader" linker_section_placement_file="$(StudioDir)/targets/flash_placement.xml" target_reset_script="FLASHReset()"/>
<folder Name="Demo Source">
<configuration Name="Common" filter="c;cpp;cxx;cc;h;s;asm;inc"/>
<file Name="main.c" file_name="main.c"/>
<file Name="portlcd.c" file_name="LCD/portlcd.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="../Common/Minimal/blocktim.c" Name="blocktim.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="blocktim.c" file_name="../Common/Minimal/blocktim.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="../Common/Minimal/integer.c" Name="integer.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="integer.c" file_name="../Common/Minimal/integer.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="../Common/Minimal/BlockQ.c" Name="BlockQ.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="BlockQ.c" file_name="../Common/Minimal/BlockQ.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="ParTest/ParTest.c" Name="ParTest.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="ParTest.c" file_name="ParTest/ParTest.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="../Common/Minimal/flash.c" Name="flash.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="flash.c" file_name="../Common/Minimal/flash.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="webserver/EMAC_ISR.c" Name="EMAC_ISR.c" >
<configuration arm_instruction_set="ARM" Name="THUMB" />
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="EMAC_ISR.c" file_name="webserver/EMAC_ISR.c">
<configuration Name="THUMB" arm_instruction_set="ARM"/>
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="webserver/emac.c" Name="emac.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<configuration asm_additional_options="" Name="Common" />
<file Name="emac.c" file_name="webserver/emac.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
<configuration Name="Common" asm_additional_options=""/>
</file>
<file file_name="../Common/Minimal/death.c" Name="death.c" />
<file file_name="../Common/Minimal/PollQ.c" Name="PollQ.c" />
<file file_name="../Common/Minimal/semtest.c" Name="semtest.c" />
<file Name="death.c" file_name="../Common/Minimal/death.c"/>
<file Name="PollQ.c" file_name="../Common/Minimal/PollQ.c"/>
<file Name="semtest.c" file_name="../Common/Minimal/semtest.c"/>
</folder>
<folder Name="System Files" >
<file file_name="$(StudioDir)/source/crt0.s" Name="crt0.s" />
<file file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC230X_Startup.s" Name="Philips_LPC230X_Startup.s" />
<file file_name="$(StudioDir)/targets/Philips_LPC210X/LPC230x.c" Name="LPC230x.c" />
<file file_name="$(StudioDir)/targets/Philips_LPC210X/Philips_LPC210X_Target.js" Name="Philips_LPC210X_Target.js" >
<configuration Name="Common" file_type="Reset Script" />
<folder Name="System Files">
<file Name="crt0.s" file_name="$(StudioDir)/source/crt0.s"/>
<file Name="Philips_LPC230X_Startup.s" file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC230X_Startup.s"/>
<file Name="LPC230x.c" file_name="$(TargetsDir)/Philips_LPC210X/LPC230x.c"/>
<file Name="Philips_LPC210X_Target.js" file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC210X_Target.js">
<configuration Name="Common" file_type="Reset Script"/>
</file>
<file file_name="$(StudioDir)/targets/Philips_LPC210X/VIC_PL192.c" Name="VIC_PL192.c" />
<file file_name="$(StudioDir)/targets/Philips_LPC210X/VIC_PL192_irq_handler.s" Name="VIC_PL192_irq_handler.s" />
<file Name="VIC_PL192.c" file_name="$(TargetsDir)/Philips_LPC210X/VIC_PL192.c"/>
<file Name="VIC_PL192_irq_handler.s" file_name="$(TargetsDir)/Philips_LPC210X/VIC_PL192_irq_handler.s"/>
</folder>
<folder Name="FreeRTOS.org Source" >
<file file_name="../../Source/tasks.c" Name="tasks.c" />
<file file_name="../../Source/list.c" Name="list.c" />
<file file_name="../../Source/queue.c" Name="queue.c" />
<file file_name="../../Source/portable/GCC/ARM7_LPC23xx/port.c" Name="port.c" />
<file file_name="../../Source/portable/GCC/ARM7_LPC23xx/portISR.c" Name="portISR.c" >
<configuration arm_instruction_set="ARM" Name="Common" />
<folder Name="FreeRTOS.org Source">
<file Name="tasks.c" file_name="../../Source/tasks.c"/>
<file Name="list.c" file_name="../../Source/list.c"/>
<file Name="queue.c" file_name="../../Source/queue.c"/>
<file Name="port.c" file_name="../../Source/portable/GCC/ARM7_LPC23xx/port.c"/>
<file Name="portISR.c" file_name="../../Source/portable/GCC/ARM7_LPC23xx/portISR.c">
<configuration Name="Common" arm_instruction_set="ARM"/>
</file>
<file file_name="../../Source/portable/MemMang/heap_2.c" Name="heap_2.c" />
<file Name="heap_2.c" file_name="../../Source/portable/MemMang/heap_2.c"/>
</folder>
<configuration linker_scanf_fmt_level="int" linker_keep_symbols="_vectors" c_preprocessor_definitions="" gcc_optimization_level="Level 1" arm_target_flash_loader_type="LIBMEM RPC Loader" linker_scanf_character_group_matching_enabled="No" linker_printf_fmt_level="int" Name="ARM Flash Debug" />
<folder Name="uIP Source" >
<file file_name="webserver/uIP_Task.c" Name="uIP_Task.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<configuration Name="ARM Flash Debug" arm_target_flash_loader_type="LIBMEM RPC Loader" c_preprocessor_definitions="" gcc_optimization_level="Level 1" linker_keep_symbols="_vectors" linker_printf_fmt_level="int" linker_scanf_character_group_matching_enabled="No" linker_scanf_fmt_level="int"/>
<folder Name="uIP Source">
<file Name="uIP_Task.c" file_name="webserver/uIP_Task.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="webserver/httpd.c" Name="httpd.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="httpd.c" file_name="webserver/httpd.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="webserver/httpd-cgi.c" Name="httpd-cgi.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="httpd-cgi.c" file_name="webserver/httpd-cgi.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="webserver/httpd-fs.c" Name="httpd-fs.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="httpd-fs.c" file_name="webserver/httpd-fs.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="webserver/http-strings.c" Name="http-strings.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="http-strings.c" file_name="webserver/http-strings.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="../Common/ethernet/uIP/uip-1.0/uip/uip_arp.c" Name="uip_arp.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="uip_arp.c" file_name="../Common/ethernet/uIP/uip-1.0/uip/uip_arp.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="../Common/ethernet/uIP/uip-1.0/uip/psock.c" Name="psock.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="psock.c" file_name="../Common/ethernet/uIP/uip-1.0/uip/psock.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="../Common/ethernet/uIP/uip-1.0/uip/timer.c" Name="timer.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="timer.c" file_name="../Common/ethernet/uIP/uip-1.0/uip/timer.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
<file file_name="../Common/ethernet/uIP/uip-1.0/uip/uip.c" Name="uip.c" >
<configuration build_exclude_from_build="No" Name="ARM Flash Debug" />
<file Name="uip.c" file_name="../Common/ethernet/uIP/uip-1.0/uip/uip.c">
<configuration Name="ARM Flash Debug" build_exclude_from_build="No"/>
</file>
</folder>
<configuration c_preprocessor_definitions="THUMB_INTERWORK" Name="THUMB" />
<configuration c_preprocessor_definitions="STARTUP_FROM_RESET" gcc_optimization_level="Optimize For Size" Name="ARM Flash Release" />
<configuration arm_linker_fiq_stack_size="0" arm_linker_stack_size="0" Name="THUMB Flash Debug" arm_linker_svc_stack_size="512" arm_linker_heap_size="0" />
<configuration Name="THUMB" c_preprocessor_definitions="THUMB_INTERWORK"/>
<configuration Name="ARM Flash Release" c_preprocessor_definitions="STARTUP_FROM_RESET" gcc_optimization_level="Optimize For Size"/>
<configuration Name="THUMB Flash Debug" arm_linker_fiq_stack_size="0" arm_linker_heap_size="0" arm_linker_stack_size="0" arm_linker_svc_stack_size="512"/>
</project>
<configuration inherited_configurations="ARM;Flash;Debug" Name="ARM Flash Debug" />
<configuration arm_library_instruction_set="ARM" c_preprocessor_definitions="__ARM" arm_instruction_set="ARM" hidden="Yes" Name="ARM" />
<configuration c_preprocessor_definitions="__FLASH_BUILD" hidden="Yes" Name="Flash" />
<configuration c_preprocessor_definitions="DEBUG" link_include_startup_code="No" gcc_optimization_level="None" build_debug_information="Yes" hidden="Yes" Name="Debug" />
<configuration inherited_configurations="ARM;Flash;Release" Name="ARM Flash Release" />
<configuration c_preprocessor_definitions="NDEBUG" link_include_startup_code="No" gcc_optimization_level="Level 1" build_debug_information="No" hidden="Yes" Name="Release" />
<configuration inherited_configurations="THUMB;Flash;Debug" Name="THUMB Flash Debug" />
<configuration arm_library_instruction_set="THUMB" c_preprocessor_definitions="__THUMB" arm_instruction_set="THUMB" hidden="Yes" Name="THUMB" />
<configuration arm_linker_stack_size="256" Name="Common" />
<configuration Name="ARM Flash Debug" inherited_configurations="ARM;Flash;Debug"/>
<configuration Name="ARM" arm_instruction_set="ARM" arm_library_instruction_set="ARM" c_preprocessor_definitions="__ARM" hidden="Yes"/>
<configuration Name="Flash" c_preprocessor_definitions="__FLASH_BUILD" hidden="Yes"/>
<configuration Name="Debug" build_debug_information="Yes" c_preprocessor_definitions="DEBUG" gcc_optimization_level="None" hidden="Yes" link_include_startup_code="No"/>
<configuration Name="ARM Flash Release" inherited_configurations="ARM;Flash;Release"/>
<configuration Name="Release" build_debug_information="No" c_preprocessor_definitions="NDEBUG" gcc_optimization_level="Level 1" hidden="Yes" link_include_startup_code="No"/>
<configuration Name="THUMB Flash Debug" inherited_configurations="THUMB;Flash;Debug"/>
<configuration Name="THUMB" arm_instruction_set="THUMB" arm_library_instruction_set="THUMB" c_preprocessor_definitions="__THUMB" hidden="Yes"/>
<configuration Name="Common" arm_linker_stack_size="256"/>
</solution>

View File

@@ -1,26 +1,7 @@
<!DOCTYPE CrossStudio_for_ARM_Session_File>
<session>
<Autos>
<Watches active="0" />
</Autos>
<Bookmarks/>
<Breakpoints>
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="D_Abort" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="FIQ" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="IRQ" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="P_Abort" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="Reset" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="SWI" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="ARM Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="Undef" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="BusFault" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="ExceptionEntryReturnFault" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="HardFault" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="MemManage" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="3" mask="0" comparison="0" expression="Reset" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_CheckingError" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_Coprocessor" filename="" />
<BreakpointListItem actiontype="0" chainFrom="" line="-1" length="0" triggertype="0" useHWbreakpoint="false" group="Cortex-M3 Exceptions" breakdatatype="5" value="0" name="unnamed" counter="0" state="2" mask="0" comparison="0" expression="UsageFault_StateError" filename="" />
</Breakpoints>
<Breakpoints/>
<ExecutionCountWindow/>
<Memory1>
<MemoryWindow autoEvaluate="0" addressText="0x4000592c" numColumns="8" sizeText="2000" dataSize="1" radix="16" addressSpace="" />
@@ -40,35 +21,37 @@
<ProjectSessionItem path="RTOSDemo;RTOSDemo;Demo Source" name="unnamed" />
</Project>
<Register1>
<RegisterWindow unsignedDisplays="" asciiDisplays="" octalDisplays="" openGroups="CPU - Current Mode" visibleGroups="CPU - Current Mode" decimalDisplays="" binaryDisplays="" />
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
</Register1>
<Register2>
<RegisterWindow unsignedDisplays="" asciiDisplays="" octalDisplays="" openGroups="CPU - Current Mode" visibleGroups="CPU - Current Mode" decimalDisplays="" binaryDisplays="" />
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="CPU - Current Mode" decimalNodes="" octalNodes="" asciiNodes="" />
</Register2>
<Register3>
<RegisterWindow unsignedDisplays="" asciiDisplays="" octalDisplays="" openGroups="" visibleGroups="" decimalDisplays="" binaryDisplays="" />
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
</Register3>
<Register4>
<RegisterWindow unsignedDisplays="" asciiDisplays="" octalDisplays="" openGroups="" visibleGroups="" decimalDisplays="" binaryDisplays="" />
<RegisterWindow openNodes="" binaryNodes="" unsignedNodes="" visibleGroups="" decimalNodes="" octalNodes="" asciiNodes="" />
</Register4>
<SourceNavigatorWindow/>
<TargetWindow programAction="" uploadFileType="" programLoadAddress="" programSize="" uploadFileName="" uploadMemoryInterface="" programFileName="" uploadStartAddress="" programFileType="" uploadSize="" programMemoryInterface="" />
<TraceWindow>
<Trace wrap="Yes" type="1" enabled="Yes" />
<Trace enabled="Yes" />
</TraceWindow>
<Watch1>
<Watches active="0" />
<Watches active="0" update="Never" />
</Watch1>
<Watch2>
<Watches active="0" />
<Watches active="0" update="Never" />
</Watch2>
<Watch3>
<Watches active="0" />
<Watches active="0" update="Never" />
</Watch3>
<Watch4>
<Watches active="1" >
<Watches active="1" update="Never" >
<Watchpoint linenumber="0" radix="-1" name="xStart" expression="xStart" filename="" />
</Watches>
</Watch4>
<Files/>
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="/USB CrossConnect for ARM" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2368_Rowley\webserver" fileDialogDefaultFilter="*.cpp;*.cxx;*.cc;*.c;*.h" autoConnectCapabilities="1407" debugSearchPath="" buildConfiguration="ARM Flash Debug" />
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2368_Rowley\main.c" y="125" path="C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_LPC2368_Rowley\main.c" left="0" selected="1" name="unnamed" top="108" />
</Files>
<ARMCrossStudioWindow activeProject="RTOSDemo" autoConnectTarget="/USB CrossConnect for ARM-RTCK" debugSearchFileMap="" fileDialogInitialDirectory="C:\E\Dev\FreeRTOS\Demo\ARM7_LPC2368_Rowley\webserver" fileDialogDefaultFilter="*.c" autoConnectCapabilities="1407" debugSearchPath="" buildConfiguration="ARM Flash Debug" />
</session>

View File

@@ -1,43 +1,54 @@
/*
FreeRTOS.org V4.7.1 - Copyright (C) 2003-2008 Richard Barry.
FreeRTOS V7.0.0 - Copyright (C) 2011 Real Time Engineers Ltd.
This file is part of the FreeRTOS.org distribution.
***************************************************************************
* *
* FreeRTOS tutorial books are available in pdf and paperback. *
* Complete, revised, and edited pdf reference manuals are also *
* available. *
* *
* Purchasing FreeRTOS documentation will not only help you, by *
* ensuring you get running as quickly as possible and with an *
* in-depth knowledge of how to use FreeRTOS, it will also help *
* the FreeRTOS project to continue with its mission of providing *
* professional grade, cross platform, de facto standard solutions *
* for microcontrollers - completely free of charge! *
* *
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
* *
* Thank you for using FreeRTOS, and thank you for your support! *
* *
***************************************************************************
FreeRTOS.org is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
FreeRTOS.org 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. See the
GNU General Public License for more details.
This file is part of the FreeRTOS distribution.
You should have received a copy of the GNU General Public License
along with FreeRTOS.org; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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. See the GNU General Public License for
more details. You should have received a copy of the GNU General Public
License and the FreeRTOS license exception along with FreeRTOS; if not it
can be viewed here: http://www.freertos.org/a00114.html and also obtained
by writing to Richard Barry, contact details for whom are available on the
FreeRTOS WEB site.
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
1 tab == 4 spaces!
***************************************************************************
http://www.FreeRTOS.org - Documentation, latest information, license and
contact details.
Please ensure to read the configuration and relevant port sections of the
online documentation.
http://www.SafeRTOS.com - A version that is certified for use in safety
critical systems.
+++ http://www.FreeRTOS.org +++
Documentation, latest information, license and contact details.
+++ http://www.SafeRTOS.com +++
A version that is certified for use in safety critical systems.
+++ http://www.OpenRTOS.com +++
Commercial support, development, porting, licensing and training services.
***************************************************************************
http://www.OpenRTOS.com - Commercial support, development, porting,
licensing and training services.
*/
/* Environment includes. */
@@ -45,7 +56,7 @@
/* Scheduler includes. */
#include "FreeRTOS.h"
#include "Task.h"
#include "task.h"
#include "queue.h"
#include "semphr.h"
@@ -58,7 +69,7 @@
#include "flash.h"
#include "partest.h"
#include "semtest.h"
#include "pollq.h"
#include "PollQ.h"
/* Demo application definitions. */
#define mainQUEUE_SIZE ( 3 )
@@ -115,9 +126,10 @@ int main (void)
xLCDQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( xLCDMessage ) );
/* Create the lwIP task. This uses the lwIP RTOS abstraction layer.*/
xTaskCreate( vuIP_Task, ( signed portCHAR * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
xTaskCreate( vuIP_Task, ( signed char * ) "uIP", mainBASIC_WEB_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
/* Start the standard demo tasks. */
/* Start the standard demo tasks - these serve no useful purpose other than
to demonstrate the FreeRTOS API being used and to test the port. */
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
vCreateBlockTimeTasks();
vStartLEDFlashTasks( mainFLASH_PRIORITY );
@@ -126,8 +138,8 @@ int main (void)
vStartIntegerMathTasks( mainINTEGER_TASK_PRIORITY );
/* Start the tasks defined within this file/specific to this demo. */
xTaskCreate( vCheckTask, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
xTaskCreate( vCheckTask, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
xTaskCreate( vLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY - 1, NULL );
/* The suicide tasks must be created last as they need to know how many
tasks were running prior to their creation in order to ascertain whether
@@ -216,7 +228,7 @@ xLCDMessage xMessage;
LCD_cur_off();
LCD_cls();
LCD_gotoxy( 1, 1 );
LCD_puts( ( signed portCHAR * ) "www.FreeRTOS.org" );
LCD_puts( ( signed char * ) "www.FreeRTOS.org" );
for( ;; )
{

View File

@@ -1,24 +1,28 @@
#include "FreeRTOS.h"
#include "Semphr.h"
#include "Task.h"
#include "semphr.h"
#include "task.h"
/* The interrupt entry point. */
void vEMAC_ISR_Wrapper( void ) __attribute__((naked));
/* The function that actually performs the interrupt processing. This must be
separate to the wrapper to ensure the correct stack frame is set up. */
void vEMAC_ISR_Handler( void );
void vEMAC_ISR_Handler( void ) __attribute__((noinline));
extern xSemaphoreHandle xEMACSemaphore;
void vEMAC_ISR_Handler( void )
{
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Clear the interrupt. */
IntClear = 0xffff;
VICVectAddr = 0;
/* Ensure the uIP task is not blocked as data has arrived. */
if( xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE ) )
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
if( xHigherPriorityTaskWoken )
{
/* If the uIP task was unblocked then calling "Yield from ISR" here
will ensure the interrupt returns directly to the uIP task, if it
@@ -35,7 +39,7 @@ void vEMAC_ISR_Wrapper( void )
/* Call the handler function. This must be separate from the wrapper
function to ensure the correct stack frame is set up. */
vEMAC_ISR_Handler();
__asm volatile( "bl vEMAC_ISR_Handler" );
/* Restore the context of whichever task is going to run next. */
portRESTORE_CONTEXT();

Some files were not shown because too many files have changed in this diff Show More