feat(freertos): Introduced new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES
This commit replaces the use of portNUM_PROCESSORS and configNUM_CORES macros in all of ESP-IDF. These macros are needed to realize an SMP scenario by fetching the number of active cores FreeRTOS is running on. Instead, a new Kconfig option, CONFIG_FREERTOS_NUMBER_OF_CORES, has been added as a proxy for the FreeRTOS config option, configNUMBER_OF_CORES. This new commit is now used to realize an SMP scenario in various places in ESP-IDF. [Sudeep Mohanty: Added new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES] Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "soc/soc.h"
|
||||
@@ -77,11 +78,11 @@ typedef struct {
|
||||
void *split_addr; /*!< Main I/D splitting address */
|
||||
uint32_t mem_type_mask; /*!< Memory types required to protect. See esp_mprot_mem_t enum */
|
||||
size_t target_cpu_count; /*!< Real CPU/core count (max 2) */
|
||||
int target_cpu[portNUM_PROCESSORS]; /*!< Array of CPU/core IDs required to receive given PMS protection */
|
||||
int target_cpu[CONFIG_FREERTOS_NUMBER_OF_CORES]; /*!< Array of CPU/core IDs required to receive given PMS protection */
|
||||
} esp_memp_config_t;
|
||||
|
||||
//2-CPU configuration
|
||||
#if portNUM_PROCESSORS > 1
|
||||
#if CONFIG_FREERTOS_NUMBER_OF_CORES > 1
|
||||
|
||||
//default IDF configuration (basic memory regions, split line detection, locked, panic mode on)
|
||||
#define ESP_MEMPROT_DEFAULT_CONFIG() { \
|
||||
|
||||
Reference in New Issue
Block a user