linker_common.lf 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Linker fragment file for common FreeRTOS files (i.e., both "port_common.c" and "esp_additions/..."
  2. # Flash function placements are listed per source file, in the order that they appear in the source file.
  3. [mapping:freertos_common]
  4. archive: libfreertos.a
  5. entries:
  6. # ------------------------------------------------------------------------------------------------------------------
  7. # esp_additions/private_include/freertos_tasks_c_additions.h
  8. # Placement Rules (FreeRTOS API Additions):
  9. # - Default: Place all functions in internal RAM.
  10. # - CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH: Place functions in flash if they are never called from an ISR
  11. # context (directly or indirectly).
  12. # Placement Rules (Task Snapshot):
  13. # - Default: Place all functions in internal RAM.
  14. # - CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH: Place functions in flash
  15. # - vTaskGetSnapshot is omitted on purpose as it is used to by the Task Watchdog (TWDT) interrupt handler, we want
  16. # to always keep it in IRAM
  17. # ------------------------------------------------------------------------------------------------------------------
  18. if FREERTOS_PLACE_FUNCTIONS_INTO_FLASH = y:
  19. # Kernel Control
  20. if FREERTOS_SMP = n && FREERTOS_UNICORE = n:
  21. tasks:prvTakeKernelLock (default)
  22. tasks:prvReleaseKernelLock (default)
  23. # Task Creation
  24. tasks:xTaskCreatePinnedToCore (default)
  25. tasks:xTaskCreateStaticPinnedToCore (default)
  26. # Task Utilities
  27. tasks:xTaskGetCoreID (default)
  28. tasks:xTaskGetIdleTaskHandleForCore (default)
  29. tasks:xTaskGetCurrentTaskHandleForCore (default)
  30. if FREERTOS_SMP = n && FREERTOS_GENERATE_RUN_TIME_STATS = y:
  31. tasks:ulTaskGetIdleRunTimeCounterForCore (default)
  32. tasks:ulTaskGetIdleRunTimePercentForCore (default)
  33. tasks:pxTaskGetStackStart (default)
  34. tasks:prvTaskPriorityRaise (default)
  35. tasks:prvTaskPriorityRestore (default)
  36. # TLSP Deletion Callbacks
  37. if FREERTOS_TLSP_DELETION_CALLBACKS = y:
  38. tasks:vTaskSetThreadLocalStoragePointerAndDelCallback (default)
  39. # Task Snapshot
  40. if FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH = y:
  41. tasks:pxGetNextTaskList (default)
  42. tasks:pxTaskGetNext (default)
  43. tasks:uxTaskGetSnapshotAll (default)
  44. # ------------------------------------------------------------------------------------------------------------------
  45. # freertos_compatibility.c
  46. # Placement Rules: Functions always in flash as they are never called from an ISR
  47. # ------------------------------------------------------------------------------------------------------------------
  48. freertos_compatibility (default)
  49. # ------------------------------------------------------------------------------------------------------------------
  50. # idf_additions.c
  51. # Placement Rules: Functions always in flash as they are never called from an ISR
  52. # ------------------------------------------------------------------------------------------------------------------
  53. idf_additions (default)
  54. # ------------------------------------------------------------------------------------------------------------------
  55. # app_startup.c
  56. # Placement Rules: Functions always in flash as they are never called from an ISR
  57. # ------------------------------------------------------------------------------------------------------------------
  58. app_startup (default) # Place functions (but not Data and BSS) to flash
  59. # ------------------------------------------------------------------------------------------------------------------
  60. # heap_idf.c
  61. # Placement Rules:
  62. # - Default: Place all functions in internal RAM.
  63. # - CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH: Place functions in flash if they are never called from an ISR
  64. # context (directly or indirectly).
  65. # ------------------------------------------------------------------------------------------------------------------
  66. heap_idf (noflash_text) # Default all functions to internal RAM
  67. if FREERTOS_PLACE_FUNCTIONS_INTO_FLASH = y:
  68. heap_idf:pvPortMalloc (default)
  69. heap_idf:vPortFree (default)
  70. heap_idf:xPortGetFreeHeapSize (default)
  71. heap_idf:xPortGetMinimumEverFreeHeapSize (default)
  72. if FREERTOS_SMP = n:
  73. heap_idf:xPortCheckValidTCBMem (default)
  74. heap_idf:xPortcheckValidStackMem (default)
  75. # ------------------------------------------------------------------------------------------------------------------
  76. # port_common.c
  77. # Placement Rules:
  78. # - Default: Place all functions in internal RAM.
  79. # - CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH: Place functions in flash if they are never called from an ISR
  80. # context (directly or indirectly).
  81. # ------------------------------------------------------------------------------------------------------------------
  82. port_common (noflash_text) # Default all functions to internal RAM
  83. if FREERTOS_PLACE_FUNCTIONS_INTO_FLASH = y:
  84. port_common:vApplicationGetIdleTaskMemory (default)
  85. port_common:vApplicationGetTimerTaskMemory (default)
  86. # ------------------------------------------------------------------------------------------------------------------
  87. # port_systick.c
  88. # - Default: Place all functions in internal RAM.
  89. # - CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH: Place functions in flash if they are never called from an ISR
  90. # context (directly or indirectly).
  91. # ------------------------------------------------------------------------------------------------------------------
  92. port_systick(noflash_text)
  93. if FREERTOS_PLACE_FUNCTIONS_INTO_FLASH = y:
  94. if FREERTOS_SYSTICK_USES_SYSTIMER = y:
  95. port_systick:vSystimerSetup (default)
  96. port_systick:vPortSetupTimer (default)