mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
freertos: optionally place selected freertos functions into flash memory instead of IRAM
correct generation.py script to be silent when file: function is not in the object list (just ignore placement) correct linker.lf to place task functions into flash if CONFIG_FREERTOS_TASK_FUNCTIONS_INTO_FLASH is active otherwise into IRAM update kconfig option to place functions into IRAM update linker file after tests fix spi_device_polling_end crash when xTaskGetTickCount() in flash disable "yield from lower priority task, other CPU" test case when placing rtos functions into flash upadate ut app config freertos_flash combine spi_flash driver and freertos ut configs into one file remove TEST_EXCLUDE_COMPONENTS ci: fix ut job remove functions that are called from ISR funcs add port module functions to place into Flash place snapshot funcs into Flash when ESP_PANIC_HANDLER_IRAM is not set ci: add job with tags UT_T1_GPIO,ESP32_IDF
This commit is contained in:
parent
2b7466b2aa
commit
eaa892bebf
@ -417,6 +417,13 @@ menu "FreeRTOS"
|
||||
would be checked to be in compliance with Vanilla FreeRTOS.
|
||||
e.g Calling port*_CRITICAL from ISR context would cause assert failure
|
||||
|
||||
config FREERTOS_PLACE_FUNCTIONS_INTO_FLASH
|
||||
bool "Place FreeRTOS functions into Flash"
|
||||
default n
|
||||
help
|
||||
When enabled the selected Non-ISR FreeRTOS functions will be placed into Flash memory instead of IRAM.
|
||||
This saves up to 8KB of IRAM depending on which functions are used.
|
||||
|
||||
config FREERTOS_DEBUG_OCDAWARE
|
||||
bool
|
||||
help
|
||||
|
@ -3,4 +3,112 @@ archive: libfreertos.a
|
||||
entries:
|
||||
* (noflash_text)
|
||||
queue:xQueueGenericCreateStatic (default)
|
||||
|
||||
if FREERTOS_PLACE_FUNCTIONS_INTO_FLASH = y:
|
||||
port: pxPortInitialiseStack (default)
|
||||
port: xPortStartScheduler (default)
|
||||
port: vPortStoreTaskMPUSettings (default)
|
||||
port: vPortReleaseTaskMPUSettings (default)
|
||||
if ESP_PANIC_HANDLER_IRAM != y:
|
||||
tasks: uxTaskGetSnapshotAll (default)
|
||||
tasks: prvTaskGetSnapshot (default)
|
||||
tasks: prvTaskGetSnapshotsFromList (default)
|
||||
tasks: prvTaskCheckFreeStackSpace (default)
|
||||
tasks: prvListTaskWithinSingleList (default)
|
||||
tasks: prvInitialiseNewTask (default)
|
||||
tasks: prvInitialiseTaskLists (default)
|
||||
tasks: prvDeleteTCB (default)
|
||||
tasks: prvCheckTasksWaitingTermination (default)
|
||||
tasks: prvAddCurrentTaskToDelayedList (default)
|
||||
tasks: prvIdleTask (default)
|
||||
tasks: prvAddNewTaskToReadyList (default)
|
||||
tasks: xTaskCreateStaticPinnedToCore (default)
|
||||
tasks: xTaskCreatePinnedToCore (default)
|
||||
tasks: vTaskResume (default)
|
||||
tasks: vTaskStartScheduler (default)
|
||||
tasks: vTaskSuspendAll (default)
|
||||
tasks: uxTaskGetNumberOfTasks (default)
|
||||
tasks: uxTaskGetSystemState (default)
|
||||
tasks: xTaskGetIdleTaskHandle (default)
|
||||
tasks: xTaskRemoveFromUnorderedEventList (default)
|
||||
tasks: uxTaskGetTaskNumber (default)
|
||||
tasks: vTaskSetTaskNumber (default)
|
||||
tasks: uxTaskPriorityGet (default)
|
||||
tasks: vTaskPrioritySet (default)
|
||||
tasks: vTaskSetThreadLocalStoragePointerAndDelCallback (default)
|
||||
tasks: pvTaskGetThreadLocalStoragePointer (default)
|
||||
tasks: xTaskGetCurrentTaskHandleForCPU (default)
|
||||
tasks: vTaskDelete (default)
|
||||
tasks: vTaskDelayUntil (default)
|
||||
tasks: vTaskDelay (default)
|
||||
tasks: vTaskSuspend (default)
|
||||
tasks: xTaskResumeAll (default)
|
||||
tasks: uxTaskResetEventItemValue (default)
|
||||
tasks: ulTaskNotifyTake (default)
|
||||
tasks: xTaskNotifyWait (default)
|
||||
tasks: xTaskNotify (default)
|
||||
tasks: eTaskGetState (default)
|
||||
tasks: pxTaskGetStackStart (default)
|
||||
tasks: uxTaskGetStackHighWaterMark (default)
|
||||
tasks: vTaskAllocateMPURegions (default)
|
||||
tasks: vTaskEndScheduler (default)
|
||||
tasks: vTaskList (default)
|
||||
tasks: vTaskMissedYield (default)
|
||||
tasks: vTaskSetThreadLocalStoragePointer (default)
|
||||
tasks: xTaskCreateRestricted (default)
|
||||
tasks: xTaskGetAffinity (default)
|
||||
tasks: xTaskGetIdleTaskHandleForCPU (default)
|
||||
timers: prvInsertTimerInActiveList (default)
|
||||
timers: prvCheckForValidListAndQueue (default)
|
||||
timers: prvInitialiseNewTimer (default)
|
||||
timers: prvTimerTask (default)
|
||||
timers: prvSwitchTimerLists (default)
|
||||
timers: prvSampleTimeNow (default)
|
||||
timers: prvProcessExpiredTimer (default)
|
||||
timers: prvProcessTimerOrBlockTask (default)
|
||||
timers: prvProcessReceivedCommands (default)
|
||||
timers: xTimerCreateTimerTask (default)
|
||||
timers: xTimerCreate (default)
|
||||
timers: xTimerCreateStatic (default)
|
||||
timers: xTimerGenericCommand (default)
|
||||
timers: xTimerGetPeriod (default)
|
||||
timers: xTimerGetExpiryTime (default)
|
||||
timers: xTimerIsTimerActive (default)
|
||||
timers: pvTimerGetTimerID (default)
|
||||
timers: vTimerSetTimerID (default)
|
||||
timers: prvGetNextExpireTime (default)
|
||||
event_groups: prvTestWaitCondition (default)
|
||||
event_groups: xEventGroupCreateStatic (default)
|
||||
event_groups: xEventGroupCreate (default)
|
||||
event_groups: xEventGroupWaitBits (default)
|
||||
event_groups: xEventGroupClearBits (default)
|
||||
event_groups: xEventGroupSetBits (default)
|
||||
event_groups: xEventGroupSync (default)
|
||||
event_groups: vEventGroupDelete (default)
|
||||
queue: prvIsQueueEmpty (default)
|
||||
queue: prvIsQueueFull (default)
|
||||
queue: prvInitialiseNewQueue (default)
|
||||
queue: prvInitialiseMutex (default)
|
||||
queue: uxQueueSpacesAvailable (default)
|
||||
queue: xQueueGenericReset (default)
|
||||
queue: xQueueGenericCreate (default)
|
||||
queue: xQueueGetMutexHolder (default)
|
||||
queue: xQueueCreateCountingSemaphoreStatic (default)
|
||||
queue: xQueueCreateCountingSemaphore (default)
|
||||
queue: xQueueGenericSend (default)
|
||||
queue: xQueueCreateMutex (default)
|
||||
queue: xQueueCreateMutexStatic (default)
|
||||
queue: xQueueGiveMutexRecursive (default)
|
||||
queue: xQueueTakeMutexRecursive (default)
|
||||
queue: uxQueueMessagesWaiting (default)
|
||||
queue: uxQueueGetQueueNumber (default)
|
||||
queue: vQueueSetQueueNumber (default)
|
||||
queue: ucQueueGetQueueType (default)
|
||||
queue: vQueueAddToRegistry (default)
|
||||
queue: pcQueueGetName (default)
|
||||
queue: vQueueUnregisterQueue (default)
|
||||
queue: vQueueDelete (default)
|
||||
queue: vQueueWaitForMessageRestricted (default)
|
||||
queue: xQueueCreateSet (default)
|
||||
queue: xQueueAddToSet (default)
|
||||
queue: xQueueRemoveFromSet (default)
|
||||
queue: xQueueSelectFromSet (default)
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "unity.h"
|
||||
#include "soc/cpu.h"
|
||||
#include "test_utils.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
static volatile bool trigger;
|
||||
static volatile bool flag;
|
||||
@ -72,7 +73,7 @@ TEST_CASE("Yield from lower priority task, same CPU", "[freertos]")
|
||||
}
|
||||
|
||||
|
||||
#if portNUM_PROCESSORS == 2
|
||||
#if (portNUM_PROCESSORS == 2) && !CONFIG_FREERTOS_TASK_FUNCTIONS_INTO_FLASH
|
||||
TEST_CASE("Yield from lower priority task, other CPU", "[freertos]")
|
||||
{
|
||||
uint32_t trigger_ccount, yield_ccount, now_ccount, delta;
|
||||
@ -107,4 +108,4 @@ TEST_CASE("Yield from lower priority task, other CPU", "[freertos]")
|
||||
vTaskDelete(sender_task);
|
||||
}
|
||||
}
|
||||
#endif // portNUM_PROCESSORS == 2
|
||||
#endif
|
||||
|
@ -398,7 +398,7 @@ test_app_test_003:
|
||||
|
||||
UT_001:
|
||||
extends: .unit_test_template
|
||||
parallel: 39
|
||||
parallel: 43
|
||||
tags:
|
||||
- ESP32_IDF
|
||||
- UT_T1_1
|
||||
@ -407,7 +407,7 @@ UT_001:
|
||||
|
||||
UT_002:
|
||||
extends: .unit_test_template
|
||||
parallel: 15
|
||||
parallel: 12
|
||||
tags:
|
||||
- ESP32_IDF
|
||||
- UT_T1_1
|
||||
@ -481,7 +481,7 @@ UT_017:
|
||||
|
||||
UT_018:
|
||||
extends: .unit_test_template
|
||||
parallel: 5
|
||||
parallel: 2
|
||||
tags:
|
||||
- ESP32_IDF
|
||||
- UT_T1_1
|
||||
@ -537,6 +537,7 @@ UT_033:
|
||||
|
||||
UT_034:
|
||||
extends: .unit_test_template
|
||||
parallel: 2
|
||||
tags:
|
||||
- ESP32_IDF
|
||||
- UT_T1_ESP_FLASH
|
||||
@ -560,7 +561,7 @@ UT_034:
|
||||
|
||||
UT_035:
|
||||
extends: .unit_test_s2_template
|
||||
parallel: 38
|
||||
parallel: 41
|
||||
tags:
|
||||
- ESP32S2_IDF
|
||||
- UT_T1_1
|
||||
@ -612,7 +613,12 @@ UT_045:
|
||||
- ESP32_IDF
|
||||
- UT_SDIO
|
||||
- psram
|
||||
|
||||
|
||||
UT_046:
|
||||
extends: .unit_test_template
|
||||
tags:
|
||||
- ESP32_IDF
|
||||
- UT_T1_GPIO
|
||||
|
||||
nvs_compatible_test:
|
||||
extends: .test_template
|
||||
|
@ -80,8 +80,7 @@ class PlacementRule():
|
||||
def do_section_expansion(rule, section):
|
||||
if section in rule.get_section_names():
|
||||
sections_in_obj = sections_infos.get_obj_sections(rule.archive, rule.obj)
|
||||
|
||||
expansions = fnmatch.filter(sections_in_obj, section)
|
||||
expansions = [n for n in sections_in_obj or [] if fnmatch.fnmatch(n, section)]
|
||||
return expansions
|
||||
|
||||
def remove_section_expansions(rule, section, expansions):
|
||||
|
2
tools/unit-test-app/configs/freertos_flash
Normal file
2
tools/unit-test-app/configs/freertos_flash
Normal file
@ -0,0 +1,2 @@
|
||||
TEST_COMPONENTS=freertos driver spi_flash
|
||||
CONFIG_FREERTOS_TASK_FUNCTIONS_INTO_FLASH=y
|
Loading…
x
Reference in New Issue
Block a user