Skip to content

Commit

Permalink
freertos: Uncrustify FreeRTOSConfig files
Browse files Browse the repository at this point in the history
  • Loading branch information
Dazza0 committed Mar 22, 2023
1 parent 6895e92 commit 54deed0
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 231 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#pragma once

// Linux POSIX simulator specific configuration. This file is included in the common FreeRTOSConfig.h.
/* Linux POSIX simulator specific configuration. This file is included in the common FreeRTOSConfig.h. */

#include "sdkconfig.h"

Expand All @@ -16,35 +16,36 @@
* https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS/Demo/Posix_GCC/FreeRTOSConfig.h
* ------------------------------------------------------------------------------------------------------------------ */

// ------------------ Scheduler Related --------------------
/* ------------------ Scheduler Related -------------------- */

#define configMAX_PRIORITIES ( 7 )
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0

#define configMAX_PRIORITIES ( 7 )
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
/* The stack allocated by FreeRTOS will be passed to a pthread.
pthread has a minimal stack size which currently is 16KB.
The rest is for additional structures of the POSIX/Linux port.
This is a magic number since PTHREAD_STACK_MIN seems to not be a constant. */
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) (0x4000 + 40) / sizeof(portSTACK_TYPE) )
* pthread has a minimal stack size which currently is 16KB.
* The rest is for additional structures of the POSIX/Linux port.
* This is a magic number since PTHREAD_STACK_MIN seems to not be a constant. */
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) ( 0x4000 + 40 ) / sizeof( portSTACK_TYPE ) )
/* Currently not used in Linux POSIX simulator */
#define configMAX_API_CALL_INTERRUPT_PRIORITY 0
#define configMAX_API_CALL_INTERRUPT_PRIORITY 0

// ----------------------- System --------------------------
/* ----------------------- System -------------------------- */

#define configUSE_NEWLIB_REENTRANT 0
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 0
#define configUSE_NEWLIB_REENTRANT 0
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 0

// ----------------------- Memory -------------------------
/* ----------------------- Memory ------------------------- */

#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 65 * 1024 ) )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 65 * 1024 ) )

// ------------------- Run-time Stats ----------------------
/* ------------------- Run-time Stats ---------------------- */

#define configUSE_TRACE_FACILITY 1
#define configUSE_TRACE_FACILITY 1

// -------------------- API Includes -----------------------
/* -------------------- API Includes ----------------------- */

#define INCLUDE_xTaskGetCurrentTaskHandle 0 /* not defined in POSIX simulator */
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_xTaskGetCurrentTaskHandle 0 /* not defined in POSIX simulator */
#define INCLUDE_vTaskDelayUntil 1

/* ------------------------------------------------ ESP-IDF Additions --------------------------------------------------
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,53 @@

#pragma once

// RISC-V Architecture specific configuration. This file is included in the common FreeRTOSConfig.h.
/* RISC-V Architecture specific configuration. This file is included in the common FreeRTOSConfig.h. */

#include "sdkconfig.h"

/* ------------------------------------------------- FreeRTOS Config ---------------------------------------------------
* - All Vanilla FreeRTOS configuration goes into this section
* ------------------------------------------------------------------------------------------------------------------ */

// ------------------ Scheduler Related --------------------
/* ------------------ Scheduler Related -------------------- */

#define configMAX_PRIORITIES ( 25 )
#define configMAX_PRIORITIES ( 25 )
#ifdef CONFIG_FREERTOS_OPTIMIZED_SCHEDULER
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#else
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
#endif /* CONFIG_FREERTOS_OPTIMIZED_SCHEDULER */
#define configMINIMAL_STACK_SIZE ( CONFIG_FREERTOS_IDLE_TASK_STACKSIZE + configSTACK_OVERHEAD_TOTAL )
#define configMAX_API_CALL_INTERRUPT_PRIORITY 0
#define configMINIMAL_STACK_SIZE ( CONFIG_FREERTOS_IDLE_TASK_STACKSIZE + configSTACK_OVERHEAD_TOTAL )
#define configMAX_API_CALL_INTERRUPT_PRIORITY 0

// ----------------------- System --------------------------
/* ----------------------- System -------------------------- */

#define configUSE_NEWLIB_REENTRANT 1
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1
#define configUSE_NEWLIB_REENTRANT 1
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1

// ----------------------- Memory -------------------------
/* ----------------------- Memory ------------------------- */

/* This isn't used as FreeRTOS will only allocate from internal memory (see
* heap_idf.c). We simply define this macro to span all non-statically-allocated
* shared RAM. */
#define configTOTAL_HEAP_SIZE (&_heap_end - &_heap_start)
#define configTOTAL_HEAP_SIZE ( &_heap_end - &_heap_start )

// ------------------- Run-time Stats ----------------------
/* ------------------- Run-time Stats ---------------------- */

#if CONFIG_FREERTOS_USE_TRACE_FACILITY
/* Used by uxTaskGetSystemState(), and other trace facility functions */
#define configUSE_TRACE_FACILITY 1
#define configUSE_TRACE_FACILITY 1
#endif /* CONFIG_FREERTOS_USE_TRACE_FACILITY */

// -------------------- API Includes -----------------------
/* -------------------- API Includes ----------------------- */

#define INCLUDE_xTaskDelayUntil 1
#define INCLUDE_xTaskGetCurrentTaskHandle 1
#define INCLUDE_xTaskDelayUntil 1
#define INCLUDE_xTaskGetCurrentTaskHandle 1

/* ------------------------------------------------ ESP-IDF Additions --------------------------------------------------
*
* ------------------------------------------------------------------------------------------------------------------ */

#ifndef configISR_STACK_SIZE
#define configISR_STACK_SIZE (CONFIG_FREERTOS_ISR_STACKSIZE)
#define configISR_STACK_SIZE ( CONFIG_FREERTOS_ISR_STACKSIZE )
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#pragma once

// Xtensa Architecture specific configuration. This file is included in the common FreeRTOSConfig.h.
/* Xtensa Architecture specific configuration. This file is included in the common FreeRTOSConfig.h. */

#include "sdkconfig.h"

Expand All @@ -26,55 +26,55 @@
* - XT_USE_SWPRI We don't define this (unused)
* ------------------------------------------------------------------------------------------------------------------ */

#define configXT_SIMULATOR 0
#define configXT_BOARD 1 /* Board mode */
#define configXT_SIMULATOR 0
#define configXT_BOARD 1 /* Board mode */
#if CONFIG_FREERTOS_CORETIMER_0
#define configXT_TIMER_INDEX 0
#define configXT_TIMER_INDEX 0
#elif CONFIG_FREERTOS_CORETIMER_1
#define configXT_TIMER_INDEX 1
#define configXT_TIMER_INDEX 1
#endif
#define configXT_INTEXC_HOOKS 0
#define configXT_INTEXC_HOOKS 0

#define configBENCHMARK 0
#define configBENCHMARK 0

/* ------------------------------------------------- FreeRTOS Config ---------------------------------------------------
* - All Vanilla FreeRTOS configuration goes into this section
* ------------------------------------------------------------------------------------------------------------------ */

// ------------------ Scheduler Related --------------------
/* ------------------ Scheduler Related -------------------- */

#define configMAX_PRIORITIES ( 25 )
#define configMAX_PRIORITIES ( 25 )
#ifdef CONFIG_FREERTOS_OPTIMIZED_SCHEDULER
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
#else
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
#endif /* CONFIG_FREERTOS_OPTIMIZED_SCHEDULER */
#define configMINIMAL_STACK_SIZE ( CONFIG_FREERTOS_IDLE_TASK_STACKSIZE + configSTACK_OVERHEAD_TOTAL )
#define configMAX_API_CALL_INTERRUPT_PRIORITY XCHAL_EXCM_LEVEL
#define configMINIMAL_STACK_SIZE ( CONFIG_FREERTOS_IDLE_TASK_STACKSIZE + configSTACK_OVERHEAD_TOTAL )
#define configMAX_API_CALL_INTERRUPT_PRIORITY XCHAL_EXCM_LEVEL

// ----------------------- System --------------------------
/* ----------------------- System -------------------------- */

#define configUSE_NEWLIB_REENTRANT 1
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1
#define configUSE_NEWLIB_REENTRANT 1
#define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1

// ----------------------- Memory -------------------------
/* ----------------------- Memory ------------------------- */

/* This isn't used as FreeRTOS will only allocate from internal memory (see
* heap_idf.c). We simply define this macro to span all non-statically-allocated
* shared RAM. */
#define configTOTAL_HEAP_SIZE (&_heap_end - &_heap_start)
#define configTOTAL_HEAP_SIZE ( &_heap_end - &_heap_start )

// ------------------- Run-time Stats ----------------------
/* ------------------- Run-time Stats ---------------------- */

#if CONFIG_FREERTOS_USE_TRACE_FACILITY
/* Used by uxTaskGetSystemState(), and other trace facility functions */
#define configUSE_TRACE_FACILITY 1
#define configUSE_TRACE_FACILITY 1
#endif /* CONFIG_FREERTOS_USE_TRACE_FACILITY */

// -------------------- API Includes -----------------------
/* -------------------- API Includes ----------------------- */

#define INCLUDE_xTaskDelayUntil 1
#define INCLUDE_xTaskGetCurrentTaskHandle 1
#define INCLUDE_xTaskDelayUntil 1
#define INCLUDE_xTaskGetCurrentTaskHandle 1

/* ------------------------------------------------ ESP-IDF Additions --------------------------------------------------
*
Expand All @@ -85,7 +85,7 @@
* Size needs to be aligned to the stack increment, since the location of
* the stack for the 2nd CPU will be calculated using configISR_STACK_SIZE.
*/
#define configSTACK_ALIGNMENT 16
#define configSTACK_ALIGNMENT 16
#ifndef configISR_STACK_SIZE
#define configISR_STACK_SIZE ((CONFIG_FREERTOS_ISR_STACKSIZE + configSTACK_ALIGNMENT - 1) & (~(configSTACK_ALIGNMENT - 1)))
#define configISR_STACK_SIZE ( ( CONFIG_FREERTOS_ISR_STACKSIZE + configSTACK_ALIGNMENT - 1 ) & ( ~( configSTACK_ALIGNMENT - 1 ) ) )
#endif
Loading

0 comments on commit 54deed0

Please sign in to comment.