From eed6eed90949e8436e472fe08fc46b1b6887286e Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Wed, 13 Jan 2021 20:05:57 +0800 Subject: [PATCH] components: fix ldgen check errors --- components/app_trace/linker.lf | 9 +++++---- components/esp_system/linker.lf | 2 +- components/freertos/linker.lf | 3 ++- components/heap/linker.lf | 4 +++- components/lwip/linker.lf | 1 - components/soc/linker.lf | 6 +++--- components/soc/soc/esp32s2/rtc_periph.c | 2 -- components/xtensa/linker.lf | 3 ++- tools/ci/check_ldgen_mapping_exceptions.txt | 1 + tools/ci/config/build.yml | 4 ++-- 10 files changed, 19 insertions(+), 16 deletions(-) diff --git a/components/app_trace/linker.lf b/components/app_trace/linker.lf index a30377b8ee..08cd419a5b 100644 --- a/components/app_trace/linker.lf +++ b/components/app_trace/linker.lf @@ -3,10 +3,11 @@ archive: libapp_trace.a entries: app_trace (noflash) app_trace_util (noflash) - SEGGER_SYSVIEW (noflash) - SEGGER_RTT_esp32 (noflash) - SEGGER_SYSVIEW_Config_FreeRTOS (noflash) - SEGGER_SYSVIEW_FreeRTOS (noflash) + if SYSVIEW_ENABLE = y: + SEGGER_SYSVIEW (noflash) + SEGGER_RTT_esp32 (noflash) + SEGGER_SYSVIEW_Config_FreeRTOS (noflash) + SEGGER_SYSVIEW_FreeRTOS (noflash) [mapping:driver] archive: libdriver.a diff --git a/components/esp_system/linker.lf b/components/esp_system/linker.lf index 265841c637..891b23048d 100644 --- a/components/esp_system/linker.lf +++ b/components/esp_system/linker.lf @@ -3,4 +3,4 @@ archive: libesp_system.a entries: panic (noflash) panic_handler (noflash) - system_api:esp_system_abort (noflash) \ No newline at end of file + system_api:esp_system_abort (noflash) diff --git a/components/freertos/linker.lf b/components/freertos/linker.lf index 0917c52171..4264456ee6 100644 --- a/components/freertos/linker.lf +++ b/components/freertos/linker.lf @@ -2,5 +2,6 @@ archive: libfreertos.a entries: * (noflash_text) - queue:xQueueGenericCreateStatic (default) + if FREERTOS_SUPPORT_STATIC_ALLOCATION = y: + queue:xQueueGenericCreateStatic (default) diff --git a/components/heap/linker.lf b/components/heap/linker.lf index 2d996e62e4..56c5bd8ae6 100644 --- a/components/heap/linker.lf +++ b/components/heap/linker.lf @@ -2,4 +2,6 @@ archive: libheap.a entries: multi_heap (noflash) - multi_heap_poisoning (noflash) \ No newline at end of file + if HEAP_POISONING_DISABLED = n: + multi_heap_poisoning (noflash) + diff --git a/components/lwip/linker.lf b/components/lwip/linker.lf index ec48930ea7..6469dbeae7 100644 --- a/components/lwip/linker.lf +++ b/components/lwip/linker.lf @@ -62,7 +62,6 @@ entries: pbuf:pbuf_header_impl (noflash_text) pbuf:pbuf_header (noflash_text) pbuf:pbuf_free (noflash_text) - timeouts:sys_timeouts_mbox_fetch (noflash_text) udp:udp_input_local_match (noflash_text) udp:udp_input (noflash_text) udp:udp_send (noflash_text) diff --git a/components/soc/linker.lf b/components/soc/linker.lf index bf6a5822c7..7c2f7e6ecc 100644 --- a/components/soc/linker.lf +++ b/components/soc/linker.lf @@ -7,7 +7,6 @@ entries: rtc_clk (noflash) rtc_clk_init (noflash_text) rtc_init (noflash_text) - rtc_periph (noflash_text) rtc_pm (noflash_text) rtc_sleep (noflash_text) rtc_time (noflash_text) @@ -21,13 +20,14 @@ entries: spi_flash_hal_iram (noflash) ledc_hal_iram (noflash) i2c_hal_iram (noflash) - spi_flash_hal_gpspi (noflash) lldesc (noflash) cpu_hal (noflash) soc_hal (noflash) wdt_hal_iram (noflash) - systimer_hal (noflash) if TWAI_ISR_IN_IRAM = y: twai_hal_iram (noflash) else: twai_hal_iram (default) + if IDF_TARGET_ESP32 = n: + spi_flash_hal_gpspi (noflash) + systimer_hal (noflash) diff --git a/components/soc/soc/esp32s2/rtc_periph.c b/components/soc/soc/esp32s2/rtc_periph.c index 72b0de6ec5..d95ec54695 100644 --- a/components/soc/soc/esp32s2/rtc_periph.c +++ b/components/soc/soc/esp32s2/rtc_periph.c @@ -11,5 +11,3 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - -#include "soc/rtc_periph.h" diff --git a/components/xtensa/linker.lf b/components/xtensa/linker.lf index a721ac41ba..08fd8ff73b 100644 --- a/components/xtensa/linker.lf +++ b/components/xtensa/linker.lf @@ -2,7 +2,8 @@ archive: libxtensa.a entries: eri (noflash_text) - stdatomic (noflash) + if IDF_TARGET_ESP32S2 = y: + stdatomic (noflash) [mapping:hal] archive: libhal.a diff --git a/tools/ci/check_ldgen_mapping_exceptions.txt b/tools/ci/check_ldgen_mapping_exceptions.txt index 86370cb96e..eebfb1cd7c 100644 --- a/tools/ci/check_ldgen_mapping_exceptions.txt +++ b/tools/ci/check_ldgen_mapping_exceptions.txt @@ -1,2 +1,3 @@ libc sha256_coredump +gcc diff --git a/tools/ci/config/build.yml b/tools/ci/config/build.yml index 5aa2efbadb..d29ebc8d99 100644 --- a/tools/ci/config/build.yml +++ b/tools/ci/config/build.yml @@ -59,7 +59,7 @@ build_ssc_esp32s2: variables: LOG_PATH: "$CI_PROJECT_DIR/log_ut_cmake" PYTHON_VER: 3 - LDGEN_CHECK_MAPPING: 0 + LDGEN_CHECK_MAPPING: 1 script: - export EXTRA_CFLAGS=${PEDANTIC_CFLAGS} - export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS} @@ -82,7 +82,7 @@ build_esp_idf_tests_cmake_esp32s2: extends: .build_template variables: PYTHON_VER: 3 - LDGEN_CHECK_MAPPING: 0 + LDGEN_CHECK_MAPPING: 1 parallel: 10 artifacts: when: always