Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/idf-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ jobs:
path: platforms/tab5
command: idf.py build

- name: Size report
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.4.2
target: esp32p4
path: platforms/tab5
command: >-
bash -lc "idf.py size && idf.py size-components && (idf.py size-files || true)"

# Optional: show the auto-generated flash args for reference in logs
- name: Show flash args
if: always()
Expand Down
5 changes: 5 additions & 0 deletions platforms/tab5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ set(EXTRA_COMPONENT_DIRS
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(m5tab5_userdemo)

# Disable the linker flag added for non-contiguous SRAM regions to avoid
# discarding large .bss sections from the C++ runtime when linking the
# oversized factory app image.
idf_build_set_property(LINK_OPTIONS "-Wl,--no-enable-non-contiguous-regions" APPEND)
21 changes: 0 additions & 21 deletions platforms/tab5/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,3 @@ idf_component_register(
sensor_bmi270 espressif__usb_host_hid usb imlib json
EMBED_TXTFILES "../audio/canon_in_d.mp3" "../audio/startup_sfx.mp3" "../audio/shutdown_sfx.mp3")

set(CUSTOM_ASSETS_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../custom/assets")
get_filename_component(CUSTOM_ASSETS_DIR "${CUSTOM_ASSETS_DIR}" REALPATH)

set(CUSTOM_ASSETS_IMAGE_ROOT "${CMAKE_CURRENT_BINARY_DIR}/spiffs_custom_assets")
set(CUSTOM_ASSETS_STAMP "${CUSTOM_ASSETS_IMAGE_ROOT}/.staged")
file(GLOB_RECURSE CUSTOM_ASSET_FILES CONFIGURE_DEPENDS LIST_DIRECTORIES false
"${CUSTOM_ASSETS_DIR}/*")

add_custom_command(
OUTPUT "${CUSTOM_ASSETS_STAMP}"
COMMAND ${CMAKE_COMMAND} -E rm -rf "${CUSTOM_ASSETS_IMAGE_ROOT}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${CUSTOM_ASSETS_IMAGE_ROOT}/custom"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CUSTOM_ASSETS_DIR}"
"${CUSTOM_ASSETS_IMAGE_ROOT}/custom/assets"
COMMAND ${CMAKE_COMMAND} -E touch "${CUSTOM_ASSETS_STAMP}"
DEPENDS ${CUSTOM_ASSET_FILES}
COMMENT "Staging custom assets for SPIFFS image"
)

spiffs_create_partition_image(storage "${CUSTOM_ASSETS_IMAGE_ROOT}" FLASH_IN_PROJECT
DEPENDS "${CUSTOM_ASSETS_STAMP}")
5 changes: 5 additions & 0 deletions platforms/tab5/partitions_no_ota_16mb.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ESP-IDF Partition Table — Single factory app, no OTA (16MB flash)
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000
phy_init, data, phy, 0xF000, 0x1000
factory, app, factory, 0x10000, 0xFF0000
2 changes: 2 additions & 0 deletions platforms/tab5/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_no_ota_16mb.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_no_ota_16mb.csv"
Comment on lines 2 to +6
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Update sdkconfig to use new 16MB partition table

The defaults now reference partitions_no_ota_16mb.csv, but the committed sdkconfig still points to partitions.csv (10MB factory plus SPIFFS). Because idf.py uses the checked-in sdkconfig, CI and local builds will keep the old partition layout while the build scripts no longer stage SPIFFS assets. If the factory image grows past 10 MB, the build will still fail with a partition overflow despite the new table existing. Regenerate platforms/tab5/sdkconfig or adjust it to use the 16 MB CSV so the larger layout is actually applied.

Useful? React with 👍 / 👎.

CONFIG_I2C_ENABLE_LEGACY_DRIVERS=n
CONFIG_I2C_SKIP_LEGACY_CONFLICT_CHECK=y
CONFIG_COMPILER_OPTIMIZATION_PERF=y
Expand Down
Loading