-
-
Notifications
You must be signed in to change notification settings - Fork 185
Update to IDF 5.4.2 and add basic ESP32_P4 support #3152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AdrianSoundy
wants to merge
39
commits into
nanoframework:main
Choose a base branch
from
AdrianSoundy:IDF5_4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
099c96e
Update to IDF 5.4.1 and add basic ESP32_P4
AdrianSoundy 800ba69
Code style fixes
nfbot 54788dc
Fix Coderabbit issues and add P4 to Azure build
AdrianSoundy df02c9a
Add back mbedtls_xxx for some STM32 targets
AdrianSoundy d3146c6
Update patch version and python env for dockers
AdrianSoundy 0d90296
Add libusb to docker for openocd
AdrianSoundy d883b97
Work around for ESP_ROM_ELF_DIR issue
AdrianSoundy 25ce6f4
Correcting typos
josesimoes 250f3fd
Resolve smoketest builds, header not found
AdrianSoundy ef76ed0
IDF 5_4_1 patch test
AdrianSoundy 13c0a4d
Updates from review part 1
AdrianSoundy 735562d
Updates for review part 2
AdrianSoundy 780dbd6
Ethernet and build rework
AdrianSoundy 92d8787
Update Component registry versions to latest
AdrianSoundy a4f373c
Update Graphics_Memory.cpp code to same version for all ESP targets
AdrianSoundy d6fd18d
Add extra p4 config for latest hosted component
AdrianSoundy 5688c45
Update P4 config & readme
AdrianSoundy 638bd4f
Change Wifi-remote & esp_hosted component versions used
AdrianSoundy aefc820
Update sdkconfig.default.esp32p4
AdrianSoundy 1ad0ce2
Add Wi-Fi Remote config for better performance on p4
AdrianSoundy fe74b8c
Initial ESP32_C5 build + Build diagnostic message
AdrianSoundy ddbf89a
Add ESP_IDF_VERSION to p4 environment as test
AdrianSoundy 575aebb
Update to IDF 5.4.1 and add basic ESP32_P4
AdrianSoundy 636fb04
Fix Coderabbit issues and add P4 to Azure build
AdrianSoundy 01d9cf6
Add back mbedtls_xxx for some STM32 targets
AdrianSoundy a8c8989
Work around for ESP_ROM_ELF_DIR issue
AdrianSoundy e296041
Resolve smoketest builds, header not found
AdrianSoundy 8616cdf
IDF 5_4_1 patch test
AdrianSoundy a1271fc
Updates from review part 1
AdrianSoundy 4077404
Updates for review part 2
AdrianSoundy 2d449b2
Add extra p4 config for latest hosted component
AdrianSoundy ad20f01
Update P4 config & readme
AdrianSoundy 05efb83
Update to IDF 5.4.2
AdrianSoundy 6ce22d7
Code style fixes
nfbot d448df2
Merge pull request #10 from nanoframework/nfbot/clang-format-fix/8d2f…
AdrianSoundy ddc2979
Fix Issues from testing
AdrianSoundy 3f0ae4c
Merge branch 'IDF5_4' of https://github.com/AdrianSoundy/nf-interpret…
AdrianSoundy a99227d
Merge branch 'main' into IDF5_4
AdrianSoundy 3f1d844
Suggestions from coderabitai
AdrianSoundy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# | ||
# Copyright (c) .NET Foundation and Contributors | ||
# See LICENSE file in the project root for full license information. | ||
# | ||
|
||
# need to specify linker flags here | ||
set(CMAKE_EXE_LINKER_FLAGS " -Wl,--print-memory-usage " CACHE INTERNAL "executable linker flags") | ||
|
||
# TARGET parameter to set the target that's setting them for | ||
# optional EXTRA_COMPILE_OPTIONS with compile options to be added | ||
macro(nf_set_compile_options) | ||
|
||
# parse arguments | ||
cmake_parse_arguments(NFSCO "" "TARGET" "EXTRA_COMPILE_OPTIONS" ${ARGN}) | ||
|
||
if(NOT NFSCO_TARGET OR "${NFSCO_TARGET}" STREQUAL "") | ||
message(FATAL_ERROR "Need to set TARGET argument when calling nf_set_compile_options()") | ||
endif() | ||
|
||
# include any extra options coming from any extra args? | ||
target_compile_options(${NFSCO_TARGET} PUBLIC ${NFSCO_EXTRA_COMPILE_OPTIONS} -Wall -Wextra -Werror -Wno-sign-compare -Wno-unused-parameter -Wshadow -Wimplicit-fallthrough -fshort-wchar -fno-builtin -fno-common -fno-exceptions -fcheck-new ) | ||
|
||
# this series has FPU | ||
target_compile_definitions(${NFSCO_TARGET} PUBLIC -DTARGET=esp32c6 -DUSE_FPU=TRUE -DPLATFORM_ESP32 -DESP_PLATFORM) | ||
|
||
endmacro() | ||
|
||
# TARGET parameter to set the target that's setting them for | ||
# optional EXTRA_LINK_FLAGS with link flags to be added | ||
macro(nf_set_link_options) | ||
|
||
# parse arguments | ||
cmake_parse_arguments(NFSLO "" "TARGET;EXTRA_LINK_FLAGS" "" ${ARGN}) | ||
|
||
if(NOT NFSLO_TARGET OR "${NFSLO_TARGET}" STREQUAL "") | ||
message(FATAL_ERROR "Need to set TARGET argument when calling nf_set_link_options()") | ||
endif() | ||
|
||
# set optimization linker flags for RELEASE and MinSizeRel | ||
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") | ||
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os ") | ||
endif() | ||
|
||
# include libraries in build | ||
nf_include_libraries_in_build(${NFSLO_TARGET}) | ||
|
||
# set extra linker flags | ||
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " ${NFSLO_EXTRA_LINK_FLAGS} ") | ||
|
||
# set optimization flags | ||
nf_set_optimization_options(${NFSLO_TARGET}) | ||
|
||
endmacro() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# | ||
# Copyright (c) .NET Foundation and Contributors | ||
# See LICENSE file in the project root for full license information. | ||
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# | ||
# Copyright (c) .NET Foundation and Contributors | ||
# See LICENSE file in the project root for full license information. | ||
# | ||
|
||
# need to specify linker flags here | ||
set(CMAKE_EXE_LINKER_FLAGS " -Wl,--print-memory-usage " CACHE INTERNAL "executable linker flags") | ||
|
||
# TARGET parameter to set the target that's setting them for | ||
# optional EXTRA_COMPILE_OPTIONS with compile options to be added | ||
macro(nf_set_compile_options) | ||
|
||
# parse arguments | ||
cmake_parse_arguments(NFSCO "" "TARGET" "EXTRA_COMPILE_OPTIONS" ${ARGN}) | ||
|
||
if(NOT NFSCO_TARGET OR "${NFSCO_TARGET}" STREQUAL "") | ||
message(FATAL_ERROR "Need to set TARGET argument when calling nf_set_compile_options()") | ||
endif() | ||
|
||
# include any extra options coming from any extra args? | ||
target_compile_options(${NFSCO_TARGET} PUBLIC ${NFSCO_EXTRA_COMPILE_OPTIONS} -Wall -Wextra -Werror -Wno-sign-compare -Wno-unused-parameter -Wshadow -Wimplicit-fallthrough -fshort-wchar -fno-builtin -fno-common -fno-exceptions -fcheck-new ) | ||
|
||
# this series has FPU | ||
target_compile_definitions(${NFSCO_TARGET} PUBLIC -DTARGET=esp32p4 -DUSE_FPU=TRUE -DPLATFORM_ESP32 -DESP_PLATFORM) | ||
|
||
endmacro() | ||
|
||
# TARGET parameter to set the target that's setting them for | ||
# optional EXTRA_LINK_FLAGS with link flags to be added | ||
macro(nf_set_link_options) | ||
|
||
# parse arguments | ||
cmake_parse_arguments(NFSLO "" "TARGET;EXTRA_LINK_FLAGS" "" ${ARGN}) | ||
|
||
if(NOT NFSLO_TARGET OR "${NFSLO_TARGET}" STREQUAL "") | ||
message(FATAL_ERROR "Need to set TARGET argument when calling nf_set_link_options()") | ||
endif() | ||
|
||
# set optimization linker flags for RELEASE and MinSizeRel | ||
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") | ||
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -Os ") | ||
endif() | ||
|
||
# include libraries in build | ||
nf_include_libraries_in_build(${NFSLO_TARGET}) | ||
|
||
# set extra linker flags | ||
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " ${NFSLO_EXTRA_LINK_FLAGS} ") | ||
|
||
# set optimization flags | ||
nf_set_optimization_options(${NFSLO_TARGET}) | ||
|
||
endmacro() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# | ||
# Copyright (c) .NET Foundation and Contributors | ||
# See LICENSE file in the project root for full license information. | ||
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,6 +151,7 @@ macro(nf_fix_esp32c3_rom_file) | |
|
||
endmacro() | ||
|
||
|
||
# setting compile definitions for a target based on general build options | ||
# TARGET parameter to set the target that's setting them for | ||
# optional EXTRA_COMPILE_DEFINITIONS with compiler definitions to be added to the library | ||
|
@@ -184,7 +185,7 @@ function(nf_set_esp32_target_series) | |
set(TARGET_SERIES_SHORT ${TARGET_SERIES_2} CACHE INTERNAL "ESP32 target series lower case, short version") | ||
|
||
# set the CPU type | ||
if(${TARGET_SERIES_SHORT} STREQUAL "esp32c3" OR ${TARGET_SERIES_SHORT} STREQUAL "esp32c6" OR ${TARGET_SERIES_SHORT} STREQUAL "esp32h2" ) | ||
if(${TARGET_SERIES_SHORT} STREQUAL "esp32c3" OR ${TARGET_SERIES_SHORT} STREQUAL "esp32c5" OR ${TARGET_SERIES_SHORT} STREQUAL "esp32c6" OR ${TARGET_SERIES_SHORT} STREQUAL "esp32h2" OR ${TARGET_SERIES_SHORT} STREQUAL "esp32p4") | ||
set(ESP32_CPU_TYPE "riscv" CACHE INTERNAL "Setting CPU type") | ||
else() | ||
set(ESP32_CPU_TYPE "xtensa" CACHE INTERNAL "Setting CPU type") | ||
|
@@ -466,8 +467,10 @@ macro(nf_setup_partition_tables_generator) | |
|
||
if(${TARGET_SERIES_SHORT} STREQUAL "esp32" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32c3" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32c5" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32c6" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32h2" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32p4" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32s2" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32s3") | ||
|
||
|
@@ -481,7 +484,9 @@ macro(nf_setup_partition_tables_generator) | |
endif() | ||
|
||
if(${TARGET_SERIES_SHORT} STREQUAL "esp32" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32c5" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32c6" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32p4" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32s2" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32s3") | ||
|
||
|
@@ -501,7 +506,8 @@ macro(nf_setup_partition_tables_generator) | |
|
||
endif() | ||
|
||
if(${TARGET_SERIES_SHORT} STREQUAL "esp32s3") | ||
if(${TARGET_SERIES_SHORT} STREQUAL "esp32s3" OR | ||
${TARGET_SERIES_SHORT} STREQUAL "esp32p4") | ||
|
||
# 32MB partition table for ESP32_S3 | ||
add_custom_command( TARGET ${NANOCLR_PROJECT_NAME}.elf POST_BUILD | ||
|
@@ -594,11 +600,16 @@ macro(nf_add_idf_as_library) | |
# Load any required Components from Component registry | ||
# Must be done before "tools/cmake/idf.cmake" | ||
if(ESP32_USB_CDC) | ||
nf_install_idf_component_from_registry(tinyusb 55142eec-a3a4-47a5-ad01-4ba3ef44444b) | ||
nf_install_idf_component_from_registry(esp_tinyusb 8115ffc9-366a-4340-94ab-e327aed20831) | ||
nf_install_idf_component_from_registry(tinyusb c384401d-144d-453d-a821-20f1ba0a7be1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They've changed the GUIDs again?!? 😰 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I am not mistaken the guid will change when the version number of the component changes. |
||
nf_install_idf_component_from_registry(esp_tinyusb 47b2b1fc-fb7e-4acf-943b-a14125e0f1e7) | ||
endif() | ||
|
||
nf_install_idf_component_from_registry(littlefs 4831aa41-8b72-48ac-a534-910a985a5519) | ||
nf_install_idf_component_from_registry(littlefs 288ff2e7-dfd9-4833-9be5-6e9d37d29880) | ||
|
||
if(${TARGET_SERIES_SHORT} STREQUAL "esp32p4") | ||
nf_install_idf_component_from_registry(esp_wifi_remote 3355c7e4-03ac-44a2-b100-1cbb29a05d03) | ||
nf_install_idf_component_from_registry(esp_hosted 9fb39051-7a32-4fbf-83e9-a4b54ab6fae5) | ||
endif() | ||
|
||
include(${IDF_PATH_CMAKED}/tools/cmake/idf.cmake) | ||
|
||
|
@@ -611,6 +622,7 @@ macro(nf_add_idf_as_library) | |
message(FATAL_ERROR "Couldn't get IDF version from target __idf_build_target") | ||
endif() | ||
|
||
message(STATUS "ESP_IDF_VERSION: $ENV{ESP_IDF_VERSION}") | ||
message(STATUS "Current IDF version is: ${MY_IDF_VER}") | ||
|
||
string(FIND ${MY_IDF_VER} "-dirty" MY_IDF_VER_DIRTY) | ||
|
@@ -670,7 +682,6 @@ macro(nf_add_idf_as_library) | |
freertos | ||
esptool_py | ||
fatfs | ||
esp_wifi | ||
esp_event | ||
vfs | ||
esp_netif | ||
|
@@ -686,7 +697,6 @@ macro(nf_add_idf_as_library) | |
idf::freertos | ||
idf::esptool_py | ||
idf::fatfs | ||
idf::esp_wifi | ||
idf::esp_event | ||
idf::vfs | ||
idf::esp_netif | ||
|
@@ -695,6 +705,17 @@ macro(nf_add_idf_as_library) | |
idf::littlefs | ||
) | ||
|
||
# Needed for remote Wifi module on P4 boards | ||
if(${TARGET_SERIES_SHORT} STREQUAL "esp32p4") | ||
list(APPEND IDF_COMPONENTS_TO_ADD esp_wifi_remote) | ||
list(APPEND IDF_COMPONENTS_TO_ADD esp_hosted) | ||
list(APPEND IDF_LIBRARIES_TO_ADD idf::esp_hosted) | ||
list(APPEND IDF_LIBRARIES_TO_ADD idf::esp_wifi_remote) | ||
else() | ||
list(APPEND IDF_COMPONENTS_TO_ADD esp_wifi) | ||
list(APPEND IDF_LIBRARIES_TO_ADD idf::esp_wifi) | ||
endif() | ||
|
||
if(HAL_USE_BLE_OPTION) | ||
list(APPEND IDF_COMPONENTS_TO_ADD bt) | ||
list(APPEND IDF_LIBRARIES_TO_ADD idf::bt) | ||
|
@@ -1035,8 +1056,8 @@ macro(nf_add_idf_as_library) | |
add_custom_command( | ||
TARGET ${NANOCLR_PROJECT_NAME}.elf POST_BUILD | ||
COMMAND ${output_idf_size} | ||
--archives --target ${TARGET_SERIES_SHORT} ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.map | ||
COMMENT "Ouptut IDF size summary") | ||
--archives ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.map | ||
COMMENT "Output IDF size summary") | ||
|
||
endmacro() | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.