Skip to content

Commit

Permalink
Merge branch 'espressif:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Jan 5, 2024
2 parents 3d36ab8 + 5524b69 commit ae2f6a9
Show file tree
Hide file tree
Showing 396 changed files with 14,735 additions and 5,003 deletions.
1 change: 1 addition & 0 deletions .gitlab/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
/examples/cxx/ @esp-idf-codeowners/system
/examples/ethernet/ @esp-idf-codeowners/network
/examples/get-started/ @esp-idf-codeowners/system
/examples/ieee802154/ @esp-idf-codeowners/ieee802154
/examples/mesh/ @esp-idf-codeowners/wifi
/examples/network/ @esp-idf-codeowners/network @esp-idf-codeowners/wifi
/examples/openthread/ @esp-idf-codeowners/ieee802154
Expand Down
26 changes: 26 additions & 0 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ build_pytest_examples_esp32h2:
IDF_TARGET: esp32h2
TEST_DIR: examples

build_pytest_examples_esp32p4:
extends:
- .build_pytest_no_jtag_template
- .rules:build:example_test-esp32p4
parallel: 2
variables:
IDF_TARGET: esp32p4
TEST_DIR: examples

build_pytest_examples_jtag: # for all targets
extends:
- .build_pytest_jtag_template
Expand Down Expand Up @@ -251,6 +260,15 @@ build_pytest_components_esp32h2:
IDF_TARGET: esp32h2
TEST_DIR: components

build_pytest_components_esp32p4:
extends:
- .build_pytest_template
- .rules:build:component_ut-esp32p4
parallel: 4
variables:
IDF_TARGET: esp32p4
TEST_DIR: components

build_only_components_apps:
extends:
- .build_cmake_template
Expand Down Expand Up @@ -324,6 +342,14 @@ build_pytest_test_apps_esp32h2:
IDF_TARGET: esp32h2
TEST_DIR: tools/test_apps

build_pytest_test_apps_esp32p4:
extends:
- .build_pytest_template
- .rules:build:custom_test-esp32p4
variables:
IDF_TARGET: esp32p4
TEST_DIR: tools/test_apps

build_only_tools_test_apps:
extends:
- .build_cmake_template
Expand Down
4 changes: 2 additions & 2 deletions .gitlab/ci/default-build-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
extra_default_build_targets:
- esp32p4

bypass_check_test_targets:
- esp32p4
# bypass_check_test_targets:
# - esp32p4
#
# These lines would
# - enable the README.md check for esp32c6. Don't forget to add the build jobs in .gitlab/ci/build.yml
Expand Down
1 change: 1 addition & 0 deletions .gitlab/ci/pre_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ check_pre_commit:
script:
- fetch_submodules
- pre-commit run --files $MODIFIED_FILES
- pre-commit run --hook-stage post-commit validate-sbom-manifest

check_version:
# Don't run this for feature/bugfix branches, so that it is possible to modify
Expand Down
116 changes: 104 additions & 12 deletions .gitlab/ci/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,44 @@
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32p4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32p4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
- <<: *if-dev-push
changes: *patterns-component_ut-flash_multi
- <<: *if-dev-push
changes: *patterns-component_ut-i154
- <<: *if-dev-push
changes: *patterns-component_ut-nvs_encr_hmac
- <<: *if-dev-push
changes: *patterns-component_ut-sdio
- <<: *if-dev-push
changes: *patterns-component_ut-usb
- <<: *if-dev-push
changes: *patterns-component_ut-wifi
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:component_ut-esp32s2:
rules:
- <<: *if-revert-branch
Expand Down Expand Up @@ -1069,6 +1107,32 @@
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test-esp32p4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32p4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-custom_test
- <<: *if-dev-push
changes: *patterns-custom_test-wifi
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-adc
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
- <<: *if-dev-push
changes: *patterns-target_test-wifi

.rules:build:custom_test-esp32s2:
rules:
- <<: *if-revert-branch
Expand Down Expand Up @@ -1830,20 +1894,20 @@
- <<: *if-dev-push
changes: *patterns-target_test-adc

.rules:test:component_ut-esp32c6-i154:
.rules:test:component_ut-esp32h2:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut-i154
changes: *patterns-component_ut

.rules:test:component_ut-esp32h2:
.rules:test:component_ut-esp32h2-adc:
rules:
- <<: *if-revert-branch
when: never
Expand All @@ -1854,9 +1918,11 @@
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut
changes: *patterns-component_ut-adc
- <<: *if-dev-push
changes: *patterns-target_test-adc

.rules:test:component_ut-esp32h2-adc:
.rules:test:component_ut-esp32h2-ecdsa:
rules:
- <<: *if-revert-branch
when: never
Expand All @@ -1867,22 +1933,20 @@
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut-adc
- <<: *if-dev-push
changes: *patterns-target_test-adc
changes: *patterns-target_test-ecdsa

.rules:test:component_ut-esp32h2-ecdsa:
.rules:test:component_ut-esp32p4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32p4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-target_test-ecdsa
changes: *patterns-component_ut

.rules:test:component_ut-esp32s2:
rules:
Expand Down Expand Up @@ -2102,6 +2166,19 @@
- <<: *if-dev-push
changes: *patterns-custom_test

.rules:test:custom_test-esp32p4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32p4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-custom_test

.rules:test:custom_test-esp32s2:
rules:
- <<: *if-revert-branch
Expand Down Expand Up @@ -2438,6 +2515,21 @@
- <<: *if-dev-push
changes: *patterns-target_test-adc

.rules:test:example_test-esp32p4:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32p4
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
changes: *patterns-example_test

.rules:test:example_test-esp32s2:
rules:
- <<: *if-revert-branch
Expand Down
36 changes: 32 additions & 4 deletions .gitlab/ci/target-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,15 @@ pytest_examples_esp32h2_generic:
artifacts: false
tags: [ esp32h2, generic ]

pytest_examples_esp32p4_generic:
extends:
- .pytest_examples_dir_template
- .rules:test:example_test-esp32p4
needs:
- job: build_pytest_examples_esp32p4
artifacts: false
tags: [ esp32p4, generic ]

pytest_examples_esp32_ethernet_ota:
extends:
- .pytest_examples_dir_template
Expand Down Expand Up @@ -1253,6 +1262,16 @@ pytest_components_esp32h2_generic:
tags: [ esp32h2, generic ]
parallel: 2

pytest_components_esp32p4_generic:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32p4
needs:
- job: build_pytest_components_esp32p4
artifacts: false
tags: [ esp32p4, generic ]
parallel: 2

pytest_components_esp32h2_generic_multi_device:
extends:
- .pytest_components_dir_template
Expand Down Expand Up @@ -1306,12 +1325,12 @@ pytest_components_esp32c6_adc:
artifacts: false
tags: [ esp32c6, adc ]

pytest_components_esp32c6_i154:
pytest_examples_esp32c6_i154:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32c6-i154
- .pytest_examples_dir_template
- .rules:test:example_test-esp32c6
needs:
- job: build_pytest_components_esp32c6
- job: build_pytest_examples_esp32c6
artifacts: false
tags: [ esp32c6, ieee802154 ]

Expand Down Expand Up @@ -1522,6 +1541,15 @@ pytest_test_apps_esp32h2_generic:
artifacts: false
tags: [ esp32h2, generic ]

pytest_test_apps_esp32p4_generic:
extends:
- .pytest_test_apps_dir_template
- .rules:test:custom_test-esp32p4
needs:
- job: build_pytest_test_apps_esp32p4
artifacts: false
tags: [ esp32p4, generic ]

pytest_test_apps_esp32s3_mspi_f8r8:
extends:
- .pytest_test_apps_dir_template
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ repos:
- id: check-copyright
args: ['--ignore', 'tools/ci/check_copyright_ignore.txt', '--config', 'tools/ci/check_copyright_config.yaml']
- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.4.1
rev: v1.6.0
hooks:
- id: conventional-precommit-linter
stages: [commit-msg]
Expand Down
2 changes: 1 addition & 1 deletion components/app_update/test_apps/pytest_app_update_ut.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def run_multiple_stages(dut: Dut, test_case_num: int, stages: int) -> None:


@pytest.mark.supported_targets
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2'], reason='c6/h2 support TBD')
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2', 'esp32p4'], reason='c6/h2/p4 support TBD') # TODO: IDF-8959
@pytest.mark.generic
def test_app_update(dut: Dut) -> None:
extra_data = dut.parse_test_menu()
Expand Down
16 changes: 14 additions & 2 deletions components/bootloader_support/src/bootloader_clock_init.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down Expand Up @@ -86,6 +86,7 @@ __attribute__((weak)) void bootloader_clock_configure(void)
}
#endif // CONFIG_ESP_SYSTEM_RTC_EXT_XTAL

// TODO: IDF-8938 Need refactor! Does not belong to clock configuration.
#if CONFIG_IDF_TARGET_ESP32C6
// CLR ENA
CLEAR_PERI_REG_MASK(LP_WDT_INT_ENA_REG, LP_WDT_SUPER_WDT_INT_ENA); /* SWD */
Expand Down Expand Up @@ -113,7 +114,18 @@ __attribute__((weak)) void bootloader_clock_configure(void)
SET_PERI_REG_MASK(PMU_HP_INT_CLR_REG, PMU_SOC_WAKEUP_INT_CLR); /* SLP_REJECT */
SET_PERI_REG_MASK(PMU_HP_INT_CLR_REG, PMU_SOC_SLEEP_REJECT_INT_CLR); /* SLP_WAKEUP */
#elif CONFIG_IDF_TARGET_ESP32P4
// TODO: IDF-8008
// CLR ENA
CLEAR_PERI_REG_MASK(LP_WDT_INT_ENA_REG, LP_WDT_SUPER_WDT_INT_ENA); /* SWD */
CLEAR_PERI_REG_MASK(LP_TIMER_LP_INT_ENA_REG, LP_TIMER_MAIN_TIMER_LP_INT_ENA); /* MAIN_TIMER */
CLEAR_PERI_REG_MASK(LP_ANALOG_PERI_LP_INT_ENA_REG, LP_ANALOG_PERI_BOD_MODE0_LP_INT_ENA); /* BROWN_OUT */
CLEAR_PERI_REG_MASK(LP_WDT_INT_ENA_REG, LP_WDT_LP_WDT_INT_ENA); /* WDT */
CLEAR_PERI_REG_MASK(PMU_HP_INT_ENA_REG, PMU_SOC_WAKEUP_INT_ENA); /* SLP_REJECT */
CLEAR_PERI_REG_MASK(PMU_HP_INT_ENA_REG, PMU_SOC_SLEEP_REJECT_INT_ENA); /* SLP_WAKEUP */
// SET CLR
SET_PERI_REG_MASK(LP_WDT_INT_CLR_REG, LP_WDT_SUPER_WDT_INT_CLR); /* SWD */
SET_PERI_REG_MASK(LP_TIMER_LP_INT_CLR_REG, LP_TIMER_MAIN_TIMER_LP_INT_CLR); /* MAIN_TIMER */
SET_PERI_REG_MASK(LP_ANALOG_PERI_LP_INT_CLR_REG, LP_ANALOG_PERI_LP_INT_CLR_REG); /* BROWN_OUT */
SET_PERI_REG_MASK(LP_WDT_INT_CLR_REG, LP_WDT_LP_WDT_INT_CLR); /* WDT */
#else
REG_WRITE(RTC_CNTL_INT_ENA_REG, 0);
REG_WRITE(RTC_CNTL_INT_CLR_REG, UINT32_MAX);
Expand Down
6 changes: 3 additions & 3 deletions components/bootloader_support/src/bootloader_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "esp32s2/rom/usb/usb_common.h"
#endif
#if SOC_USB_SERIAL_JTAG_SUPPORTED
#include "hal/usb_phy_ll.h"
#include "hal/usb_fsls_phy_ll.h"
#endif
#include "esp_rom_gpio.h"
#include "esp_rom_uart.h"
Expand Down Expand Up @@ -106,8 +106,8 @@ void bootloader_console_init(void)
esp_rom_uart_set_as_console(ESP_ROM_USB_OTG_NUM);
esp_rom_install_channel_putc(1, bootloader_console_write_char_usb);
#if SOC_USB_SERIAL_JTAG_SUPPORTED
usb_phy_ll_usb_wrap_pad_enable(&USB_WRAP, true);
usb_phy_ll_int_otg_enable(&USB_WRAP);
usb_fsls_phy_ll_usb_wrap_pad_enable(&USB_WRAP, true);
usb_fsls_phy_ll_int_otg_enable(&USB_WRAP);
#endif
}
#endif //CONFIG_ESP_CONSOLE_USB_CDC
Expand Down
Loading

0 comments on commit ae2f6a9

Please sign in to comment.