From 64e99a27cc9b74ce7b9e7cb7e8b4689efd80e4d9 Mon Sep 17 00:00:00 2001 From: "yanxiaoyong.yxy" Date: Tue, 26 Apr 2022 16:49:27 +0800 Subject: [PATCH] m5stackcore2 some libs bss moved from internal dram to spiram. [Detail] none [Verified Cases] Build Pass: Test Pass: --- hardware/board/m5stackcore2/package.yaml | 12 ++++++++++++ hardware/board/nodemcu32s/package.yaml | 14 ++++++++++++++ .../components/esp32/ld/esp32.extram.bss.ld | 2 ++ hardware/chip/espressif_esp32/package.yaml | 13 ------------- 4 files changed, 28 insertions(+), 13 deletions(-) diff --git a/hardware/board/m5stackcore2/package.yaml b/hardware/board/m5stackcore2/package.yaml index b85bfd6895..c8bd4a4d16 100755 --- a/hardware/board/m5stackcore2/package.yaml +++ b/hardware/board/m5stackcore2/package.yaml @@ -22,6 +22,17 @@ board: build_config: libs: - lvgl ? + ldflag: > + -mlongcalls -Wno-frame-address -z muldefs -fno-rtti -lm -lgcc -lstdc++ -lgcov -lc -fno-lto + -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw + -uesp_app_desc -uvfs_include_syscalls_impl -upthread_include_pthread_impl + -upthread_include_pthread_cond_impl -upthread_include_pthread_local_storage_impl -uapp_main + -ucall_user_start_cpu0 -uld_include_panic_highint_hdl -unewlib_include_locks_impl + -unewlib_include_heap_impl -unewlib_include_syscalls_impl -unewlib_include_pthread_impl + -u__cxa_guard_dummy -u__cxx_fatal_exception + -Wl,--cref -Wl,--Map="aos.map" -Wl,--wrap=vPortCleanUpTCB -Wl,--gc-sections -Wl,--undefined=uxTopUsedPriority + -Tesp32.rom.newlib-time.ld -Tesp32.rom.ld -Tesp32.rom.libgcc.ld -Tesp32.rom.newlib-data.ld + -Tesp32.rom.syscalls.ld -Tesp32.rom.newlib-funcs.ld -Tesp32_out.ld -Tesp32.extram.bss.ld -Tesp32.project.ld -Tesp32.peripherals.ld -z muldefs def_config: BOARD_M5STACKCORE2: 1 @@ -48,3 +59,4 @@ def_config: MICROPY_PY_DISPLAY_TFT: 1 MICROPY_PY_DISPLAY_LVGL: 1 CONFIG_UART_CAMERA_ENABLE: 1 + diff --git a/hardware/board/nodemcu32s/package.yaml b/hardware/board/nodemcu32s/package.yaml index 587f45ee5c..5848d23d26 100755 --- a/hardware/board/nodemcu32s/package.yaml +++ b/hardware/board/nodemcu32s/package.yaml @@ -19,6 +19,20 @@ depends: board: chip_name: espressif_esp32 +build_config: + ldflag: > + -mlongcalls -Wno-frame-address -z muldefs -fno-rtti -lm -lgcc -lstdc++ -lgcov -lc -fno-lto + -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw + -uesp_app_desc -uvfs_include_syscalls_impl -upthread_include_pthread_impl + -upthread_include_pthread_cond_impl -upthread_include_pthread_local_storage_impl -uapp_main + -ucall_user_start_cpu0 -uld_include_panic_highint_hdl -unewlib_include_locks_impl + -unewlib_include_heap_impl -unewlib_include_syscalls_impl -unewlib_include_pthread_impl + -u__cxa_guard_dummy -u__cxx_fatal_exception + -Wl,--cref -Wl,--Map="aos.map" -Wl,--wrap=vPortCleanUpTCB -Wl,--gc-sections -Wl,--undefined=uxTopUsedPriority + -Tesp32.rom.newlib-time.ld -Tesp32.rom.ld -Tesp32.rom.libgcc.ld -Tesp32.rom.newlib-data.ld + -Tesp32.rom.syscalls.ld -Tesp32.rom.newlib-funcs.ld -Tesp32_out.ld -Tesp32.project.ld -Tesp32.extram.bss.ld + -Tesp32.peripherals.ld -z muldefs + def_config: BOARD_NODEMCU32S: 1 SYSINFO_MCU: "ESP32" diff --git a/hardware/chip/espressif_esp32/esp-idf/components/esp32/ld/esp32.extram.bss.ld b/hardware/chip/espressif_esp32/esp-idf/components/esp32/ld/esp32.extram.bss.ld index 582f6eb6ea..bda964e50f 100644 --- a/hardware/chip/espressif_esp32/esp-idf/components/esp32/ld/esp32.extram.bss.ld +++ b/hardware/chip/espressif_esp32/esp-idf/components/esp32/ld/esp32.extram.bss.ld @@ -11,6 +11,8 @@ SECTIONS *libnet80211.a:(.dynsbss .sbss .sbss.* .gnu.linkonce.sb.* .scommon .sbss2.* .gnu.linkonce.sb2.* .dynbss .bss .bss.* .share.mem .gnu.linkonce.b.* COMMON) *libpp.a:(.dynsbss .sbss .sbss.* .gnu.linkonce.sb.* .scommon .sbss2.* .gnu.linkonce.sb2.* .dynbss .bss .bss.* .share.mem .gnu.linkonce.b.* COMMON) *liblwip.a:(.dynsbss .sbss .sbss.* .gnu.linkonce.sb.* .scommon .sbss2.* .gnu.linkonce.sb2.* .dynbss .bss .bss.* .share.mem .gnu.linkonce.b.* COMMON) + *liboss.a:(.dynsbss .sbss .sbss.* .gnu.linkonce.sb.* .scommon .sbss2.* .gnu.linkonce.sb2.* .dynbss .bss .bss.* .share.mem .gnu.linkonce.b.* COMMON) + *libota.a:(.dynsbss .sbss .sbss.* .gnu.linkonce.sb.* .scommon .sbss2.* .gnu.linkonce.sb2.* .dynbss .bss .bss.* .share.mem .gnu.linkonce.b.* COMMON) *libbt.a:(EXCLUDE_FILE (libbtdm_app.a) .dynsbss .sbss .sbss.* .gnu.linkonce.sb.* .scommon .sbss2.* .gnu.linkonce.sb2.* .dynbss .bss .bss.* .share.mem .gnu.linkonce.b.* COMMON) . = ALIGN(4); _ext_ram_bss_end = ABSOLUTE(.); diff --git a/hardware/chip/espressif_esp32/package.yaml b/hardware/chip/espressif_esp32/package.yaml index 35736e1b72..c24687b614 100644 --- a/hardware/chip/espressif_esp32/package.yaml +++ b/hardware/chip/espressif_esp32/package.yaml @@ -41,19 +41,6 @@ build_config: cxxflag: > -mlongcalls -Wno-frame-address -Wno-clobbered -Wno-deprecated-declarations -Wno-missing-field-initializers -std=gnu++11 -fno-exceptions -fno-rtti -fno-tree-switch-conversion -fno-jump-tables -fpermissive -DKERNEL=FREERTOS - ldflag: > - -mlongcalls -Wno-frame-address -z muldefs -fno-rtti -lm -lgcc -lstdc++ -lgcov -lc -fno-lto - -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw - -uesp_app_desc -uvfs_include_syscalls_impl -upthread_include_pthread_impl - -upthread_include_pthread_cond_impl -upthread_include_pthread_local_storage_impl -uapp_main - -ucall_user_start_cpu0 -uld_include_panic_highint_hdl -unewlib_include_locks_impl - -unewlib_include_heap_impl -unewlib_include_syscalls_impl -unewlib_include_pthread_impl - -u__cxa_guard_dummy -u__cxx_fatal_exception - -Wl,--cref -Wl,--Map="aos.map" -Wl,--wrap=vPortCleanUpTCB -Wl,--gc-sections -Wl,--undefined=uxTopUsedPriority - -Tesp32.rom.newlib-time.ld -Tesp32.rom.ld -Tesp32.rom.libgcc.ld -Tesp32.rom.newlib-data.ld - -Tesp32.rom.syscalls.ld -Tesp32.rom.newlib-funcs.ld -Tesp32_out.ld -Tesp32.project.ld -Tesp32.extram.bss.ld - -Tesp32.peripherals.ld -z muldefs - include: - esp-idf/components/esp_ringbuf/include - esp-idf/components/newlib/platform_include -- GitLab