I am sorry but I am not sure I am undertanding properly I have the follwoing configuration
const HeapRegion_t xHeapRegions =
{
{ ( uint8_t * ) 0x20002710UL, 0x1CCF0 }, // 118K
{ ( uint8_t * ) 0x68000000UL+XRAM_OFFSET, 0x1C000 }, // 112K
{ NULL, 0 } /* Terminates the array. */
};
// Pass the array into vPortDefineHeapRegions().
vPortDefineHeapRegions( xHeapRegions );
/* Relocate Vector Table in the FW address 0x08060000 0x08040000, after BOOT area */
NVIC_SetVectorTable(NVIC_VectTab_FLASH, MAP_OFFSET); //0x60000 0x40000
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4);
I am afraid that I can not share the file but I will try to paste the code here
I have removed the comments to minimize the size…
There are some sentences
#if FREERTOS_V100400
#if FREERTOS_2022
are both symbols defined for the entire project that I created to be able to compile my project with different versions of FreeRTOS
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
#define configUSE_PREEMPTION 1
#if FREERTOS_V100400
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
#define configUSE_TICKLESS_IDLE 0
//#define configSYSTICK_CLOCK_HZ not needed //para micro ARM M3 no me hace falta
//#define configIDLE_SHOULD_YIELD 1 //de momento no utilizo
#define configUSE_TASK_NOTIFICATIONS 0 //can send receive task array notifications. New functionality not used yet
#define configTASK_NOTIFICATION_ARRAY_ENTRIES 1 //for backward compatibility
#define configUSE_RECURSIVE_MUTEXES 1
#define configQUEUE_REGISTRY_SIZE 0 //set 1 for debuggin queues adding names to queues…
#define configUSE_QUEUE_SETS 1 //for block/pend multiple queues and semphores
#define configUSE_TIME_SLICING 0 //Task scheduler executes highest priority task bat not switch between task of equal priority
#define configUSE_NEWLIB_REENTRANT 0 //set to 1 if requiered. OJO Newlib is included in FreeRTOS but is not used by the FreeRTOS maintainers themselves
#define configENABLE_BACKWARD_COMPATIBILITY 1 //redefine vbles y funciones q se han cambiado de normbresi no compila poner a 1 es para declarar los defines para q sea compatible con ver pre 8.0.0
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 0 //new funtionality not used. Can be used to keep data in a task
#if FREERTOS_2022
#define configUSE_MINI_LIST_ITEM 1
#endif
#define configSTACK_DEPTH_TYPE uint16_t //no need to use it.Can be used to define stack size when create a task
#define configMESSAGE_BUFFER_LENGTH_TYPE size_t
#endif
#if FREERTOS_2022
#define configHEAP_CLEAR_MEMORY_ON_FREE 1
#define configSTATS_BUFFER_MAX_LENGTH 0xFFFF
#define configUSE_NEWLIB_REENTRANT 0
#endif
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ 120000000
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES 7
#define configMINIMAL_STACK_SIZE 256
//#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 119 * 1024 ) )
#define configMAX_TASK_NAME_LEN 16
#if FREERTOS_2022
#define configTICK_TYPE_WIDTH_IN_BITS TICK_TYPE_WIDTH_64_BITS
#endif
#define configUSE_TRACE_FACILITY 1
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configUSE_COUNTING_SEMAPHORES 1
#define HEAP_MINIMUM_SIZE 0x500
#define configUSE_MALLOC_FAILED_HOOK 0
//#if FREERTOS_V100400
#if FREERTOS_2022
#define configSUPPORT_STATIC_ALLOCATION 0
#define configSUPPORT_DYNAMIC_ALLOCATION 1
#define configAPPLICATION_ALLOCATED_HEAP 0 //if used
//#define configTOTAL_HEAP_SIZE 10240 not need for use of heap_5.c
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0 //Natalia estaba a 0 pero puede venir bien No poner a 1 no compila
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configUSE_MALLOC_FAILED_HOOK 0
#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
#define configUSE_SB_COMPLETED_CALLBACK 0
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configGENERATE_RUN_TIME_STATS 0
#endif
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES 0
#if FREERTOS_2022
#define configASSERT( x )
if( ( x ) == 0 )
{
taskDISABLE_INTERRUPTS();
for( ; ; )
;
}
#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
#define configTOTAL_MPU_REGIONS 8
#define configTEX_S_C_B_FLASH 0x07UL
#define configTEX_S_C_B_SRAM 0x07UL
#define configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY 1
#define configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS 0
#define configUSE_MPU_WRAPPERS_V1 0
#define configPROTECTED_KERNEL_OBJECT_POOL_SIZE 10
#define configSYSTEM_CALL_STACK_SIZE 128
#define configENABLE_ACCESS_CONTROL_LIST 1
#define configRUN_MULTIPLE_PRIORITIES 0
#define configUSE_CORE_AFFINITY 0
#define configTASK_DEFAULT_CORE_AFFINITY tskNO_AFFINITY
#define configUSE_TASK_PREEMPTION_DISABLE 0
#define configUSE_PASSIVE_IDLE_HOOK 0
#define configTIMER_SERVICE_TASK_CORE_AFFINITY tskNO_AFFINITY
#define secureconfigMAX_SECURE_CONTEXTS 5
#define configKERNEL_PROVIDED_STATIC_MEMORY 1
#endif
//#if FREERTOS_V100400
#if FREERTOS_2022
#define configUSE_TIMERS 1 //1
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES-1) //0 //3
#define configTIMER_QUEUE_LENGTH 10 //0//10
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE //0
#endif
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#if FREERTOS_V100400
#define INCLUDE_xResumeFromISR 0
#define INCLUDE_xTaskGetSchedulerState 0
#define INCLUDE_xTaskGetCurrentTaskHandle 0
//#define INCLUDE_uxTaskGetStackHighWaterMark 0
#define INCLUDE_xTaskGetIdleTaskHandle 0
#define INCLUDE_eTaskGetState 0
#define INCLUDE_xEventGroupSetBitFromISR 0
#define INCLUDE_xTimerPendFunctionCall 0
#define INCLUDE_xTaskAbortDelay 0
#define INCLUDE_xTaskGetHandle 0
#define INCLUDE_xTaskResumeFromISR 0
#endif
#define configKERNEL_INTERRUPT_PRIORITY 255
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 191 /* equivalent to 0xb0, or priority 11. */
#if FREERTOS_V100400
#define configMAX_API_CALL_INTERRUPT_PRIORITY 191 //Same as configMAX_SYSCALL_INTERRUPT_PRIORITY renamed
#endif
#define configLIBRARY_KERNEL_INTERRUPT_PRIORITY 15
/* Stack overflow checking */
//#define configCHECK_FOR_STACK_OVERFLOW 2 //99? comprobar
#define INCLUDE_uxTaskGetStackHighWaterMark 1
#if FREERTOS_V100400
/* FreeRTOS MPU specific definitions. /
#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
#define configTOTAL_MPU_REGIONS 8 / Default value. /
#define configTEX_S_C_B_FLASH 0x07UL / Default value. /
#define configTEX_S_C_B_SRAM 0x07UL / Default value. */
#define configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY 1
#endif
#endif
Thanks in advance.
I don’t know if is relevant or not but just to let you know I am compiling the project with Eclipse/arm-none-eabi-gcc and I am using WolfSSL and LWIP1.3.2