├── .gitignore ├── FreeRTOSConfig.h ├── Makefile ├── README.md ├── include ├── AltBlckQ.h ├── AltBlock.h ├── AltPollQ.h ├── AltQTest.h ├── BlockQ.h ├── EventGroupsDemo.h ├── FreeRTOS.h ├── GenQTest.h ├── IntQueue.h ├── PollQ.h ├── QPeek.h ├── QueueOverwrite.h ├── QueueSet.h ├── StackMacros.h ├── TimerDemo.h ├── blocktim.h ├── comtest.h ├── comtest2.h ├── comtest_strings.h ├── countsem.h ├── crflash.h ├── crhook.h ├── croutine.h ├── death.h ├── dynamic.h ├── event_groups.h ├── fileIO.h ├── flash.h ├── flash_timer.h ├── flop.h ├── integer.h ├── list.h ├── mevents.h ├── mpu_wrappers.h ├── partest.h ├── portable.h ├── print.h ├── projdefs.h ├── queue.h ├── recmutex.h ├── semphr.h ├── semtest.h ├── serial.h ├── stdint.readme ├── task.h └── timers.h ├── main.c ├── src ├── croutine.c ├── event_groups.c ├── list.c ├── portable │ ├── GCC │ │ └── NRF51_SD │ │ │ ├── port.c │ │ │ └── portmacro.h │ └── MemMang │ │ ├── heap_1.c │ │ ├── heap_2.c │ │ ├── heap_3.c │ │ └── heap_4.c ├── queue.c ├── tasks.c └── timers.c └── template ├── Makefile ├── Makefile.posix ├── Makefile.windows ├── gcc_nrf51_blank.ld ├── gcc_nrf51_common.ld ├── gcc_nrf51_s110.ld ├── gcc_nrf51_s120.ld ├── gcc_nrf51_s210.ld ├── gcc_nrf51_s310.ld └── startup_nrf51.s /.gitignore: -------------------------------------------------------------------------------- 1 | flash.jlink 2 | _build 3 | 4 | 5 | -------------------------------------------------------------------------------- /FreeRTOSConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | 67 | #ifndef FREERTOS_CONFIG_H 68 | #define FREERTOS_CONFIG_H 69 | 70 | 71 | /*----------------------------------------------------------- 72 | * Application specific definitions. 73 | * 74 | * These definitions should be adjusted for your particular hardware and 75 | * application requirements. 76 | * 77 | * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE 78 | * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. 79 | * 80 | * See http://www.freertos.org/a00110.html. 81 | *----------------------------------------------------------*/ 82 | 83 | #include 84 | 85 | #define configUSE_PREEMPTION 1 86 | #define configUSE_IDLE_HOOK 1 87 | #define configUSE_TICK_HOOK 0 88 | #define configCPU_CLOCK_HZ ( 32768 ) 89 | #define configTICK_RATE_HZ ( ( TickType_t ) 100 ) 90 | #define configMAX_PRIORITIES ( 3 ) 91 | #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 40 ) 92 | #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3312 ) ) 93 | #define configMAX_TASK_NAME_LEN ( 3 ) 94 | #define configUSE_TRACE_FACILITY 0 95 | #define configUSE_16_BIT_TICKS 0 96 | #define configIDLE_SHOULD_YIELD 0 97 | #define configUSE_MUTEXES 0 98 | #define configQUEUE_REGISTRY_SIZE 3 99 | #define configCHECK_FOR_STACK_OVERFLOW 0 100 | #define configUSE_RECURSIVE_MUTEXES 0 101 | #define configUSE_MALLOC_FAILED_HOOK 0 102 | #define configUSE_APPLICATION_TASK_TAG 0 103 | #define configUSE_COUNTING_SEMAPHORES 0 104 | #define configGENERATE_RUN_TIME_STATS 0 105 | 106 | /* Co-routine definitions. */ 107 | #define configUSE_CO_ROUTINES 0 108 | #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) 109 | 110 | /* Software timer definitions. */ 111 | #define configUSE_TIMERS 0 112 | #define configTIMER_TASK_PRIORITY ( 2 ) 113 | #define configTIMER_QUEUE_LENGTH 2 114 | #define configTIMER_TASK_STACK_DEPTH ( 80 ) 115 | 116 | /* Set the following definitions to 1 to include the API function, or zero 117 | to exclude the API function. */ 118 | #define INCLUDE_vTaskPrioritySet 1 119 | #define INCLUDE_uxTaskPriorityGet 1 120 | #define INCLUDE_vTaskDelete 0 121 | #define INCLUDE_vTaskCleanUpResources 1 122 | #define INCLUDE_vTaskSuspend 1 123 | #define INCLUDE_vTaskDelayUntil 1 124 | #define INCLUDE_vTaskDelay 1 125 | #define INCLUDE_eTaskGetState 1 126 | 127 | /* Normal assert() semantics without relying on the provision of an assert.h 128 | header file. */ 129 | #define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } 130 | 131 | /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS 132 | standard names - or at least those used in the unmodified vector table. */ 133 | #define xPortPendSVHandler PendSV_Handler 134 | #define xPortSysTickHandler RTC1_IRQHandler 135 | #endif /* FREERTOS_CONFIG_H */ 136 | 137 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | RTOS_SOURCE_DIR=./src 2 | 3 | LIBRARY_PATHS += . 4 | LIBRARY_PATHS += ./include 5 | LIBRARY_PATHS += ${RTOS_SOURCE_DIR}/portable/GCC/NRF51_SD 6 | 7 | SOURCE_PATHS += ${RTOS_SOURCE_DIR} 8 | SOURCE_PATHS += ${RTOS_SOURCE_DIR}/portable/MemMang 9 | SOURCE_PATHS += ${RTOS_SOURCE_DIR}/portable/GCC/NRF51_SD 10 | 11 | # List all source files the application uses. 12 | APPLICATION_SRCS = $(notdir $(wildcard ./*.c)) 13 | APPLICATION_SRCS += softdevice_handler.c 14 | 15 | #FreeRTOS Sources 16 | APPLICATION_SRCS += list.c 17 | APPLICATION_SRCS += queue.c 18 | APPLICATION_SRCS += tasks.c 19 | APPLICATION_SRCS += port.c 20 | APPLICATION_SRCS += heap_1.c 21 | #APPLICATION_SRCS += timers.c 22 | 23 | PROJECT_NAME = FreeRTOS-Demo 24 | 25 | DEVICE = NRF51 26 | 27 | USE_SOFTDEVICE = s120 28 | 29 | SDK_PATH = $(HOME)/devel/nrf-sdk-6.0.0/nrf51822/ 30 | TEMPLATE_PATH = ./template/ 31 | 32 | CFLAGS = -Os -g -Wall 33 | LDFLAGS = --specs=nano.specs 34 | 35 | GDB_PORT_NUMBER = 2331 36 | 37 | include $(TEMPLATE_PATH)Makefile 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FreeRTOS Flash demo port to nrf51822+softdevice 2 | 3 | ## Description 4 | 5 | This is a port of the simple FreeRTOS blinky demo. Critical region 6 | handling has been updated to use the softdevice api. 7 | 8 | Due to a lack of SysTick hardware in the nrf51 the tick timer is 9 | implemented via RTC1. RTC1 auses the LFCLK; so we don't need HFCLK 10 | running most of the time. 11 | 12 | The vApplicationIdleHook is implemented to call sd_app_evt_wait(). So 13 | it ought to sleep as well as can be expected. 14 | 15 | ## Questionable Decisions + Todos 16 | 17 | I've cleared the portDISABLE_INTERRUPT macros. Most of FreeRTOS seems to use the critical region code which ought to be right... but there may be some code that still believes that it's disabling interrupts directly (when it is not). 18 | 19 | CPSID/CPSIE Fun: 20 | 21 | If CPSID is called in for an extended period of time, then the radio 22 | will miss it's deadlines. Eventually, 23 | the correct way to handle these may be to store/restore a mask of enabled 24 | application interrupts (excluding those blocked or restricted by the 25 | sd) and sprinkle it around as needed. You would think that the 26 | sd_nvic_critical_region_enter would do something like this, however in 27 | SDK 6.0.0 there is only a stub, leaving us to wonder how this is 28 | implemented in the softdevice blob. 29 | 30 | port.c(ulSetInterruptMaskFromISR): 31 | Removed cpsid before the branch. There was no complimentary cspie in 32 | the vClearInterruptMaskFromISR. These functions seem to set and clear PRIMASK directly, which is a no-no for nrf51 with sd running. I've cleared the macros by which these functions are referenced with no ill-effects. They are left in the code in case some day it proves a better idea to clear / set ICSR as mentioned above. 33 | 34 | port.c(xPortPendSVHandler): 35 | I commented out the cspid/cspie bookending 36 | the branch to vTaskSwitchContext. This would seem like a "bad idea", 37 | but the logic in that function has nothing to do with the actual 38 | context switch. It's more of a hook for stack overflow testing and 39 | the trace framework. Could be bad news for task stats and the 40 | like. No practical effect on my projects yet. 41 | 42 | 43 | I've reduced the default call stack size to the 1596B required for softdevice operation (0x600 down from 0xC00). Task 44 | stacks are allocated from the heap, but if you add a lot of functionality 45 | outside tasks (anything running in Handler mode or using MSP...BLE event handlers, perhaps ) then you'll need to increase 46 | the stack in startup_nrf51.s (and decrease the configTOTAL_HEAP_SIZE 47 | in FreeRTOSConfig.h). There's only ~3kB of RAM left after the s120 48 | softdevice has it's way (it uses 10K+1.5K stack); so memory will be 49 | tight. Careful application design is needed. 50 | 51 | Patches welcome, this code is PoC quality (at best). 52 | 53 | ## Prerequisites 54 | 55 | - GCC ARM Toolchain (arm-eabi-none-gcc, et. al) in your path 56 | 57 | - NRF SDK installed locally and the path specified as SDK_PATH in the 58 | Makefile 59 | 60 | - NRF Softdevice loaded onto the development board. 61 | 62 | - Tested with s120v1, NRF51822 SDK 6.1.0, and arm gcc 4.8 2014q2 63 | 64 | ## Usage 65 | 66 | 1. Edit Makefile as needed. You'll also want to correct the LED_0 67 | definition in main.c to correspond to your development boards LED. 68 | 69 | 2. Flash softdevice 70 | 71 | 3. `make flash` 72 | 73 | ## Credits 74 | 75 | - Build environment based heavily on 76 | [hlnd/nrf51-pure-gcc-setup](https://github.com/hlnd/nrf51-pure-gcc-setup) 77 | 78 | - Heavily influenced by the existing FreeRTOS Flash Demo and the existing FreeRTOS ARM_CM0 code. 79 | -------------------------------------------------------------------------------- /include/AltBlckQ.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef ALT_BLOCK_Q_H 67 | #define ALT_BLOCK_Q_H 68 | 69 | void vStartAltBlockingQueueTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xAreAltBlockingQueuesStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/AltBlock.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef FAST_BLOCK_TIME_TEST_H 67 | #define FAST_BLOCK_TIME_TEST_H 68 | 69 | void vCreateAltBlockTimeTasks( void ); 70 | portBASE_TYPE xAreAltBlockTimeTestTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/AltPollQ.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef ALT_POLLED_Q_H 67 | #define ALT_POLLED_Q_H 68 | 69 | void vStartAltPolledQueueTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xAreAltPollingQueuesStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/AltQTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef FAST_GEN_Q_TEST_H 67 | #define FAST_GEN_Q_TEST_H 68 | 69 | void vStartAltGenericQueueTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xAreAltGenericQueueTasksStillRunning( void ); 71 | 72 | #endif /* GEN_Q_TEST_H */ 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /include/BlockQ.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef BLOCK_Q_H 67 | #define BLOCK_Q_H 68 | 69 | void vStartBlockingQueueTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xAreBlockingQueuesStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/EventGroupsDemo.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | 67 | 68 | /* 69 | * This file contains fairly comprehensive checks on the behaviour of event 70 | * groups. It is not intended to be a user friendly demonstration of the event 71 | * groups API. 72 | */ 73 | 74 | #ifndef EVENT_GROUPS_DEMO_H 75 | #define EVENT_GROUPS_DEMO_H 76 | 77 | void vStartEventGroupTasks( void ); 78 | portBASE_TYPE xAreEventGroupTasksStillRunning( void ); 79 | void vPeriodicEventGroupsProcessing( void ); 80 | 81 | #endif /* EVENT_GROUPS_DEMO_H */ 82 | 83 | -------------------------------------------------------------------------------- /include/GenQTest.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef GEN_Q_TEST_H 67 | #define GEN_Q_TEST_H 68 | 69 | void vStartGenericQueueTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xAreGenericQueueTasksStillRunning( void ); 71 | 72 | #endif /* GEN_Q_TEST_H */ 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /include/IntQueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef QUEUE_ACCESS_TEST 67 | #define QUEUE_ACCESS_TEST 68 | 69 | void vStartInterruptQueueTasks( void ); 70 | portBASE_TYPE xAreIntQueueTasksStillRunning( void ); 71 | portBASE_TYPE xFirstTimerHandler( void ); 72 | portBASE_TYPE xSecondTimerHandler( void ); 73 | 74 | #endif /* QUEUE_ACCESS_TEST */ 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /include/PollQ.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef POLLED_Q_H 67 | #define POLLED_Q_H 68 | 69 | void vStartPolledQueueTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xArePollingQueuesStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/QPeek.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef Q_PEEK_TEST_H 67 | #define Q_PEEK_TEST_H 68 | 69 | void vStartQueuePeekTasks( void ); 70 | portBASE_TYPE xAreQueuePeekTasksStillRunning( void ); 71 | 72 | #endif /* Q_PEEK_TEST_H */ 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /include/QueueOverwrite.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef QUEUE_OVERWRITE_H 67 | #define QUEUE_OVERWRITE_H 68 | 69 | void vStartQueueOverwriteTask( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xIsQueueOverwriteTaskStillRunning( void ); 71 | void vQueueOverwritePeriodicISRDemo( void ); 72 | 73 | #endif /* QUEUE_OVERWRITE_H */ 74 | 75 | 76 | -------------------------------------------------------------------------------- /include/QueueSet.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef QUEUE_WAIT_MULTIPLE_H 67 | #define QUEUE_WAIT_MULTIPLE_H 68 | 69 | void vStartQueueSetTasks( void ); 70 | portBASE_TYPE xAreQueueSetTasksStillRunning( void ); 71 | void vQueueSetAccessQueueSetFromISR( void ); 72 | 73 | #endif /* QUEUE_WAIT_MULTIPLE_H */ 74 | 75 | 76 | -------------------------------------------------------------------------------- /include/StackMacros.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef STACK_MACROS_H 67 | #define STACK_MACROS_H 68 | 69 | /* 70 | * Call the stack overflow hook function if the stack of the task being swapped 71 | * out is currently overflowed, or looks like it might have overflowed in the 72 | * past. 73 | * 74 | * Setting configCHECK_FOR_STACK_OVERFLOW to 1 will cause the macro to check 75 | * the current stack state only - comparing the current top of stack value to 76 | * the stack limit. Setting configCHECK_FOR_STACK_OVERFLOW to greater than 1 77 | * will also cause the last few stack bytes to be checked to ensure the value 78 | * to which the bytes were set when the task was created have not been 79 | * overwritten. Note this second test does not guarantee that an overflowed 80 | * stack will always be recognised. 81 | */ 82 | 83 | /*-----------------------------------------------------------*/ 84 | 85 | #if( configCHECK_FOR_STACK_OVERFLOW == 0 ) 86 | 87 | /* FreeRTOSConfig.h is not set to check for stack overflows. */ 88 | #define taskFIRST_CHECK_FOR_STACK_OVERFLOW() 89 | #define taskSECOND_CHECK_FOR_STACK_OVERFLOW() 90 | 91 | #endif /* configCHECK_FOR_STACK_OVERFLOW == 0 */ 92 | /*-----------------------------------------------------------*/ 93 | 94 | #if( configCHECK_FOR_STACK_OVERFLOW == 1 ) 95 | 96 | /* FreeRTOSConfig.h is only set to use the first method of 97 | overflow checking. */ 98 | #define taskSECOND_CHECK_FOR_STACK_OVERFLOW() 99 | 100 | #endif 101 | /*-----------------------------------------------------------*/ 102 | 103 | #if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH < 0 ) ) 104 | 105 | /* Only the current stack state is to be checked. */ 106 | #define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \ 107 | { \ 108 | /* Is the currently saved stack pointer within the stack limit? */ \ 109 | if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack ) \ 110 | { \ 111 | vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \ 112 | } \ 113 | } 114 | 115 | #endif /* configCHECK_FOR_STACK_OVERFLOW > 0 */ 116 | /*-----------------------------------------------------------*/ 117 | 118 | #if( ( configCHECK_FOR_STACK_OVERFLOW > 0 ) && ( portSTACK_GROWTH > 0 ) ) 119 | 120 | /* Only the current stack state is to be checked. */ 121 | #define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \ 122 | { \ 123 | \ 124 | /* Is the currently saved stack pointer within the stack limit? */ \ 125 | if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \ 126 | { \ 127 | vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \ 128 | } \ 129 | } 130 | 131 | #endif /* configCHECK_FOR_STACK_OVERFLOW == 1 */ 132 | /*-----------------------------------------------------------*/ 133 | 134 | #if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) ) 135 | 136 | #define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \ 137 | { \ 138 | static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 139 | tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 140 | tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 141 | tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 142 | tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \ 143 | \ 144 | \ 145 | /* Has the extremity of the task stack ever been written over? */ \ 146 | if( memcmp( ( void * ) pxCurrentTCB->pxStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \ 147 | { \ 148 | vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \ 149 | } \ 150 | } 151 | 152 | #endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */ 153 | /*-----------------------------------------------------------*/ 154 | 155 | #if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH > 0 ) ) 156 | 157 | #define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \ 158 | { \ 159 | int8_t *pcEndOfStack = ( int8_t * ) pxCurrentTCB->pxEndOfStack; \ 160 | static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 161 | tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 162 | tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 163 | tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 164 | tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE }; \ 165 | \ 166 | \ 167 | pcEndOfStack -= sizeof( ucExpectedStackBytes ); \ 168 | \ 169 | /* Has the extremity of the task stack ever been written over? */ \ 170 | if( memcmp( ( void * ) pcEndOfStack, ( void * ) ucExpectedStackBytes, sizeof( ucExpectedStackBytes ) ) != 0 ) \ 171 | { \ 172 | vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \ 173 | } \ 174 | } 175 | 176 | #endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */ 177 | /*-----------------------------------------------------------*/ 178 | 179 | #endif /* STACK_MACROS_H */ 180 | 181 | -------------------------------------------------------------------------------- /include/TimerDemo.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef TIMER_DEMO_H 67 | #define TIMER_DEMO_H 68 | 69 | void vStartTimerDemoTask( TickType_t xBaseFrequencyIn ); 70 | portBASE_TYPE xAreTimerDemoTasksStillRunning( TickType_t xCycleFrequency ); 71 | void vTimerPeriodicISRTests( void ); 72 | 73 | #endif /* TIMER_DEMO_H */ 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /include/blocktim.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef BLOCK_TIME_TEST_H 67 | #define BLOCK_TIME_TEST_H 68 | 69 | void vCreateBlockTimeTasks( void ); 70 | portBASE_TYPE xAreBlockTimeTestTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/comtest.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef COMTEST_H 67 | #define COMTEST_H 68 | 69 | void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulBaudRate, unsigned portBASE_TYPE uxLED ); 70 | void vStartComTestTasks( unsigned portBASE_TYPE uxPriority, eCOMPort ePort, eBaud eBaudRate ); 71 | portBASE_TYPE xAreComTestTasksStillRunning( void ); 72 | void vComTestUnsuspendTask( void ); 73 | 74 | #endif 75 | 76 | -------------------------------------------------------------------------------- /include/comtest2.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef COMTEST_H 67 | #define COMTEST_H 68 | 69 | void vAltStartComTestTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulBaudRate, unsigned portBASE_TYPE uxLED ); 70 | portBASE_TYPE xAreComTestTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /include/comtest_strings.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef COMTEST_STRINGS_H 67 | #define COMTEST_STRINGS_H 68 | 69 | void vStartComTestStringsTasks( unsigned portBASE_TYPE uxPriority, unsigned long ulBaudRate, unsigned portBASE_TYPE uxLED ); 70 | portBASE_TYPE xAreComTestTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /include/countsem.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef COUNT_SEMAPHORE_TEST_H 67 | #define COUNT_SEMAPHORE_TEST_H 68 | 69 | void vStartCountingSemaphoreTasks( void ); 70 | portBASE_TYPE xAreCountingSemaphoreTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /include/crflash.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef CRFLASH_LED_H 67 | #define CRFLASH_LED_H 68 | 69 | /* 70 | * Create the co-routines used to flash the LED's at different rates. 71 | * 72 | * @param uxPriority The number of 'fixed delay' co-routines to create. This 73 | * also effects the number of LED's that will be utilised. For example, 74 | * passing in 3 will cause LED's 0 to 2 to be utilised. 75 | */ 76 | void vStartFlashCoRoutines( unsigned portBASE_TYPE uxPriority ); 77 | 78 | /* 79 | * Return pdPASS or pdFAIL depending on whether an error has been detected 80 | * or not. 81 | */ 82 | portBASE_TYPE xAreFlashCoRoutinesStillRunning( void ); 83 | 84 | #endif 85 | 86 | -------------------------------------------------------------------------------- /include/crhook.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef CRHOOK_H 67 | #define CRHOOK_H 68 | 69 | /* 70 | * Create the co-routines used to communicate wit the tick hook. 71 | */ 72 | void vStartHookCoRoutines( void ); 73 | 74 | /* 75 | * Return pdPASS or pdFAIL depending on whether an error has been detected 76 | * or not. 77 | */ 78 | portBASE_TYPE xAreHookCoRoutinesStillRunning( void ); 79 | 80 | #endif 81 | 82 | -------------------------------------------------------------------------------- /include/death.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef SUICIDE_TASK_H 67 | #define SUICIDE_TASK_H 68 | 69 | void vCreateSuicidalTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xIsCreateTaskStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/dynamic.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef DYNAMIC_MANIPULATION_H 67 | #define DYNAMIC_MANIPULATION_H 68 | 69 | void vStartDynamicPriorityTasks( void ); 70 | portBASE_TYPE xAreDynamicPriorityTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/fileIO.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef FILE_IO_H 67 | #define FILE_OI_H 68 | 69 | void vDisplayMessage( const char * const pcMessageToPrint ); 70 | void vWriteMessageToDisk( const char * const pcMessage ); 71 | void vWriteBufferToDisk( const char * const pcBuffer, unsigned long ulBufferLength ); 72 | 73 | #endif 74 | 75 | -------------------------------------------------------------------------------- /include/flash.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef FLASH_LED_H 67 | #define FLASH_LED_H 68 | 69 | void vStartLEDFlashTasks( unsigned portBASE_TYPE uxPriority ); 70 | 71 | #endif 72 | 73 | -------------------------------------------------------------------------------- /include/flash_timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef FLASH_TIMER_H 67 | #define FLASH_TIMER_H 68 | 69 | /* 70 | * Creates the LED flashing timers. xNumberOfLEDs specifies how many timers to 71 | * create, with each timer toggling a different LED. The first LED to be 72 | * toggled is LED 0, with subsequent LEDs following on in numerical order. Each 73 | * timer uses the exact same callback function, with the timer ID being used 74 | * within the callback function to determine which timer has actually expired 75 | * (and therefore which LED to toggle). 76 | */ 77 | void vStartLEDFlashTimers( unsigned portBASE_TYPE uxNumberOfLEDs ); 78 | 79 | #endif /* FLASH_TIMER_H */ 80 | -------------------------------------------------------------------------------- /include/flop.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef FLOP_TASKS_H 67 | #define FLOP_TASKS_H 68 | 69 | void vStartMathTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xAreMathsTaskStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/integer.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef INTEGER_TASKS_H 67 | #define INTEGER_TASKS_H 68 | 69 | void vStartIntegerMathTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xAreIntegerMathsTaskStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/mevents.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef EVENTS_TEST_H 67 | #define EVENTS_TEST_H 68 | 69 | void vStartMultiEventTasks( void ); 70 | portBASE_TYPE xAreMultiEventTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | 75 | -------------------------------------------------------------------------------- /include/mpu_wrappers.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef MPU_WRAPPERS_H 67 | #define MPU_WRAPPERS_H 68 | 69 | /* This file redefines API functions to be called through a wrapper macro, but 70 | only for ports that are using the MPU. */ 71 | #ifdef portUSING_MPU_WRAPPERS 72 | 73 | /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE will be defined when this file is 74 | included from queue.c or task.c to prevent it from having an effect within 75 | those files. */ 76 | #ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 77 | 78 | #define xTaskGenericCreate MPU_xTaskGenericCreate 79 | #define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions 80 | #define vTaskDelete MPU_vTaskDelete 81 | #define vTaskDelayUntil MPU_vTaskDelayUntil 82 | #define vTaskDelay MPU_vTaskDelay 83 | #define uxTaskPriorityGet MPU_uxTaskPriorityGet 84 | #define vTaskPrioritySet MPU_vTaskPrioritySet 85 | #define eTaskGetState MPU_eTaskGetState 86 | #define vTaskSuspend MPU_vTaskSuspend 87 | #define vTaskResume MPU_vTaskResume 88 | #define vTaskSuspendAll MPU_vTaskSuspendAll 89 | #define xTaskResumeAll MPU_xTaskResumeAll 90 | #define xTaskGetTickCount MPU_xTaskGetTickCount 91 | #define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks 92 | #define vTaskList MPU_vTaskList 93 | #define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats 94 | #define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag 95 | #define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag 96 | #define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook 97 | #define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark 98 | #define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle 99 | #define xTaskGetSchedulerState MPU_xTaskGetSchedulerState 100 | #define xTaskGetIdleTaskHandle MPU_xTaskGetIdleTaskHandle 101 | #define uxTaskGetSystemState MPU_uxTaskGetSystemState 102 | 103 | #define xQueueGenericCreate MPU_xQueueGenericCreate 104 | #define xQueueCreateMutex MPU_xQueueCreateMutex 105 | #define xQueueGiveMutexRecursive MPU_xQueueGiveMutexRecursive 106 | #define xQueueTakeMutexRecursive MPU_xQueueTakeMutexRecursive 107 | #define xQueueCreateCountingSemaphore MPU_xQueueCreateCountingSemaphore 108 | #define xQueueGenericSend MPU_xQueueGenericSend 109 | #define xQueueAltGenericSend MPU_xQueueAltGenericSend 110 | #define xQueueAltGenericReceive MPU_xQueueAltGenericReceive 111 | #define xQueueGenericReceive MPU_xQueueGenericReceive 112 | #define uxQueueMessagesWaiting MPU_uxQueueMessagesWaiting 113 | #define vQueueDelete MPU_vQueueDelete 114 | #define xQueueGenericReset MPU_xQueueGenericReset 115 | #define xQueueCreateSet MPU_xQueueCreateSet 116 | #define xQueueSelectFromSet MPU_xQueueSelectFromSet 117 | #define xQueueAddToSet MPU_xQueueAddToSet 118 | #define xQueueRemoveFromSet MPU_xQueueRemoveFromSet 119 | #define xQueuePeekFromISR MPU_xQueuePeekFromISR 120 | #define xQueueGetMutexHolder MPU_xQueueGetMutexHolder 121 | 122 | #define pvPortMalloc MPU_pvPortMalloc 123 | #define vPortFree MPU_vPortFree 124 | #define xPortGetFreeHeapSize MPU_xPortGetFreeHeapSize 125 | #define vPortInitialiseBlocks MPU_vPortInitialiseBlocks 126 | 127 | #if configQUEUE_REGISTRY_SIZE > 0 128 | #define vQueueAddToRegistry MPU_vQueueAddToRegistry 129 | #define vQueueUnregisterQueue MPU_vQueueUnregisterQueue 130 | #endif 131 | 132 | /* Remove the privileged function macro. */ 133 | #define PRIVILEGED_FUNCTION 134 | 135 | #else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */ 136 | 137 | /* Ensure API functions go in the privileged execution section. */ 138 | #define PRIVILEGED_FUNCTION __attribute__((section("privileged_functions"))) 139 | #define PRIVILEGED_DATA __attribute__((section("privileged_data"))) 140 | 141 | #endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */ 142 | 143 | #else /* portUSING_MPU_WRAPPERS */ 144 | 145 | #define PRIVILEGED_FUNCTION 146 | #define PRIVILEGED_DATA 147 | #define portUSING_MPU_WRAPPERS 0 148 | 149 | #endif /* portUSING_MPU_WRAPPERS */ 150 | 151 | 152 | #endif /* MPU_WRAPPERS_H */ 153 | 154 | -------------------------------------------------------------------------------- /include/partest.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef PARTEST_H 67 | #define PARTEST_H 68 | 69 | #define partstDEFAULT_PORT_ADDRESS ( ( unsigned short ) 0x378 ) 70 | 71 | void vParTestInitialise( void ); 72 | void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue ); 73 | void vParTestToggleLED( unsigned portBASE_TYPE uxLED ); 74 | 75 | #endif 76 | 77 | -------------------------------------------------------------------------------- /include/print.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef PRINT_H 67 | #define PRINT_H 68 | 69 | void vPrintInitialise( void ); 70 | void vPrintDisplayMessage( const char * const * pcMessageToSend ); 71 | const char *pcPrintGetNextMessage( TickType_t xPrintRate ); 72 | 73 | #endif 74 | 75 | 76 | -------------------------------------------------------------------------------- /include/projdefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef PROJDEFS_H 67 | #define PROJDEFS_H 68 | 69 | /* 70 | * Defines the prototype to which task functions must conform. Defined in this 71 | * file to ensure the type is known before portable.h is included. 72 | */ 73 | typedef void (*TaskFunction_t)( void * ); 74 | 75 | #define pdFALSE ( ( BaseType_t ) 0 ) 76 | #define pdTRUE ( ( BaseType_t ) 1 ) 77 | 78 | #define pdPASS ( pdTRUE ) 79 | #define pdFAIL ( pdFALSE ) 80 | #define errQUEUE_EMPTY ( ( BaseType_t ) 0 ) 81 | #define errQUEUE_FULL ( ( BaseType_t ) 0 ) 82 | 83 | /* Error definitions. */ 84 | #define errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ( -1 ) 85 | #define errQUEUE_BLOCKED ( -4 ) 86 | #define errQUEUE_YIELD ( -5 ) 87 | 88 | #endif /* PROJDEFS_H */ 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /include/recmutex.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef RECURSIVE_MUTEX_TEST_H 67 | #define RECURSIVE_MUTEX_TEST_H 68 | 69 | void vStartRecursiveMutexTasks( void ); 70 | portBASE_TYPE xAreRecursiveMutexTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /include/semtest.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef SEMAPHORE_TEST_H 67 | #define SEMAPHORE_TEST_H 68 | 69 | void vStartSemaphoreTasks( unsigned portBASE_TYPE uxPriority ); 70 | portBASE_TYPE xAreSemaphoreTasksStillRunning( void ); 71 | 72 | #endif 73 | 74 | -------------------------------------------------------------------------------- /include/serial.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | #ifndef SERIAL_COMMS_H 67 | #define SERIAL_COMMS_H 68 | 69 | typedef void * xComPortHandle; 70 | 71 | typedef enum 72 | { 73 | serCOM1, 74 | serCOM2, 75 | serCOM3, 76 | serCOM4, 77 | serCOM5, 78 | serCOM6, 79 | serCOM7, 80 | serCOM8 81 | } eCOMPort; 82 | 83 | typedef enum 84 | { 85 | serNO_PARITY, 86 | serODD_PARITY, 87 | serEVEN_PARITY, 88 | serMARK_PARITY, 89 | serSPACE_PARITY 90 | } eParity; 91 | 92 | typedef enum 93 | { 94 | serSTOP_1, 95 | serSTOP_2 96 | } eStopBits; 97 | 98 | typedef enum 99 | { 100 | serBITS_5, 101 | serBITS_6, 102 | serBITS_7, 103 | serBITS_8 104 | } eDataBits; 105 | 106 | typedef enum 107 | { 108 | ser50, 109 | ser75, 110 | ser110, 111 | ser134, 112 | ser150, 113 | ser200, 114 | ser300, 115 | ser600, 116 | ser1200, 117 | ser1800, 118 | ser2400, 119 | ser4800, 120 | ser9600, 121 | ser19200, 122 | ser38400, 123 | ser57600, 124 | ser115200 125 | } eBaud; 126 | 127 | xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength ); 128 | xComPortHandle xSerialPortInit( eCOMPort ePort, eBaud eWantedBaud, eParity eWantedParity, eDataBits eWantedDataBits, eStopBits eWantedStopBits, unsigned portBASE_TYPE uxBufferLength ); 129 | void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength ); 130 | signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime ); 131 | signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, TickType_t xBlockTime ); 132 | portBASE_TYPE xSerialWaitForSemaphore( xComPortHandle xPort ); 133 | void vSerialClose( xComPortHandle xPort ); 134 | 135 | #endif 136 | 137 | -------------------------------------------------------------------------------- /include/stdint.readme: -------------------------------------------------------------------------------- 1 | 2 | #ifndef FREERTOS_STDINT 3 | #define FREERTOS_STDINT 4 | 5 | /******************************************************************************* 6 | * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions 7 | * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be 8 | * built using compilers that do not provide their own stdint.h definition. 9 | * 10 | * To use this file: 11 | * 12 | * 1) Copy this file into the directory that contains your FreeRTOSConfig.h 13 | * header file, as that directory will already be in the compilers include 14 | * path. 15 | * 16 | * 2) Rename the copied file stdint.h. 17 | * 18 | */ 19 | 20 | typedef signed char int8_t; 21 | typedef unsigned char uint8_t; 22 | typedef short int16_t; 23 | typedef unsigned short uint16_t; 24 | typedef long int32_t; 25 | typedef unsigned long uint32_t; 26 | 27 | #endif /* FREERTOS_STDINT */ 28 | -------------------------------------------------------------------------------- /main.c: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Port of FreeRTOS to NRF51822 - Shawn Nock 4 | 21 Aug. 2014 5 | 6 | */ 7 | 8 | /* NRF SDK Includes */ 9 | #include "nordic_common.h" 10 | #include "softdevice_handler.h" 11 | #include "nrf.h" 12 | #include "nrf_gpio.h" 13 | 14 | /* Scheduler include files. */ 15 | #include "FreeRTOS.h" 16 | #include "task.h" 17 | #include "queue.h" 18 | 19 | #define LED_0 10 20 | 21 | uint8_t led_status = 0; 22 | 23 | /* Priorities at which the tasks are created. */ 24 | #define mainQUEUE_RECEIVE_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 ) 25 | #define mainQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) 26 | /* The rate at which data is sent to the queue. The 200ms value is converted 27 | to ticks using the portTICK_PERIOD_MS constant. */ 28 | #define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_PERIOD_MS ) 29 | 30 | /* The number of items the queue can hold. This is 1 as the receive task 31 | will remove items as they are added, meaning the send task should always find 32 | the queue empty. */ 33 | #define mainQUEUE_LENGTH ( 1 ) 34 | 35 | /* Values passed to the two tasks just to check the task parameter 36 | functionality. */ 37 | #define mainQUEUE_SEND_PARAMETER ( 0x1111UL ) 38 | #define mainQUEUE_RECEIVE_PARAMETER ( 0x22UL ) 39 | /*-----------------------------------------------------------*/ 40 | 41 | /* The queue used by both tasks. */ 42 | static QueueHandle_t xQueue = NULL; 43 | 44 | /*-----------------------------------------------------------*/ 45 | 46 | /* Function called by APP_ERROR_HANDLER via APP_ERROR_CHECK macro if 47 | err_code isn't NRF_SUCCESS */ 48 | void app_error_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name) { 49 | for(;;); 50 | } 51 | 52 | /* Function called if an assert fails in the softdevice */ 53 | void assert_nrf_callback(uint16_t line_num, const uint8_t * p_file_name) { 54 | app_error_handler(0xDEADBEEF, line_num, p_file_name); 55 | } 56 | 57 | /*-----------------------------------------------------------*/ 58 | 59 | /* 60 | * Latch the LED that indicates that an error has occurred. 61 | */ 62 | void vMainToggleLED( void ); 63 | 64 | /* 65 | * Sets up the hardware used by the demo. 66 | */ 67 | static void prvSetupHardware( void ); 68 | 69 | /* Tasks */ 70 | 71 | static void prvQueueReceiveTask( void *pvParameters ); 72 | static void prvQueueSendTask( void *pvParameters ); 73 | 74 | /*-----------------------------------------------------------*/ 75 | 76 | /* Error flag set to pdFAIL if an error is encountered in the tasks/co-routines 77 | defined within this file. */ 78 | unsigned portBASE_TYPE uxErrorStatus = pdPASS; 79 | 80 | /*-----------------------------------------------------------*/ 81 | 82 | int main( void ) 83 | { 84 | 85 | /* Setup the ports used by the demo and the clock. */ 86 | prvSetupHardware(); 87 | 88 | 89 | /* Create the queue. */ 90 | xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) ); 91 | 92 | if( xQueue != NULL ) 93 | { 94 | /* Start the two tasks as described in the comments at the top of this 95 | file. */ 96 | xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */ 97 | "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */ 98 | configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */ 99 | ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */ 100 | mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */ 101 | NULL ); /* The task handle is not required, so NULL is passed. */ 102 | xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, 103 | mainQUEUE_SEND_TASK_PRIORITY, NULL ); 104 | 105 | /* Start the scheduler running the tasks and co-routines just created. */ 106 | 107 | vTaskStartScheduler(); 108 | 109 | /* Should not get here unless we did not have enough memory to start the 110 | scheduler. */ 111 | vMainToggleLED(); 112 | for( ;; ); 113 | } 114 | return 0; 115 | } 116 | /*-----------------------------------------------------------*/ 117 | 118 | void prvSetupHardware( void ) 119 | { 120 | SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false); 121 | nrf_gpio_pin_set(LED_0); 122 | nrf_gpio_cfg_output(LED_0); 123 | } 124 | /*-----------------------------------------------------------*/ 125 | 126 | void vMainToggleLED( void ) { 127 | nrf_gpio_pin_toggle(LED_0); 128 | } 129 | 130 | /*-----------------------------------------------------------*/ 131 | 132 | void prvQueueSendTask( void *pvParameters ) 133 | { 134 | TickType_t xNextWakeTime; 135 | const unsigned long ulValueToSend = 100UL; 136 | 137 | /* Check the task parameter is as expected. */ 138 | configASSERT( ( ( unsigned long ) pvParameters ) == mainQUEUE_SEND_PARAMETER ); 139 | 140 | /* Initialise xNextWakeTime - this only needs to be done once. */ 141 | xNextWakeTime = xTaskGetTickCount(); 142 | 143 | for( ;; ) 144 | { 145 | /* Place this task in the blocked state until it is time to run again. 146 | The block time is specified in ticks, the constant used converts ticks 147 | to ms. While in the Blocked state this task will not consume any CPU 148 | time. */ 149 | vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS ); 150 | 151 | /* Send to the queue - causing the queue receive task to unblock and 152 | toggle the LED. 0 is used as the block time so the sending operation 153 | will not block - it shouldn't need to block as the queue should always 154 | be empty at this point in the code. */ 155 | xQueueSend( xQueue, &ulValueToSend, 0U ); 156 | } 157 | } 158 | /*-----------------------------------------------------------*/ 159 | void prvQueueReceiveTask( void *pvParameters ) 160 | { 161 | unsigned long ulReceivedValue; 162 | 163 | /* Check the task parameter is as expected. */ 164 | configASSERT( ( ( unsigned long ) pvParameters ) == mainQUEUE_RECEIVE_PARAMETER ); 165 | 166 | for( ;; ) 167 | { 168 | /* Wait until something arrives in the queue - this task will block 169 | indefinitely provided INCLUDE_vTaskSuspend is set to 1 in 170 | FreeRTOSConfig.h. */ 171 | xQueueReceive( xQueue, &ulReceivedValue, portMAX_DELAY ); 172 | 173 | /* To get here something must have been received from the queue, but 174 | is it the expected value? If it is, toggle the LED. */ 175 | if( ulReceivedValue == 100UL ) 176 | { 177 | vMainToggleLED(); 178 | ulReceivedValue = 0U; 179 | } 180 | } 181 | } 182 | 183 | void vApplicationIdleHook( void ) { 184 | uint32_t err_code = sd_app_evt_wait(); 185 | /* 186 | This signals the softdevice handler that we want the CPU to 187 | sleep until an event/interrupt occurs. During this time the 188 | softdevice will do what it needs to do; in our case: send 189 | adverts 190 | */ 191 | APP_ERROR_CHECK(err_code); 192 | } 193 | -------------------------------------------------------------------------------- /src/portable/GCC/NRF51_SD/portmacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | 67 | #ifndef PORTMACRO_H 68 | #define PORTMACRO_H 69 | 70 | #ifdef __cplusplus 71 | extern "C" { 72 | #endif 73 | 74 | /*----------------------------------------------------------- 75 | * Port specific definitions. 76 | * 77 | * The settings in this file configure FreeRTOS correctly for the 78 | * given hardware and compiler. 79 | * 80 | * These settings should not be altered. 81 | *----------------------------------------------------------- 82 | */ 83 | 84 | /* Type definitions. */ 85 | #define portCHAR char 86 | #define portFLOAT float 87 | #define portDOUBLE double 88 | #define portLONG long 89 | #define portSHORT short 90 | #define portSTACK_TYPE uint32_t 91 | #define portBASE_TYPE long 92 | 93 | typedef portSTACK_TYPE StackType_t; 94 | typedef long BaseType_t; 95 | typedef unsigned long UBaseType_t; 96 | 97 | #if( configUSE_16_BIT_TICKS == 1 ) 98 | typedef uint16_t TickType_t; 99 | #define portMAX_DELAY ( TickType_t ) 0xffff 100 | #else 101 | typedef uint32_t TickType_t; 102 | #define portMAX_DELAY ( TickType_t ) 0xffffffffUL 103 | #endif 104 | /*-----------------------------------------------------------*/ 105 | 106 | /* Architecture specifics. */ 107 | #define portSTACK_GROWTH ( -1 ) 108 | #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) 109 | #define portBYTE_ALIGNMENT 8 110 | /*-----------------------------------------------------------*/ 111 | 112 | 113 | /* Scheduler utilities. */ 114 | extern void vPortYield( void ); 115 | #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) 116 | #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) 117 | #define portYIELD() vPortYield() 118 | #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT 119 | #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) 120 | /*-----------------------------------------------------------*/ 121 | 122 | 123 | /* Critical section management. */ 124 | extern void vPortEnterCritical( void ); 125 | extern void vPortExitCritical( void ); 126 | extern uint32_t ulSetInterruptMaskFromISR( void ) __attribute__((naked)); 127 | extern void vClearInterruptMaskFromISR( uint32_t ulMask ) __attribute__((naked)); 128 | 129 | 130 | #define portSET_INTERRUPT_MASK_FROM_ISR() 0 131 | #define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) 132 | //#define portSET_INTERRUPT_MASK_FROM_ISR() ulSetInterruptMaskFromISR() 133 | //#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vClearInterruptMaskFromISR( x ) 134 | #define portDISABLE_INTERRUPTS() 135 | #define portENABLE_INTERRUPTS() 136 | //#define portDISABLE_INTERRUPTS() __asm volatile ( " cpsid i " ) 137 | //#define portENABLE_INTERRUPTS() __asm volatile ( " cpsie i " ) 138 | #define portENTER_CRITICAL() vPortEnterCritical() 139 | #define portEXIT_CRITICAL() vPortExitCritical() 140 | 141 | /*-----------------------------------------------------------*/ 142 | 143 | /* Task function macros as described on the FreeRTOS.org WEB site. */ 144 | #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) 145 | #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters ) 146 | 147 | #define portNOP() 148 | 149 | #ifdef __cplusplus 150 | } 151 | #endif 152 | 153 | #endif /* PORTMACRO_H */ 154 | 155 | -------------------------------------------------------------------------------- /src/portable/MemMang/heap_1.c: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | 67 | /* 68 | * The simplest possible implementation of pvPortMalloc(). Note that this 69 | * implementation does NOT allow allocated memory to be freed again. 70 | * 71 | * See heap_2.c, heap_3.c and heap_4.c for alternative implementations, and the 72 | * memory management pages of http://www.FreeRTOS.org for more information. 73 | */ 74 | #include 75 | 76 | /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining 77 | all the API functions to use the MPU wrappers. That should only be done when 78 | task.h is included from an application file. */ 79 | #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 80 | 81 | #include "FreeRTOS.h" 82 | #include "task.h" 83 | 84 | #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 85 | 86 | /* A few bytes might be lost to byte aligning the heap start address. */ 87 | #define configADJUSTED_HEAP_SIZE ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT ) 88 | 89 | /* Allocate the memory for the heap. */ 90 | static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ]; 91 | static size_t xNextFreeByte = ( size_t ) 0; 92 | 93 | /*-----------------------------------------------------------*/ 94 | 95 | void *pvPortMalloc( size_t xWantedSize ) 96 | { 97 | void *pvReturn = NULL; 98 | static uint8_t *pucAlignedHeap = NULL; 99 | 100 | /* Ensure that blocks are always aligned to the required number of bytes. */ 101 | #if portBYTE_ALIGNMENT != 1 102 | if( xWantedSize & portBYTE_ALIGNMENT_MASK ) 103 | { 104 | /* Byte alignment required. */ 105 | xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 106 | } 107 | #endif 108 | 109 | vTaskSuspendAll(); 110 | { 111 | if( pucAlignedHeap == NULL ) 112 | { 113 | /* Ensure the heap starts on a correctly aligned boundary. */ 114 | pucAlignedHeap = ( uint8_t * ) ( ( ( portPOINTER_SIZE_TYPE ) &ucHeap[ portBYTE_ALIGNMENT ] ) & ( ( portPOINTER_SIZE_TYPE ) ~portBYTE_ALIGNMENT_MASK ) ); 115 | } 116 | 117 | /* Check there is enough room left for the allocation. */ 118 | if( ( ( xNextFreeByte + xWantedSize ) < configADJUSTED_HEAP_SIZE ) && 119 | ( ( xNextFreeByte + xWantedSize ) > xNextFreeByte ) )/* Check for overflow. */ 120 | { 121 | /* Return the next free byte then increment the index past this 122 | block. */ 123 | pvReturn = pucAlignedHeap + xNextFreeByte; 124 | xNextFreeByte += xWantedSize; 125 | } 126 | 127 | traceMALLOC( pvReturn, xWantedSize ); 128 | } 129 | ( void ) xTaskResumeAll(); 130 | 131 | #if( configUSE_MALLOC_FAILED_HOOK == 1 ) 132 | { 133 | if( pvReturn == NULL ) 134 | { 135 | extern void vApplicationMallocFailedHook( void ); 136 | vApplicationMallocFailedHook(); 137 | } 138 | } 139 | #endif 140 | 141 | return pvReturn; 142 | } 143 | /*-----------------------------------------------------------*/ 144 | 145 | void vPortFree( void *pv ) 146 | { 147 | /* Memory cannot be freed using this scheme. See heap_2.c, heap_3.c and 148 | heap_4.c for alternative implementations, and the memory management pages of 149 | http://www.FreeRTOS.org for more information. */ 150 | ( void ) pv; 151 | 152 | /* Force an assert as it is invalid to call this function. */ 153 | configASSERT( pv == NULL ); 154 | } 155 | /*-----------------------------------------------------------*/ 156 | 157 | void vPortInitialiseBlocks( void ) 158 | { 159 | /* Only required when static memory is not cleared. */ 160 | xNextFreeByte = ( size_t ) 0; 161 | } 162 | /*-----------------------------------------------------------*/ 163 | 164 | size_t xPortGetFreeHeapSize( void ) 165 | { 166 | return ( configADJUSTED_HEAP_SIZE - xNextFreeByte ); 167 | } 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /src/portable/MemMang/heap_3.c: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRTOS V8.0.1 - Copyright (C) 2014 Real Time Engineers Ltd. 3 | All rights reserved 4 | 5 | VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. 6 | 7 | *************************************************************************** 8 | * * 9 | * FreeRTOS provides completely free yet professionally developed, * 10 | * robust, strictly quality controlled, supported, and cross * 11 | * platform software that has become a de facto standard. * 12 | * * 13 | * Help yourself get started quickly and support the FreeRTOS * 14 | * project by purchasing a FreeRTOS tutorial book, reference * 15 | * manual, or both from: http://www.FreeRTOS.org/Documentation * 16 | * * 17 | * Thank you! * 18 | * * 19 | *************************************************************************** 20 | 21 | This file is part of the FreeRTOS distribution. 22 | 23 | FreeRTOS is free software; you can redistribute it and/or modify it under 24 | the terms of the GNU General Public License (version 2) as published by the 25 | Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. 26 | 27 | >>! NOTE: The modification to the GPL is included to allow you to !<< 28 | >>! distribute a combined work that includes FreeRTOS without being !<< 29 | >>! obliged to provide the source code for proprietary components !<< 30 | >>! outside of the FreeRTOS kernel. !<< 31 | 32 | FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY 33 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 34 | FOR A PARTICULAR PURPOSE. Full license text is available from the following 35 | link: http://www.freertos.org/a00114.html 36 | 37 | 1 tab == 4 spaces! 38 | 39 | *************************************************************************** 40 | * * 41 | * Having a problem? Start by reading the FAQ "My application does * 42 | * not run, what could be wrong?" * 43 | * * 44 | * http://www.FreeRTOS.org/FAQHelp.html * 45 | * * 46 | *************************************************************************** 47 | 48 | http://www.FreeRTOS.org - Documentation, books, training, latest versions, 49 | license and Real Time Engineers Ltd. contact details. 50 | 51 | http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, 52 | including FreeRTOS+Trace - an indispensable productivity tool, a DOS 53 | compatible FAT file system, and our tiny thread aware UDP/IP stack. 54 | 55 | http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High 56 | Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS 57 | licenses offer ticketed support, indemnification and middleware. 58 | 59 | http://www.SafeRTOS.com - High Integrity Systems also provide a safety 60 | engineered and independently SIL3 certified version for use in safety and 61 | mission critical applications that require provable dependability. 62 | 63 | 1 tab == 4 spaces! 64 | */ 65 | 66 | 67 | /* 68 | * Implementation of pvPortMalloc() and vPortFree() that relies on the 69 | * compilers own malloc() and free() implementations. 70 | * 71 | * This file can only be used if the linker is configured to to generate 72 | * a heap memory area. 73 | * 74 | * See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the 75 | * memory management pages of http://www.FreeRTOS.org for more information. 76 | */ 77 | 78 | #include 79 | 80 | /* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining 81 | all the API functions to use the MPU wrappers. That should only be done when 82 | task.h is included from an application file. */ 83 | #define MPU_WRAPPERS_INCLUDED_FROM_API_FILE 84 | 85 | #include "FreeRTOS.h" 86 | #include "task.h" 87 | 88 | #undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE 89 | 90 | /*-----------------------------------------------------------*/ 91 | 92 | void *pvPortMalloc( size_t xWantedSize ) 93 | { 94 | void *pvReturn; 95 | 96 | vTaskSuspendAll(); 97 | { 98 | pvReturn = malloc( xWantedSize ); 99 | traceMALLOC( pvReturn, xWantedSize ); 100 | } 101 | ( void ) xTaskResumeAll(); 102 | 103 | #if( configUSE_MALLOC_FAILED_HOOK == 1 ) 104 | { 105 | if( pvReturn == NULL ) 106 | { 107 | extern void vApplicationMallocFailedHook( void ); 108 | vApplicationMallocFailedHook(); 109 | } 110 | } 111 | #endif 112 | 113 | return pvReturn; 114 | } 115 | /*-----------------------------------------------------------*/ 116 | 117 | void vPortFree( void *pv ) 118 | { 119 | if( pv ) 120 | { 121 | vTaskSuspendAll(); 122 | { 123 | free( pv ); 124 | traceFREE( pv, 0 ); 125 | } 126 | ( void ) xTaskResumeAll(); 127 | } 128 | } 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /template/Makefile: -------------------------------------------------------------------------------- 1 | TOOLCHAIN_PREFIX ?= arm-none-eabi 2 | 3 | AS = $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-as 4 | CC = $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc 5 | LD = $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gcc 6 | OBJCOPY = $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-objcopy 7 | OBJDUMP = $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-objdump 8 | SIZE = $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-size 9 | GDB = $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-gdb 10 | 11 | START_CODE ?= startup_nrf51.s 12 | SYSTEM_FILE ?= system_nrf51.c 13 | 14 | SDK_INCLUDE_PATH += $(SDK_PATH)Include/ 15 | SDK_SOURCE_PATH += $(SDK_PATH)Source/ 16 | CMSIS_INCLUDE_PATH += $(SDK_PATH)Include/gcc 17 | 18 | LIBRARY_PATHS += ../ $(SDK_INCLUDE_PATH) 19 | LIBRARY_PATHS += $(SDK_INCLUDE_PATH)app_common/ 20 | SOURCE_PATHS += ../ $(SDK_SOURCE_PATH) $(TEMPLATE_PATH) $(wildcard $(SDK_SOURCE_PATH)*/) 21 | 22 | ifeq ($(USE_SOFTDEVICE), s110) 23 | USE_BLE = 1 24 | endif 25 | 26 | ifeq ($(USE_SOFTDEVICE), s120) 27 | USE_BLE = 1 28 | endif 29 | 30 | ifeq ($(USE_SOFTDEVICE), s210) 31 | USE_ANT = 1 32 | endif 33 | 34 | ifeq ($(USE_SOFTDEVICE), s310) 35 | USE_BLE = 1 36 | USE_ANT = 1 37 | endif 38 | 39 | ifdef USE_BLE 40 | LIBRARY_PATHS += $(SDK_INCLUDE_PATH)ble/ 41 | LIBRARY_PATHS += $(SDK_INCLUDE_PATH)ble/ble_services/ 42 | SOURCE_PATHS += $(SDK_SOURCE_PATH)ble/ble_services/ 43 | CFLAGS += -DBLE_STACK_SUPPORT_REQD 44 | endif 45 | 46 | ifdef USE_ANT 47 | CFLAGS += -DANT_STACK_SUPPORT_REQD 48 | endif 49 | 50 | ifdef USE_SOFTDEVICE 51 | LIBRARY_PATHS += $(SDK_INCLUDE_PATH)$(USE_SOFTDEVICE) 52 | LIBRARY_PATHS += $(SDK_INCLUDE_PATH)sd_common/ 53 | else 54 | USE_SOFTDEVICE = blank 55 | endif 56 | 57 | LINKER_SCRIPT ?= gcc_nrf51_$(USE_SOFTDEVICE).ld 58 | OUTPUT_NAME ?= $(addsuffix _$(USE_SOFTDEVICE), $(PROJECT_NAME)) 59 | 60 | ifdef USE_EXT_SENSORS 61 | LIBRARY_PATHS += $(SDK_INCLUDE_PATH)ext_sensors/ 62 | SOURCE_PATHS += $(wildcard $(SDK_SOURCE_PATH)ext_sensors/*/) 63 | endif 64 | 65 | LIBRARY_INCLUDES = $(addprefix -I,$(LIBRARY_PATHS)) 66 | CMSIS_INCLUDE = $(addprefix -I,$(CMSIS_INCLUDE_PATH)) 67 | 68 | VPATH = $(SOURCE_PATHS) 69 | 70 | OUTPUT_PATH = _build/ 71 | 72 | CPUFLAGS = -mthumb -mcpu=cortex-m0 -march=armv6-m 73 | ifdef BOARD 74 | CFLAGS += -D$(BOARD) 75 | endif 76 | CFLAGS += -std=gnu99 -c $(CPUFLAGS) -Wall -D$(DEVICE) $(CMSIS_INCLUDE) $(LIBRARY_INCLUDES) -MD 77 | LDFLAGS += $(CPUFLAGS) -L $(TEMPLATE_PATH) -T $(LINKER_SCRIPT) -Wl,-Map=$(OUTPUT_PATH)$(OUTPUT_NAME).Map 78 | 79 | HEX = $(OUTPUT_PATH)$(OUTPUT_NAME).hex 80 | ELF = $(OUTPUT_PATH)$(OUTPUT_NAME).elf 81 | BIN = $(OUTPUT_PATH)$(OUTPUT_NAME).bin 82 | 83 | SRCS = $(SYSTEM_FILE) $(notdir $(APPLICATION_SRCS)) 84 | OBJS = $(addprefix $(OUTPUT_PATH), $(SRCS:.c=.o)) $(addprefix $(LIBS_PATH),$(APPLICATION_LIBS)) 85 | DEPS = $(addprefix $(OUTPUT_PATH), $(SRCS:.c=.d)) 86 | SRCS_AS = $(START_CODE) 87 | OBJS_AS = $(addprefix $(OUTPUT_PATH), $(SRCS_AS:.s=.os)) 88 | 89 | JLINK_OPTIONS = -device nrf51822 -if swd -speed 1000 90 | 91 | all: $(OBJS) $(OBJS_AS) $(HEX) 92 | 93 | rebuild: clean all 94 | 95 | ifeq ($(OS),Windows_NT) 96 | include $(TEMPLATE_PATH)Makefile.windows 97 | else 98 | include $(TEMPLATE_PATH)Makefile.posix 99 | endif 100 | 101 | $(HEX): $(OBJS) $(OBJS_AS) 102 | $(LD) $(LDFLAGS) $(OBJS_AS) $(OBJS) -o $(ELF) 103 | $(OBJCOPY) -Oihex $(ELF) $(HEX) 104 | $(OBJCOPY) -Obinary $(ELF) $(BIN) 105 | $(SIZE) $(ELF) 106 | 107 | size: $(ELF) 108 | $(SIZE) $(ELF) 109 | 110 | $(OUTPUT_PATH)%.o: %.c 111 | $(MAKE_BUILD_FOLDER) 112 | $(CC) $(LDFLAGS) $(CFLAGS) $< -o $@ 113 | 114 | $(OUTPUT_PATH)%.os: %.s 115 | $(MAKE_BUILD_FOLDER) 116 | $(AS) $< -o $@ 117 | 118 | -include $(DEPS) 119 | 120 | .PHONY: all clean rebuild size 121 | -------------------------------------------------------------------------------- /template/Makefile.posix: -------------------------------------------------------------------------------- 1 | # Set toolchain path if arm-none-eabi- binaries are not in user path 2 | # TOOLCHAIN_PATH ?= 3 | TERMINAL ?= gnome-terminal -e 4 | 5 | FLASH_START_ADDRESS = $(shell $(OBJDUMP) -h $(ELF) -j .text | grep .text | awk '{print $$4}') 6 | 7 | ifdef SEGGER_SERIAL 8 | JLINKEXE_OPTION = -SelectEmuBySn $(SEGGER_SERIAL) 9 | JLINKGDBSERVER_OPTION = -select USB=$(SEGGER_SERIAL) 10 | endif 11 | 12 | MAKE_BUILD_FOLDER = mkdir -p $(OUTPUT_PATH) 13 | 14 | JLINKEXE = /opt/JLink/JLinkExe 15 | JLINK = $(JLINKEXE) $(JLINK_OPTIONS) $(JLINKEXE_OPTION) 16 | JLINKGDBSERVER = JLinkGDBServer $(JLINK_OPTIONS) $(JLINKGDBSERVER_OPTION) 17 | 18 | SOFTDEVICE_OUTPUT = $(OUTPUT_PATH)$(notdir $(SOFTDEVICE)) 19 | 20 | clean: 21 | rm -rf $(OUTPUT_PATH) 22 | rm -f *.jlink 23 | rm -f JLink.log 24 | rm -f .gdbinit 25 | 26 | flash: all flash.jlink 27 | $(JLINK) flash.jlink 28 | 29 | flash.jlink: 30 | printf "r\nloadbin $(BIN) $(FLASH_START_ADDRESS)\nr\ng\nexit\n" > flash.jlink 31 | 32 | flash-softdevice: flash-softdevice.jlink 33 | ifndef SOFTDEVICE 34 | $(error "You need to set the SOFTDEVICE command-line parameter to a path (without spaces) to the softdevice hex-file") 35 | endif 36 | 37 | # Convert from hex to binary. Split original hex in two to avoid huge (>250 MB) binary file with just 0s. 38 | $(OBJCOPY) -Iihex -Obinary --remove-section .sec3 $(SOFTDEVICE) $(SOFTDEVICE_OUTPUT:.hex=_mainpart.bin) 39 | $(OBJCOPY) -Iihex -Obinary --remove-section .sec1 --remove-section .sec2 $(SOFTDEVICE) $(SOFTDEVICE_OUTPUT:.hex=_uicr.bin) 40 | $(JLINK) flash-softdevice.jlink 41 | 42 | flash-softdevice.jlink: 43 | # Write to NVMC to enable write. Write mainpart, write UICR. Assumes device is erased. 44 | printf "w4 4001e504 1\nloadbin \"$(SOFTDEVICE_OUTPUT:.hex=_mainpart.bin)\" 0\nloadbin \"$(SOFTDEVICE_OUTPUT:.hex=_uicr.bin)\" 0x10001000\nr\ng\nexit\n" > flash-softdevice.jlink 45 | 46 | recover: recover.jlink erase-all.jlink pin-reset.jlink 47 | $(JLINK) recover.jlink 48 | $(JLINK) erase-all.jlink 49 | $(JLINK) pin-reset.jlink 50 | 51 | recover.jlink: 52 | printf "si 0\nt0\nsleep 1\ntck1\nsleep 1\nt1\nsleep 2\nt0\nsleep 2\nt1\nsleep 2\nt0\nsleep 2\nt1\nsleep 2\nt0\nsleep 2\nt1\nsleep 2\nt0\nsleep 2\nt1\nsleep 2\nt0\nsleep 2\nt1\nsleep 2\nt0\nsleep 2\nt1\nsleep 2\ntck0\nsleep 100\nsi 1\nr\nexit\n" > recover.jlink 53 | 54 | pin-reset.jlink: 55 | printf "w4 40000544 1\nr\nexit\n" > pin-reset.jlink 56 | 57 | pin-reset: pin-reset.jlink 58 | $(JLINK) pin-reset.jlink 59 | 60 | reset: reset.jlink 61 | $(JLINK) reset.jlink 62 | 63 | reset.jlink: 64 | printf "r\ng\nexit\n" > reset.jlink 65 | 66 | erase-all: erase-all.jlink 67 | $(JLINK) erase-all.jlink 68 | 69 | erase-all.jlink: 70 | # Write to NVMC to enable erase, do erase all, wait for completion. reset 71 | printf "w4 4001e504 2\nw4 4001e50c 1\nsleep 100\nr\nexit\n" > erase-all.jlink 72 | 73 | startdebug: debug-gdbinit 74 | $(TERMINAL) "$(JLINKGDBSERVER) -port $(GDB_PORT_NUMBER)" 75 | sleep 1 76 | $(TERMINAL) "$(GDB) $(ELF)" 77 | 78 | debug-gdbinit: 79 | printf "target remote localhost:$(GDB_PORT_NUMBER)\nbreak main\n" > .gdbinit 80 | 81 | .PHONY: flash flash-softdevice erase-all startdebug 82 | -------------------------------------------------------------------------------- /template/Makefile.windows: -------------------------------------------------------------------------------- 1 | TOOLCHAIN_PATH = "c:\Program Files (x86)\GNU Tools ARM Embedded\4.8 2013q4\bin\" 2 | JLINK_PATH = "C:\Program Files (x86)\SEGGER\JLinkARM_V480\" 3 | 4 | MAKE_BUILD_FOLDER = if not exist $(OUTPUT_PATH:/=\\) mkdir $(OUTPUT_PATH:/=\\) 5 | 6 | # Make GDB server die after one run. 7 | JLINKGDBSERVER_OPTION = -s 8 | 9 | ifdef SEGGER_SERIAL 10 | NRFJPROG_OPTIONS = --snr $(SEGGER_SERIAL) 11 | JLINKGDBSERVER_OPTION += -select USB=$(SEGGER_SERIAL) 12 | endif 13 | 14 | NRFJPROG = nrfjprog $(NRFJPROG_OPTIONS) 15 | 16 | clean: 17 | if exist .\$(OUTPUT_PATH:/=\\) rmdir /Q /S $(OUTPUT_PATH:/=) 18 | if exist *.jlink del /q *.jlink 19 | if exist JLink.log del /q JLink.log 20 | if exist .gdbinit del /q .gdbinit 21 | 22 | $(OUTPUT_PATH): 23 | if not exist .\$(OUTPUT_PATH:/=\\) md $(OUTPUT_PATH) 24 | 25 | flash: 26 | $(NRFJPROG) --program $(HEX) -r 27 | 28 | flash-softdevice: 29 | ifndef SOFTDEVICE 30 | $(error "You need to set the SOFTDEVICE command-line parameter to a path (without spaces) to the softdevice hex-file") 31 | endif 32 | $(NRFJPROG) -e --programs "$(SOFTDEVICE)" 33 | 34 | recover: 35 | $(NRFJPROG) --recover 36 | 37 | pin-reset: 38 | $(NRFJPROG) --pinreset 39 | 40 | reset: 41 | $(NRFJPROG) --reset 42 | 43 | startdebug: debug-gdbinit 44 | start /D $(JLINK_PATH) JLinkGDBServer $(JLINKGDBSERVER_OPTION) $(JLINK_OPTIONS) -port $(GDB_PORT_NUMBER) 45 | timeout /t 1 46 | $(GDB) $(ELF) -x gdbinit 47 | 48 | debug-gdbinit: 49 | @(echo target remote localhost:$(GDB_PORT_NUMBER) & echo break main) > gdbinit 50 | 51 | .PHONY: clean flash startdebug debug-gdbinit 52 | -------------------------------------------------------------------------------- /template/gcc_nrf51_blank.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x40000 /* 256k */ 5 | RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000 /* 16k */ 6 | } 7 | INCLUDE "gcc_nrf51_common.ld" 8 | -------------------------------------------------------------------------------- /template/gcc_nrf51_common.ld: -------------------------------------------------------------------------------- 1 | /* Library configurations */ 2 | GROUP(libgcc.a libc.a libm.a libnosys.a) 3 | 4 | /* Linker script to place sections and symbol values. Should be used together 5 | * with other linker script that defines memory regions FLASH and RAM. 6 | * It references following symbols, which must be defined in code: 7 | * Reset_Handler : Entry of reset handler 8 | * 9 | * It defines following symbols, which code can use without definition: 10 | * __exidx_start 11 | * __exidx_end 12 | * __etext 13 | * __data_start__ 14 | * __preinit_array_start 15 | * __preinit_array_end 16 | * __init_array_start 17 | * __init_array_end 18 | * __fini_array_start 19 | * __fini_array_end 20 | * __data_end__ 21 | * __bss_start__ 22 | * __bss_end__ 23 | * __end__ 24 | * end 25 | * __HeapLimit 26 | * __StackLimit 27 | * __StackTop 28 | * __stack 29 | */ 30 | ENTRY(Reset_Handler) 31 | 32 | SECTIONS 33 | { 34 | .text : 35 | { 36 | KEEP(*(.isr_vector)) 37 | *(.text*) 38 | 39 | KEEP(*(.init)) 40 | KEEP(*(.fini)) 41 | 42 | /* .ctors */ 43 | *crtbegin.o(.ctors) 44 | *crtbegin?.o(.ctors) 45 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) 46 | *(SORT(.ctors.*)) 47 | *(.ctors) 48 | 49 | /* .dtors */ 50 | *crtbegin.o(.dtors) 51 | *crtbegin?.o(.dtors) 52 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) 53 | *(SORT(.dtors.*)) 54 | *(.dtors) 55 | 56 | *(.rodata*) 57 | 58 | KEEP(*(.eh_frame*)) 59 | } > FLASH 60 | 61 | .ARM.extab : 62 | { 63 | *(.ARM.extab* .gnu.linkonce.armextab.*) 64 | } > FLASH 65 | 66 | __exidx_start = .; 67 | .ARM.exidx : 68 | { 69 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) 70 | } > FLASH 71 | __exidx_end = .; 72 | 73 | __etext = .; 74 | 75 | .data : AT (__etext) 76 | { 77 | __data_start__ = .; 78 | *(vtable) 79 | *(.data*) 80 | 81 | . = ALIGN(4); 82 | /* preinit data */ 83 | PROVIDE (__preinit_array_start = .); 84 | *(.preinit_array) 85 | PROVIDE (__preinit_array_end = .); 86 | 87 | . = ALIGN(4); 88 | /* init data */ 89 | PROVIDE (__init_array_start = .); 90 | *(SORT(.init_array.*)) 91 | *(.init_array) 92 | PROVIDE (__init_array_end = .); 93 | 94 | 95 | . = ALIGN(4); 96 | /* finit data */ 97 | PROVIDE (__fini_array_start = .); 98 | *(SORT(.fini_array.*)) 99 | *(.fini_array) 100 | PROVIDE (__fini_array_end = .); 101 | 102 | . = ALIGN(4); 103 | /* All data end */ 104 | __data_end__ = .; 105 | 106 | } > RAM 107 | 108 | .bss : 109 | { 110 | __bss_start__ = .; 111 | *(.bss*) 112 | *(COMMON) 113 | __bss_end__ = .; 114 | } > RAM 115 | 116 | .heap : 117 | { 118 | __end__ = .; 119 | end = __end__; 120 | *(.heap*) 121 | __HeapLimit = .; 122 | } > RAM 123 | 124 | /* .stack_dummy section doesn't contains any symbols. It is only 125 | * used for linker to calculate size of stack sections, and assign 126 | * values to stack symbols later */ 127 | .stack_dummy : 128 | { 129 | *(.stack) 130 | } > RAM 131 | 132 | /* Set stack top to end of RAM, and stack limit move down by 133 | * size of stack_dummy section */ 134 | __StackTop = ORIGIN(RAM) + LENGTH(RAM); 135 | __StackLimit = __StackTop - SIZEOF(.stack_dummy); 136 | PROVIDE(__stack = __StackTop); 137 | 138 | /* Check if data + heap + stack exceeds RAM limit */ 139 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") 140 | } 141 | -------------------------------------------------------------------------------- /template/gcc_nrf51_s110.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x14000, LENGTH = 0x2C000 /* 80 kB is taken by S110, 176 kB for app. */ 5 | RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 /* 8 kB is taken by S110,8 kB for app. */ 6 | } 7 | INCLUDE "gcc_nrf51_common.ld" 8 | -------------------------------------------------------------------------------- /template/gcc_nrf51_s120.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x18000, LENGTH = 0x27000 /* 96 kB is taken by S120, 160 kB for app. */ 5 | RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0x1800 /* 10 kB is taken by S120, 6 kB for app. */ 6 | } 7 | INCLUDE "gcc_nrf51_common.ld" 8 | -------------------------------------------------------------------------------- /template/gcc_nrf51_s210.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0xC000, LENGTH = 0x34000 /* 48 kB is taken by S210, 80 kB for app. */ 5 | RAM (rwx) : ORIGIN = 0x20000900, LENGTH = 0x3700 /* 2.25 kB is taken by S210, 13.75 kB for app. */ 6 | } 7 | INCLUDE "gcc_nrf51_common.ld" 8 | -------------------------------------------------------------------------------- /template/gcc_nrf51_s310.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x20000, LENGTH = 0x20000 /* 128 kB is taken by S310, 128 kB for app. */ 5 | RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0x1800 /* 10 kB is taken by S310, 6 kB for app. */ 6 | } 7 | INCLUDE "gcc_nrf51_common.ld" 8 | -------------------------------------------------------------------------------- /template/startup_nrf51.s: -------------------------------------------------------------------------------- 1 | /* File: startup_ARMCM0.S 2 | * Purpose: startup file for Cortex-M0 devices. Should use with 3 | * GCC for ARM Embedded Processors 4 | * Version: V1.2 5 | * Date: 15 Nov 2011 6 | * 7 | * Copyright (c) 2011, ARM Limited 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions are met: 12 | * Redistributions of source code must retain the above copyright 13 | notice, this list of conditions and the following disclaimer. 14 | * Redistributions in binary form must reproduce the above copyright 15 | notice, this list of conditions and the following disclaimer in the 16 | documentation and/or other materials provided with the distribution. 17 | * Neither the name of the ARM Limited nor the 18 | names of its contributors may be used to endorse or promote products 19 | derived from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 23 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY 25 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 26 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 28 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | .syntax unified 33 | .arch armv6-m 34 | 35 | .section .stack 36 | .align 3 37 | #ifdef __STACK_SIZE 38 | .equ Stack_Size, __STACK_SIZE 39 | #else 40 | .equ Stack_Size, 0x600 41 | #endif 42 | .globl __StackTop 43 | .globl __StackLimit 44 | __StackLimit: 45 | .space Stack_Size 46 | .size __StackLimit, . - __StackLimit 47 | __StackTop: 48 | .size __StackTop, . - __StackTop 49 | 50 | .section .heap 51 | .align 3 52 | #ifdef __HEAP_SIZE 53 | .equ Heap_Size, __HEAP_SIZE 54 | #else 55 | .equ Heap_Size, 0x0 56 | #endif 57 | .globl __HeapBase 58 | .globl __HeapLimit 59 | __HeapBase: 60 | .space Heap_Size 61 | .size __HeapBase, . - __HeapBase 62 | __HeapLimit: 63 | .size __HeapLimit, . - __HeapLimit 64 | 65 | .section .isr_vector 66 | .align 2 67 | .globl __Vectors 68 | __Vectors: 69 | .long __StackTop /* Top of Stack */ 70 | .long Reset_Handler /* Reset Handler */ 71 | .long NMI_Handler /* NMI Handler */ 72 | .long HardFault_Handler /* Hard Fault Handler */ 73 | .long 0 /* Reserved */ 74 | .long 0 /* Reserved */ 75 | .long 0 /* Reserved */ 76 | .long 0 /* Reserved */ 77 | .long 0 /* Reserved */ 78 | .long 0 /* Reserved */ 79 | .long 0 /* Reserved */ 80 | .long SVC_Handler /* SVCall Handler */ 81 | .long 0 /* Reserved */ 82 | .long 0 /* Reserved */ 83 | .long PendSV_Handler /* PendSV Handler */ 84 | .long SysTick_Handler /* SysTick Handler */ 85 | 86 | /* External interrupts */ 87 | .long POWER_CLOCK_IRQHandler /* POWER_CLOCK */ 88 | .long RADIO_IRQHandler /* RADIO */ 89 | .long UART0_IRQHandler /* UART0 */ 90 | .long SPI0_TWI0_IRQHandler /* SPI0_TWI0 */ 91 | .long SPI1_TWI1_IRQHandler /* SPI1_TWI1 */ 92 | .long 0 /* Reserved */ 93 | .long GPIOTE_IRQHandler /* GPIOTE */ 94 | .long ADC_IRQHandler /* ADC */ 95 | .long TIMER0_IRQHandler /* TIMER0 */ 96 | .long TIMER1_IRQHandler /* TIMER1 */ 97 | .long TIMER2_IRQHandler /* TIMER2 */ 98 | .long RTC0_IRQHandler /* RTC0 */ 99 | .long TEMP_IRQHandler /* TEMP */ 100 | .long RNG_IRQHandler /* RNG */ 101 | .long ECB_IRQHandler /* ECB */ 102 | .long CCM_AAR_IRQHandler /* CCM_AAR */ 103 | .long WDT_IRQHandler /* WDT */ 104 | .long RTC1_IRQHandler /* RTC1 */ 105 | .long QDEC_IRQHandler /* QDEC */ 106 | .long 0 /* Reserved */ 107 | .long SWI0_IRQHandler /* SWI0 */ 108 | .long SWI1_IRQHandler /* SWI1 */ 109 | .long SWI2_IRQHandler /* SWI2 */ 110 | .long SWI3_IRQHandler /* SWI3 */ 111 | .long SWI4_IRQHandler /* SWI4 */ 112 | .long SWI5_IRQHandler /* SWI5 */ 113 | .long 0 /* Reserved */ 114 | .long 0 /* Reserved */ 115 | .long 0 /* Reserved */ 116 | .long 0 /* Reserved */ 117 | .long 0 /* Reserved */ 118 | .long 0 /* Reserved */ 119 | 120 | .size __Vectors, . - __Vectors 121 | 122 | .text 123 | .thumb 124 | .thumb_func 125 | .align 2 126 | .globl Reset_Handler 127 | .type Reset_Handler, %function 128 | Reset_Handler: 129 | .equ NRF_POWER_RAMON_ADDRESS, 0x40000524 130 | .equ NRF_POWER_RAMON_RAM1ON_ONMODE_Msk, 0x3 131 | ldr r0, =NRF_POWER_RAMON_ADDRESS 132 | ldr r2, [r0] 133 | movs r1, #NRF_POWER_RAMON_RAM1ON_ONMODE_Msk 134 | orrs r2, r1 135 | str r2, [r0] 136 | 137 | /* Loop to copy data from read only memory to RAM. The ranges 138 | * of copy from/to are specified by following symbols evaluated in 139 | * linker script. 140 | * __etext: End of code section, i.e., begin of data sections to copy from. 141 | * __data_start__/__data_end__: RAM address range that data should be 142 | * copied to. Both must be aligned to 4 bytes boundary. */ 143 | ldr r1, =__etext 144 | ldr r2, =__data_start__ 145 | ldr r3, =__data_end__ 146 | 147 | subs r3, r2 148 | ble .flash_to_ram_loop_end 149 | 150 | movs r4, 0 151 | .flash_to_ram_loop: 152 | ldr r0, [r1,r4] 153 | str r0, [r2,r4] 154 | adds r4, 4 155 | cmp r4, r3 156 | blt .flash_to_ram_loop 157 | .flash_to_ram_loop_end: 158 | ldr r0, =SystemInit 159 | blx r0 160 | ldr r0, =_start 161 | bx r0 162 | .pool 163 | .size Reset_Handler, . - Reset_Handler 164 | 165 | /* Macro to define default handlers. Default handler 166 | * will be weak symbol and just dead loops. They can be 167 | * overwritten by other handlers */ 168 | .macro def_default_handler handler_name 169 | .align 1 170 | .thumb_func 171 | .weak \handler_name 172 | .type \handler_name, %function 173 | \handler_name : 174 | b . 175 | .size \handler_name, . - \handler_name 176 | .endm 177 | 178 | def_default_handler NMI_Handler 179 | def_default_handler HardFault_Handler 180 | def_default_handler SVC_Handler 181 | def_default_handler PendSV_Handler 182 | def_default_handler SysTick_Handler 183 | def_default_handler Default_Handler 184 | def_default_handler POWER_CLOCK_IRQHandler 185 | def_default_handler RADIO_IRQHandler 186 | def_default_handler UART0_IRQHandler 187 | def_default_handler SPI0_TWI0_IRQHandler 188 | def_default_handler SPI1_TWI1_IRQHandler 189 | def_default_handler GPIOTE_IRQHandler 190 | def_default_handler ADC_IRQHandler 191 | def_default_handler TIMER0_IRQHandler 192 | def_default_handler TIMER1_IRQHandler 193 | def_default_handler TIMER2_IRQHandler 194 | def_default_handler RTC0_IRQHandler 195 | def_default_handler TEMP_IRQHandler 196 | def_default_handler RNG_IRQHandler 197 | def_default_handler ECB_IRQHandler 198 | def_default_handler CCM_AAR_IRQHandler 199 | def_default_handler WDT_IRQHandler 200 | def_default_handler RTC1_IRQHandler 201 | def_default_handler QDEC_IRQHandler 202 | def_default_handler SWI0_IRQHandler 203 | def_default_handler SWI1_IRQHandler 204 | def_default_handler SWI2_IRQHandler 205 | def_default_handler SWI3_IRQHandler 206 | def_default_handler SWI4_IRQHandler 207 | def_default_handler SWI5_IRQHandler 208 | 209 | .weak DEF_IRQHandler 210 | .set DEF_IRQHandler, Default_Handler 211 | 212 | .end 213 | --------------------------------------------------------------------------------