From 917a4a145d45e4fcb103411cf2cf4b645dba3c91 Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 12:26:50 +0530 Subject: [PATCH 01/10] fix build on 64 bit platform --- portable/template/portmacro.h | 3 +++ sample_configuration/FreeRTOSConfig.h | 25 ++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/portable/template/portmacro.h b/portable/template/portmacro.h index 96b400c15e..5e695e7503 100644 --- a/portable/template/portmacro.h +++ b/portable/template/portmacro.h @@ -38,6 +38,9 @@ typedef unsigned char UBaseType_t; #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS ) typedef uint32_t TickType_t; #define portMAX_DELAY ( TickType_t ) 0xffffffffUL +#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS ) + typedef uint64_t TickType_t; + #define portMAX_DELAY ( TickType_t ) 0xffffffffffffffffULL #else #error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width. #endif diff --git a/sample_configuration/FreeRTOSConfig.h b/sample_configuration/FreeRTOSConfig.h index 43282118f1..106648bff2 100644 --- a/sample_configuration/FreeRTOSConfig.h +++ b/sample_configuration/FreeRTOSConfig.h @@ -118,13 +118,21 @@ * human readable name. Includes the NULL terminator. */ #define configMAX_TASK_NAME_LEN 16 -/* The tick count is held in a variable of type TickType_t. Set - * configUSE_16_BIT_TICKS to 1 to make TickType_t a 16-bit type. Set - * configUSE_16_BIT_TICKS to 0 to make TickType_t either a 32 or 64-bit type - * depending on the architecture. Using a 16-bit type can greatly improve - * efficiency on 8-bit and 16-bit microcontrollers, but at the cost of limiting the - * maximum specifiable block time to 0xffff. */ -#define configUSE_16_BIT_TICKS 0 +/* Time is measured in 'ticks' - which is the number of times the tick interrupt + * has executed since the RTOS kernel was started. + * The tick count is held in a variable of type TickType_t. + * + * configTICK_TYPE_WIDTH_IN_BITS controls the type (and therefore bit-width) of TickType_t: + * + * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_16_BITS causes + * TickType_t to be defined (typedef'ed) as an unsigned 16-bit type. + * + * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_32_BITS causes + * TickType_t to be defined (typedef'ed) as an unsigned 32-bit type. + * + * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_64_BITS causes + * TickType_t to be defined (typedef'ed) as an unsigned 64-bit type. */ +#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_64_BITS /* Set configIDLE_SHOULD_YIELD to 1 to have the Idle task yield to an * application task if there is an Idle priority (priority 0) application task that @@ -390,6 +398,9 @@ * call into the secure side of an ARMv8-M chip. Not used by any other ports. */ #define secureconfigMAX_SECURE_CONTEXTS 5 + +#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_64_BITS + /******************************************************************************/ /* Definitions that include or exclude functionality. *************************/ /******************************************************************************/ From edaed6355371f297cd404a06e87d691b23d8b656 Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 12:32:46 +0530 Subject: [PATCH 02/10] moving sample cmake project to a separate root level dir --- example/cmake_example/CMakeLists.txt | 28 +++++ example/cmake_example/main.c | 111 ++++++++++++++++++ .../sample_configuration}/FreeRTOSConfig.h | 0 .../sample_configuration}/readme.md | 0 4 files changed, 139 insertions(+) create mode 100644 example/cmake_example/CMakeLists.txt create mode 100644 example/cmake_example/main.c rename {sample_configuration => example/sample_configuration}/FreeRTOSConfig.h (100%) rename {sample_configuration => example/sample_configuration}/readme.md (100%) diff --git a/example/cmake_example/CMakeLists.txt b/example/cmake_example/CMakeLists.txt new file mode 100644 index 0000000000..7230120390 --- /dev/null +++ b/example/cmake_example/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.15) + +project(example) + +set(FREERTOS_KERNEL_PATH "../") + +# Add the freertos_config for FreeRTOS-Kernel +add_library(freertos_config INTERFACE) + +target_include_directories(freertos_config + INTERFACE + ../sample_configuration +) + +# Select the heap port. values between 1-4 will pick a heap. +# set(FREERTOS_HEAP "4" CACHE STRING "" FORCE) + +# Select the native compile PORT +set(FREERTOS_PORT "TEMPLATE" CACHE STRING "" FORCE) + +# Adding the FreeRTOS-Kernel subdirectory +add_subdirectory(${FREERTOS_KERNEL_PATH} FreeRTOS-Kernel) + +add_executable(${PROJECT_NAME} + main.c +) + +target_link_libraries(${PROJECT_NAME} freertos_kernel freertos_config) diff --git a/example/cmake_example/main.c b/example/cmake_example/main.c new file mode 100644 index 0000000000..d00aeae720 --- /dev/null +++ b/example/cmake_example/main.c @@ -0,0 +1,111 @@ +/* + * FreeRTOS Kernel + * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * https://www.FreeRTOS.org + * https://github.com/FreeRTOS + * + */ + +/* + * This is a simple main that will start the FreeRTOS-Kernel and run a periodic task + * that only delays if compiled with the template port, this project will do nothing. + * For more information on getting started please look here: + * https://freertos.org/FreeRTOS-quick-start-guide.html + */ + +#include +#include +#include +#include +#include + +#include + +static StaticTask_t exampleTaskTCB; +static StackType_t exampleTaskStack[ configMINIMAL_STACK_SIZE ]; + +static StaticTask_t xTimerTaskTCB; +static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; + +static StaticTask_t xIdleTaskTCB; +static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; + +void exampleTask( void * parameters ) +{ + /* Unused parameters. */ + ( void ) parameters; + + for( ; ; ) + { + /* Example Task Code */ + vTaskDelay( 100 ); /* delay 100 ticks */ + } +} + +void main( void ) +{ + printf( "Example FreeRTOS Project\n" ); + + xTaskCreateStatic( exampleTask, + "example", + configMINIMAL_STACK_SIZE, + NULL, + configMAX_PRIORITIES - 1, + exampleTaskStack, + &exampleTaskTCB ); + + /* Start the scheduler. */ + vTaskStartScheduler(); + + for( ; ; ) + { + /* Should not reach here. */ + } +} + +void vApplicationStackOverflowHook( TaskHandle_t xTask, + char * pcTaskName ) +{ + /* Check pcTaskName for the name of the offending task, + * or pxCurrentTCB if pcTaskName has itself been corrupted. */ + ( void ) xTask; + ( void ) pcTaskName; +} + +void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, + StackType_t ** ppxTimerTaskStackBuffer, + uint32_t * pulTimerTaskStackSize ) +{ + *ppxTimerTaskTCBBuffer = &xTimerTaskTCB; + *ppxTimerTaskStackBuffer = uxTimerTaskStack; + *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; +} + +void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, + StackType_t ** ppxIdleTaskStackBuffer, + uint32_t * pulIdleTaskStackSize ) +{ + *ppxIdleTaskTCBBuffer = &xIdleTaskTCB; + *ppxIdleTaskStackBuffer = uxIdleTaskStack; + *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; +} diff --git a/sample_configuration/FreeRTOSConfig.h b/example/sample_configuration/FreeRTOSConfig.h similarity index 100% rename from sample_configuration/FreeRTOSConfig.h rename to example/sample_configuration/FreeRTOSConfig.h diff --git a/sample_configuration/readme.md b/example/sample_configuration/readme.md similarity index 100% rename from sample_configuration/readme.md rename to example/sample_configuration/readme.md From d10815f3e61ce09fa53c696237876dcb81f8bcbd Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 12:34:11 +0530 Subject: [PATCH 03/10] moving sample cmake project to a separate root level dir --- cmake_example/CMakeLists.txt | 28 --------- cmake_example/main.c | 111 ----------------------------------- 2 files changed, 139 deletions(-) delete mode 100644 cmake_example/CMakeLists.txt delete mode 100644 cmake_example/main.c diff --git a/cmake_example/CMakeLists.txt b/cmake_example/CMakeLists.txt deleted file mode 100644 index 7230120390..0000000000 --- a/cmake_example/CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -cmake_minimum_required(VERSION 3.15) - -project(example) - -set(FREERTOS_KERNEL_PATH "../") - -# Add the freertos_config for FreeRTOS-Kernel -add_library(freertos_config INTERFACE) - -target_include_directories(freertos_config - INTERFACE - ../sample_configuration -) - -# Select the heap port. values between 1-4 will pick a heap. -# set(FREERTOS_HEAP "4" CACHE STRING "" FORCE) - -# Select the native compile PORT -set(FREERTOS_PORT "TEMPLATE" CACHE STRING "" FORCE) - -# Adding the FreeRTOS-Kernel subdirectory -add_subdirectory(${FREERTOS_KERNEL_PATH} FreeRTOS-Kernel) - -add_executable(${PROJECT_NAME} - main.c -) - -target_link_libraries(${PROJECT_NAME} freertos_kernel freertos_config) diff --git a/cmake_example/main.c b/cmake_example/main.c deleted file mode 100644 index d00aeae720..0000000000 --- a/cmake_example/main.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * FreeRTOS Kernel - * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * SPDX-License-Identifier: MIT - * - * Permission is hereby granted, free of charge, to any person obtaining a copy of - * this software and associated documentation files (the "Software"), to deal in - * the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of - * the Software, and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * https://www.FreeRTOS.org - * https://github.com/FreeRTOS - * - */ - -/* - * This is a simple main that will start the FreeRTOS-Kernel and run a periodic task - * that only delays if compiled with the template port, this project will do nothing. - * For more information on getting started please look here: - * https://freertos.org/FreeRTOS-quick-start-guide.html - */ - -#include -#include -#include -#include -#include - -#include - -static StaticTask_t exampleTaskTCB; -static StackType_t exampleTaskStack[ configMINIMAL_STACK_SIZE ]; - -static StaticTask_t xTimerTaskTCB; -static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; - -static StaticTask_t xIdleTaskTCB; -static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; - -void exampleTask( void * parameters ) -{ - /* Unused parameters. */ - ( void ) parameters; - - for( ; ; ) - { - /* Example Task Code */ - vTaskDelay( 100 ); /* delay 100 ticks */ - } -} - -void main( void ) -{ - printf( "Example FreeRTOS Project\n" ); - - xTaskCreateStatic( exampleTask, - "example", - configMINIMAL_STACK_SIZE, - NULL, - configMAX_PRIORITIES - 1, - exampleTaskStack, - &exampleTaskTCB ); - - /* Start the scheduler. */ - vTaskStartScheduler(); - - for( ; ; ) - { - /* Should not reach here. */ - } -} - -void vApplicationStackOverflowHook( TaskHandle_t xTask, - char * pcTaskName ) -{ - /* Check pcTaskName for the name of the offending task, - * or pxCurrentTCB if pcTaskName has itself been corrupted. */ - ( void ) xTask; - ( void ) pcTaskName; -} - -void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, - StackType_t ** ppxTimerTaskStackBuffer, - uint32_t * pulTimerTaskStackSize ) -{ - *ppxTimerTaskTCBBuffer = &xTimerTaskTCB; - *ppxTimerTaskStackBuffer = uxTimerTaskStack; - *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; -} - -void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, - StackType_t ** ppxIdleTaskStackBuffer, - uint32_t * pulIdleTaskStackSize ) -{ - *ppxIdleTaskTCBBuffer = &xIdleTaskTCB; - *ppxIdleTaskStackBuffer = uxIdleTaskStack; - *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; -} From 160f755b8bc1b015a155716e131635ce55c79e6d Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 12:36:58 +0530 Subject: [PATCH 04/10] updating paths for the sample cmake project --- example/cmake_example/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/cmake_example/CMakeLists.txt b/example/cmake_example/CMakeLists.txt index 7230120390..2bb317296e 100644 --- a/example/cmake_example/CMakeLists.txt +++ b/example/cmake_example/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.15) project(example) -set(FREERTOS_KERNEL_PATH "../") +set(FREERTOS_KERNEL_PATH "../../") # Add the freertos_config for FreeRTOS-Kernel add_library(freertos_config INTERFACE) @@ -13,7 +13,7 @@ target_include_directories(freertos_config ) # Select the heap port. values between 1-4 will pick a heap. -# set(FREERTOS_HEAP "4" CACHE STRING "" FORCE) +set(FREERTOS_HEAP "4" CACHE STRING "" FORCE) # Select the native compile PORT set(FREERTOS_PORT "TEMPLATE" CACHE STRING "" FORCE) From aecf6c2503efbf39da7d506624ecfd8ac32a6b0c Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 12:39:49 +0530 Subject: [PATCH 05/10] rename example folder --- {example => sample_project}/cmake_example/CMakeLists.txt | 0 {example => sample_project}/cmake_example/main.c | 0 {example => sample_project}/sample_configuration/FreeRTOSConfig.h | 0 {example => sample_project}/sample_configuration/readme.md | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {example => sample_project}/cmake_example/CMakeLists.txt (100%) rename {example => sample_project}/cmake_example/main.c (100%) rename {example => sample_project}/sample_configuration/FreeRTOSConfig.h (100%) rename {example => sample_project}/sample_configuration/readme.md (100%) diff --git a/example/cmake_example/CMakeLists.txt b/sample_project/cmake_example/CMakeLists.txt similarity index 100% rename from example/cmake_example/CMakeLists.txt rename to sample_project/cmake_example/CMakeLists.txt diff --git a/example/cmake_example/main.c b/sample_project/cmake_example/main.c similarity index 100% rename from example/cmake_example/main.c rename to sample_project/cmake_example/main.c diff --git a/example/sample_configuration/FreeRTOSConfig.h b/sample_project/sample_configuration/FreeRTOSConfig.h similarity index 100% rename from example/sample_configuration/FreeRTOSConfig.h rename to sample_project/sample_configuration/FreeRTOSConfig.h diff --git a/example/sample_configuration/readme.md b/sample_project/sample_configuration/readme.md similarity index 100% rename from example/sample_configuration/readme.md rename to sample_project/sample_configuration/readme.md From 567b29ff37dcafa7ad2fa4fe46d28085d8d52799 Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 12:47:32 +0530 Subject: [PATCH 06/10] use configKERNEL_PROVIDED_STATIC_MEMORY --- sample_project/cmake_example/main.c | 18 ------------------ .../sample_configuration/FreeRTOSConfig.h | 9 +++++++-- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/sample_project/cmake_example/main.c b/sample_project/cmake_example/main.c index d00aeae720..36dd7d066d 100644 --- a/sample_project/cmake_example/main.c +++ b/sample_project/cmake_example/main.c @@ -91,21 +91,3 @@ void vApplicationStackOverflowHook( TaskHandle_t xTask, ( void ) xTask; ( void ) pcTaskName; } - -void vApplicationGetTimerTaskMemory( StaticTask_t ** ppxTimerTaskTCBBuffer, - StackType_t ** ppxTimerTaskStackBuffer, - uint32_t * pulTimerTaskStackSize ) -{ - *ppxTimerTaskTCBBuffer = &xTimerTaskTCB; - *ppxTimerTaskStackBuffer = uxTimerTaskStack; - *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; -} - -void vApplicationGetIdleTaskMemory( StaticTask_t ** ppxIdleTaskTCBBuffer, - StackType_t ** ppxIdleTaskStackBuffer, - uint32_t * pulIdleTaskStackSize ) -{ - *ppxIdleTaskTCBBuffer = &xIdleTaskTCB; - *ppxIdleTaskStackBuffer = uxIdleTaskStack; - *pulIdleTaskStackSize = configMINIMAL_STACK_SIZE; -} diff --git a/sample_project/sample_configuration/FreeRTOSConfig.h b/sample_project/sample_configuration/FreeRTOSConfig.h index 106648bff2..255aea693f 100644 --- a/sample_project/sample_configuration/FreeRTOSConfig.h +++ b/sample_project/sample_configuration/FreeRTOSConfig.h @@ -398,8 +398,13 @@ * call into the secure side of an ARMv8-M chip. Not used by any other ports. */ #define secureconfigMAX_SECURE_CONTEXTS 5 - -#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_64_BITS +/* Defines the kernel provided implementation of + * vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() + * to provide the memory that is used by the Idle task and Timer task respectively. + * The application can provide it's own implementation of + * vApplicationGetIdleTaskMemory by setting configKERNEL_PROVIDED_STATIC_MEMORY + * to 0 or leaving it undefined. */ +#define configKERNEL_PROVIDED_STATIC_MEMORY 1 /******************************************************************************/ /* Definitions that include or exclude functionality. *************************/ From e3791a88e5846eefb915ef5b0e56ccb1bb7ab25d Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 12:50:33 +0530 Subject: [PATCH 07/10] update comments --- sample_project/sample_configuration/FreeRTOSConfig.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample_project/sample_configuration/FreeRTOSConfig.h b/sample_project/sample_configuration/FreeRTOSConfig.h index 255aea693f..bfd1225798 100644 --- a/sample_project/sample_configuration/FreeRTOSConfig.h +++ b/sample_project/sample_configuration/FreeRTOSConfig.h @@ -402,8 +402,8 @@ * vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() * to provide the memory that is used by the Idle task and Timer task respectively. * The application can provide it's own implementation of - * vApplicationGetIdleTaskMemory by setting configKERNEL_PROVIDED_STATIC_MEMORY - * to 0 or leaving it undefined. */ + * vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() by + * setting configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. */ #define configKERNEL_PROVIDED_STATIC_MEMORY 1 /******************************************************************************/ From 2acb56f079698138bdba38a481a3e34fed3311bf Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 12:51:42 +0530 Subject: [PATCH 08/10] update comments --- sample_project/cmake_example/main.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sample_project/cmake_example/main.c b/sample_project/cmake_example/main.c index 36dd7d066d..bf1717e95a 100644 --- a/sample_project/cmake_example/main.c +++ b/sample_project/cmake_example/main.c @@ -44,12 +44,6 @@ static StaticTask_t exampleTaskTCB; static StackType_t exampleTaskStack[ configMINIMAL_STACK_SIZE ]; -static StaticTask_t xTimerTaskTCB; -static StackType_t uxTimerTaskStack[ configTIMER_TASK_STACK_DEPTH ]; - -static StaticTask_t xIdleTaskTCB; -static StackType_t uxIdleTaskStack[ configMINIMAL_STACK_SIZE ]; - void exampleTask( void * parameters ) { /* Unused parameters. */ From c29b290b10842ec5f534762dc6c920e243386f05 Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 13:47:02 +0530 Subject: [PATCH 09/10] rename folder to examples --- {sample_project => examples}/cmake_example/CMakeLists.txt | 0 {sample_project => examples}/cmake_example/main.c | 0 .../sample_configuration/FreeRTOSConfig.h | 0 {sample_project => examples}/sample_configuration/readme.md | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename {sample_project => examples}/cmake_example/CMakeLists.txt (100%) rename {sample_project => examples}/cmake_example/main.c (100%) rename {sample_project => examples}/sample_configuration/FreeRTOSConfig.h (100%) rename {sample_project => examples}/sample_configuration/readme.md (100%) diff --git a/sample_project/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt similarity index 100% rename from sample_project/cmake_example/CMakeLists.txt rename to examples/cmake_example/CMakeLists.txt diff --git a/sample_project/cmake_example/main.c b/examples/cmake_example/main.c similarity index 100% rename from sample_project/cmake_example/main.c rename to examples/cmake_example/main.c diff --git a/sample_project/sample_configuration/FreeRTOSConfig.h b/examples/sample_configuration/FreeRTOSConfig.h similarity index 100% rename from sample_project/sample_configuration/FreeRTOSConfig.h rename to examples/sample_configuration/FreeRTOSConfig.h diff --git a/sample_project/sample_configuration/readme.md b/examples/sample_configuration/readme.md similarity index 100% rename from sample_project/sample_configuration/readme.md rename to examples/sample_configuration/readme.md From 6ac7ca4cffafb41e91261d517e70aed144a978ef Mon Sep 17 00:00:00 2001 From: tony-josi-aws Date: Mon, 23 Oct 2023 13:58:24 +0530 Subject: [PATCH 10/10] fix formatting --- README.md | 2 +- .../sample_configuration/FreeRTOSConfig.h | 30 +++++++++---------- portable/template/portmacro.h | 4 +-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 2ef7199723..c6633563f1 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ See the readme file in the ```./portable``` directory for more information. - The ```./include``` directory contains the real time kernel header files. - The ```./sample_configuration``` directory contains a sample `FreeRTOSConfig.h` to help jumpstart a new project. -See the [FreeRTOSConfig.h](sample_configuration/FreeRTOSConfig.h) file for instructions. +See the [FreeRTOSConfig.h](examples/sample_configuration/FreeRTOSConfig.h) file for instructions. ### Code Formatting diff --git a/examples/sample_configuration/FreeRTOSConfig.h b/examples/sample_configuration/FreeRTOSConfig.h index bfd1225798..32b75bc9d8 100644 --- a/examples/sample_configuration/FreeRTOSConfig.h +++ b/examples/sample_configuration/FreeRTOSConfig.h @@ -118,21 +118,21 @@ * human readable name. Includes the NULL terminator. */ #define configMAX_TASK_NAME_LEN 16 -/* Time is measured in 'ticks' - which is the number of times the tick interrupt - * has executed since the RTOS kernel was started. +/* Time is measured in 'ticks' - which is the number of times the tick interrupt + * has executed since the RTOS kernel was started. * The tick count is held in a variable of type TickType_t. - * + * * configTICK_TYPE_WIDTH_IN_BITS controls the type (and therefore bit-width) of TickType_t: - * - * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_16_BITS causes + * + * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_16_BITS causes * TickType_t to be defined (typedef'ed) as an unsigned 16-bit type. - * - * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_32_BITS causes + * + * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_32_BITS causes * TickType_t to be defined (typedef'ed) as an unsigned 32-bit type. - * - * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_64_BITS causes + * + * Defining configTICK_TYPE_WIDTH_IN_BITS as TICK_TYPE_WIDTH_64_BITS causes * TickType_t to be defined (typedef'ed) as an unsigned 64-bit type. */ -#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_64_BITS +#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_64_BITS /* Set configIDLE_SHOULD_YIELD to 1 to have the Idle task yield to an * application task if there is an Idle priority (priority 0) application task that @@ -396,15 +396,15 @@ /* secureconfigMAX_SECURE_CONTEXTS define the maximum number of tasks that can * call into the secure side of an ARMv8-M chip. Not used by any other ports. */ -#define secureconfigMAX_SECURE_CONTEXTS 5 +#define secureconfigMAX_SECURE_CONTEXTS 5 -/* Defines the kernel provided implementation of +/* Defines the kernel provided implementation of * vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() - * to provide the memory that is used by the Idle task and Timer task respectively. + * to provide the memory that is used by the Idle task and Timer task respectively. * The application can provide it's own implementation of - * vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() by + * vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory() by * setting configKERNEL_PROVIDED_STATIC_MEMORY to 0 or leaving it undefined. */ -#define configKERNEL_PROVIDED_STATIC_MEMORY 1 +#define configKERNEL_PROVIDED_STATIC_MEMORY 1 /******************************************************************************/ /* Definitions that include or exclude functionality. *************************/ diff --git a/portable/template/portmacro.h b/portable/template/portmacro.h index 5e695e7503..4e4aa934d4 100644 --- a/portable/template/portmacro.h +++ b/portable/template/portmacro.h @@ -39,8 +39,8 @@ typedef unsigned char UBaseType_t; typedef uint32_t TickType_t; #define portMAX_DELAY ( TickType_t ) 0xffffffffUL #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_64_BITS ) - typedef uint64_t TickType_t; - #define portMAX_DELAY ( TickType_t ) 0xffffffffffffffffULL + typedef uint64_t TickType_t; + #define portMAX_DELAY ( TickType_t ) 0xffffffffffffffffULL #else #error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width. #endif