Difference between revisions of "FreeRTOS"
m (→^ FreeRTOS Architecture) |
m (→^ FreeRTOS Architecture: - FreeRTOS AVR context switch example, systick based ISR.) |
||
(24 intermediate revisions by the same user not shown) | |||
Line 46: | Line 46: | ||
* https://www.freertos.org/a00090.html . . . FreeRTOS ports, each its own web page, | * https://www.freertos.org/a00090.html . . . FreeRTOS ports, each its own web page, | ||
+ | - 2018-05-11 FRI - | ||
+ | Quick-start page and configAssert(): | ||
+ | |||
+ | * https://www.freertos.org/a00110.html#configASSERT | ||
Line 58: | Line 62: | ||
* https://www.freertos.org/a00090.html | * https://www.freertos.org/a00090.html | ||
− | + | * https://www.freertos.org/FreeRTOS-for-Cortex-M0-LPC1114-LPCXpresso.html NXP LPC1114 ARM Cortex-M0 Demo | |
+ | * https://www.freertos.org/FreeRTOS-for-STM32F4xx-Cortex-M4F-IAR.html | ||
Line 73: | Line 78: | ||
** http://socialledge.com/sjsu/index.php/Main_Page | ** http://socialledge.com/sjsu/index.php/Main_Page | ||
** http://socialledge.com/sjsu/images/d/de/2012SJOneBoardSchematic.pdf | ** http://socialledge.com/sjsu/images/d/de/2012SJOneBoardSchematic.pdf | ||
+ | |||
+ | * https://www.freertos.org/FreeRTOS-Plus/BSP_Solutions/ST/index.html | ||
+ | ** https://www.freertos.org/FreeRTOS-Plus/BSP_Solutions/ST/STM32Cube.html#examples | ||
+ | |||
+ | * https://www.freertos.org/FreeRTOS_Support_Forum_Archive/April_2010/freertos_STM32F10X-128k-Eval_freeRTOS_V6.0.4_OK_3669009.html | ||
+ | * https://github.com/atgreen/FreeRTOS/tree/master/Demo/CORTEX_STM32F100_Atollic | ||
+ | |||
+ | |||
+ | <!-- # # # Trouble-shooting Related Notes Follow # # # | ||
+ | # # # Trouble-shooting Related Notes Follow # # # --> | ||
+ | # # # Trouble-shooting Related Notes Follow # # # | ||
+ | |||
Line 78: | Line 95: | ||
== [[#top|^]] FreeRTOS Architecture == | == [[#top|^]] FreeRTOS Architecture == | ||
+ | |||
+ | Context switchting, how context switched between tasks in FreeRTOS . . . | ||
+ | |||
+ | * https://www.freertos.org/implementation/a00003.html | ||
+ | * https://www.freertos.org/implementation/a00011.html | ||
Task Control Block (TCB) memory allocation . . . | Task Control Block (TCB) memory allocation . . . | ||
* https://www.freertos.org/FreeRTOS_Support_Forum_Archive/January_2018/freertos_Task_control_block_memory_allocation_55c3c1a5j.html | * https://www.freertos.org/FreeRTOS_Support_Forum_Archive/January_2018/freertos_Task_control_block_memory_allocation_55c3c1a5j.html | ||
+ | |||
+ | Task priorities assignable defined in tasks.h: | ||
+ | |||
+ | <pre> | ||
+ | ~/Downloads/freertos/FreeRTOSv10.0.1/FreeRTOS/Source$ grep -nr tskIDLE_PRIORITY ./* | ||
+ | ./include/task.h:154:#define tskIDLE_PRIORITY ( ( UBaseType_t ) 0U ) | ||
+ | ./include/task.h:307: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, &ucParameterToPass, tskIDLE_PRIORITY, &xHandle ); | ||
+ | ./include/task.h:423: tskIDLE_PRIORITY,// Priority at which the task is created. | ||
+ | ./include/task.h:688: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); | ||
+ | ./include/task.h:856: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); | ||
+ | ./include/task.h:861: // It was created with tskIDLE_PRIORITY, but may have changed | ||
+ | ./include/task.h:863: if( uxTaskPriorityGet( xHandle ) != tskIDLE_PRIORITY ) | ||
+ | ./include/task.h:988: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); | ||
+ | ./include/task.h:993: vTaskPrioritySet( xHandle, tskIDLE_PRIORITY + 1 ); | ||
+ | ./include/task.h:998: vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); | ||
+ | ./include/task.h:1030: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); | ||
+ | ./include/task.h:1079: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); | ||
+ | ./include/task.h:1154: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); | ||
+ | ./include/task.h:1208: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); | ||
+ | ./queue.c:2031: uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY; | ||
+ | </pre> | ||
Line 88: | Line 131: | ||
== [[#top|^]] Task Control Block - TCB == | == [[#top|^]] Task Control Block - TCB == | ||
− | Exploring the Task Control Block and stack implementations of FreeRTOS . . . | + | Exploring the Task Control Block and stack implementations of FreeRTOS. Following forum post mentions stack checking as a feature of FreeRTOS 7.1 which can be enabled. This post also mentions interrupt priorities which range from 1 to 15: |
+ | |||
+ | * https://www.freertos.org/FreeRTOS_Support_Forum_Archive/December_2012/freertos_pxCurrentTCB_corrupted_6477695.html | ||
+ | |||
+ | |||
+ | <!-- comment --> | ||
+ | |||
+ | == [[#top|^]] Memory Management and Heap == | ||
+ | |||
+ | https://stackoverflow.com/questions/58746081/how-do-i-select-a-memory-allocation-implementation-heap-c-file-in-freertos | ||
+ | |||
+ | |||
+ | <!-- comment --> | ||
+ | |||
+ | == [[#top|^]] Software Timers == | ||
+ | |||
+ | <ul> | ||
+ | * https://www.freertos.org/RTOS-software-timer.html | ||
+ | * https://mcuoneclipse.com/2018/05/27/tutorial-understanding-and-using-freertos-software-timers/ | ||
+ | </ul> | ||
+ | |||
+ | Useful forum post regarding xTaskGetTickCount(): | ||
+ | 2020-07-20 | ||
+ | * https://www.freertos.org/FreeRTOS_Support_Forum_Archive/September_2018/freertos_Measure_Time_within_a_Task_with_xTaskGetTickCount_6d2307a0j.html | ||
Line 95: | Line 161: | ||
== [[#top|^]] References == | == [[#top|^]] References == | ||
− | * ... | + | * https://www.freertos.org/History.txt . . . change history in text format gives a list of FreeRTOS stable releases |
* https://www.freertos.org/a00104.html . . . source code download instructions | * https://www.freertos.org/a00104.html . . . source code download instructions | ||
+ | 2018-06-08 - Friday | ||
+ | * http://www.aosabook.org/en/freertos.html | ||
Line 107: | Line 175: | ||
− | <!-- | + | <!-- EOF --> |
Latest revision as of 18:14, 19 September 2022
Wiki Main Page | User Page of Ted | Google search engine
FreeRTOS notes
operating system used and recommended by Neil M.
2017-12-08
Contents
Overview
Ted starting a wiki page to hold notes and findings from working through demos and tutorials on FreeRTOS operating system. First goals include:
- Learning what target CPUs, dev boards and systems run FreeRTOS
- Learning what emulators run and support testing of FreeRTOS instances
^ First Topics Explored
RTOS fundamentals covered in pages of FreeRTOS site:
These initial links will likely be moved or removed, they're just first places Ted checked out at FreeRTOS site:
- 2017-12-27 WED -
FreeRTOS demo applications described in overview fashion at https://www.freertos.org/a00102.html.
- https://www.freertos.org/a00017.html . . . source code organization,
- https://www.freertos.org/a00090.html . . . FreeRTOS ports, each its own web page,
- 2018-05-11 FRI - Quick-start page and configAssert():
^ FreeRTOS Ported To Microcontroller Families
- 2017-12-15 FRI -
FreeRTOS ports to various microcontroller families:
- https://www.freertos.org/a00090.html
- https://www.freertos.org/FreeRTOS-for-Cortex-M0-LPC1114-LPCXpresso.html NXP LPC1114 ARM Cortex-M0 Demo
- https://www.freertos.org/FreeRTOS-for-STM32F4xx-Cortex-M4F-IAR.html
^ Specific Boards Usable with FreeRTOS
2018-04-10
Singleton Pattern mentioned in section named "Basics" in the following wiki document about San Jose State University LPC1758 dev board:
- https://www.freertos.org/FreeRTOS_Support_Forum_Archive/April_2010/freertos_STM32F10X-128k-Eval_freeRTOS_V6.0.4_OK_3669009.html
- https://github.com/atgreen/FreeRTOS/tree/master/Demo/CORTEX_STM32F100_Atollic
# # # Trouble-shooting Related Notes Follow # # #
^ FreeRTOS Architecture
Context switchting, how context switched between tasks in FreeRTOS . . .
- https://www.freertos.org/implementation/a00003.html
- https://www.freertos.org/implementation/a00011.html
Task Control Block (TCB) memory allocation . . .
Task priorities assignable defined in tasks.h:
~/Downloads/freertos/FreeRTOSv10.0.1/FreeRTOS/Source$ grep -nr tskIDLE_PRIORITY ./* ./include/task.h:154:#define tskIDLE_PRIORITY ( ( UBaseType_t ) 0U ) ./include/task.h:307: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, &ucParameterToPass, tskIDLE_PRIORITY, &xHandle ); ./include/task.h:423: tskIDLE_PRIORITY,// Priority at which the task is created. ./include/task.h:688: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); ./include/task.h:856: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); ./include/task.h:861: // It was created with tskIDLE_PRIORITY, but may have changed ./include/task.h:863: if( uxTaskPriorityGet( xHandle ) != tskIDLE_PRIORITY ) ./include/task.h:988: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); ./include/task.h:993: vTaskPrioritySet( xHandle, tskIDLE_PRIORITY + 1 ); ./include/task.h:998: vTaskPrioritySet( NULL, tskIDLE_PRIORITY + 1 ); ./include/task.h:1030: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); ./include/task.h:1079: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, &xHandle ); ./include/task.h:1154: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); ./include/task.h:1208: xTaskCreate( vTaskCode, "NAME", STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL ); ./queue.c:2031: uxHighestPriorityOfWaitingTasks = tskIDLE_PRIORITY;
^ Task Control Block - TCB
Exploring the Task Control Block and stack implementations of FreeRTOS. Following forum post mentions stack checking as a feature of FreeRTOS 7.1 which can be enabled. This post also mentions interrupt priorities which range from 1 to 15:
^ Memory Management and Heap
^ Software Timers
Useful forum post regarding xTaskGetTickCount(): 2020-07-20
^ References
- https://www.freertos.org/History.txt . . . change history in text format gives a list of FreeRTOS stable releases
- https://www.freertos.org/a00104.html . . . source code download instructions
2018-06-08 - Friday