diff --git a/arch/Kconfig b/arch/Kconfig index 0615a53b71e..c09407d8903 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -697,10 +697,19 @@ config ARCH_NUSER_INTERRUPTS # Bring-up debug configuration options. These are only intended for low level # bring-up and not part of normal platform configuration. They should never be -# selected in a "normal" configuration and, hence, depend on EXPERIMENTAL +# selected in a "normal" configuration and, hence, depend on both EXPERIMENTAL +# and DEBUG_FEATURES. menu "Bring-Up Options" - depends on EXPERIMENTAL + depends on EXPERIMENTAL && DEBUG_FEATURES + +config SUPPRESS_CLOCK_CONFIG + bool "Suppress clock configuration" + default n + depends on ARCH_XTENSA + ---help--- + Do not configure clocking. Instead relies on the reset clock + configuration (or clock configuration provided by a bootloader). config SUPPRESS_INTERRUPTS bool "Suppress all interrupts" diff --git a/configs/esp32-core/README.txt b/configs/esp32-core/README.txt index f7ade81f147..11718f965fb 100644 --- a/configs/esp32-core/README.txt +++ b/configs/esp32-core/README.txt @@ -16,7 +16,6 @@ README for the Expressif ESP32 Core board (V2) Contents ======== - o STATUS o ESP32 Features o ESP32 Toolchain o Memory Map @@ -31,7 +30,19 @@ Contents STATUS ====== - The basic port is underway. No testing has yet been performed. + Currently, the NuttX port depends on the bootloader to initialize hardware, + including basic (slow) clocking. That is because the clock configuration + logic is only available via an Espressif add-on library. + + Because of this, all board configurations require these settings: + + CONFIG_EXPERIMENTAL=y + CONFIG_DEBUG_FEATURES=y + CONFIG_SUPPRESS_CLOCK_CONFIG=y + + Some configurations may also require: + + CONFIG_SUPPRESS_UART_CONFIG=y ESP32 Features ============== @@ -527,22 +538,11 @@ OpenOCD for the ESP32 CONFIG_DEBUG_SYMBOLS=y CONFIG_ESP32CORE_RUN_IRAM=y - I also made this change which will eliminate all attempts to re-configure - serial. It will just use the serial settings as they were left by the - bootloader: + I also made this change configuration which will eliminate all attempts to + re-configure serial. It will just use the serial settings as they were left + by the bootloader: - diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h - index 422ec0b..8707d7c 100644 - --- a/arch/xtensa/src/common/xtensa.h - +++ b/arch/xtensa/src/common/xtensa.h - @@ -60,7 +60,7 @@ - #undef CONFIG_SUPPRESS_INTERRUPTS /* DEFINED: Do not enable interrupts */ - #undef CONFIG_SUPPRESS_TIMER_INTS /* DEFINED: No timer */ - #undef CONFIG_SUPPRESS_SERIAL_INTS /* DEFINED: Console will poll */ - -#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfigure UART */ - +#define CONFIG_SUPPRESS_UART_CONFIG 1 /* DEFINED: Do not reconfigure UART */ - #define CONFIG_SUPPRESS_CLOCK_CONFIG 1 /* DEFINED: Do not reconfigure clocking */ - #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ + CONFIG_SUPPRESS_UART_CONFIG=y Start OpenOCD: @@ -735,18 +735,11 @@ Things to Do This will use the serial port settings as left by the preceding bootloader: - diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h - index 422ec0b..8707d7c 100644 - --- a/arch/xtensa/src/common/xtensa.h - +++ b/arch/xtensa/src/common/xtensa.h - @@ -60,7 +60,7 @@ - #undef CONFIG_SUPPRESS_INTERRUPTS /* DEFINED: Do not enable interrupts */ - #undef CONFIG_SUPPRESS_TIMER_INTS /* DEFINED: No timer */ - #undef CONFIG_SUPPRESS_SERIAL_INTS /* DEFINED: Console will poll */ - -#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfigure UART */ - +#define CONFIG_SUPPRESS_UART_CONFIG 1 /* DEFINED: Do not reconfigure UART */ - #define CONFIG_SUPPRESS_CLOCK_CONFIG 1 /* DEFINED: Do not reconfigure clocking */ - #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */ + I also made this change configuration which will eliminate all attempts to + re-configure serial. It will just use the serial settings as they were left + by the bootloader: + + CONFIG_SUPPRESS_UART_CONFIG=y I have not debugged this in detail, but this appears to be an issue with the impelentation of esp32_configgpio() and/or gpio_matrix_out() when called from diff --git a/configs/esp32-core/nsh/defconfig b/configs/esp32-core/nsh/defconfig index 09f55cb114a..60fe7b69991 100644 --- a/configs/esp32-core/nsh/defconfig +++ b/configs/esp32-core/nsh/defconfig @@ -10,6 +10,7 @@ CONFIG_ARCH_XTENSA=y CONFIG_ARCH="xtensa" CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y +CONFIG_DEBUG_FEATURES=y CONFIG_DISABLE_POLL=y CONFIG_ESP32_UART0=y CONFIG_SYSTEM_NSH_CXXINITIALIZE=y diff --git a/configs/esp32-core/ostest/defconfig b/configs/esp32-core/ostest/defconfig index 3b9c275686e..26d80454ce8 100644 --- a/configs/esp32-core/ostest/defconfig +++ b/configs/esp32-core/ostest/defconfig @@ -6,6 +6,7 @@ CONFIG_ARCH_XTENSA=y CONFIG_ARCH="xtensa" CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y +CONFIG_DEBUG_FEATURES=y CONFIG_DISABLE_POLL=y CONFIG_ESP32_UART0=y CONFIG_EXAMPLES_OSTEST_LOOPS=10 diff --git a/configs/esp32-core/smp/defconfig b/configs/esp32-core/smp/defconfig index b1ffb00f6ea..f95dd487009 100644 --- a/configs/esp32-core/smp/defconfig +++ b/configs/esp32-core/smp/defconfig @@ -10,6 +10,7 @@ CONFIG_ARCH_XTENSA=y CONFIG_ARCH="xtensa" CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y +CONFIG_DEBUG_FEATURES=y CONFIG_DISABLE_POLL=y CONFIG_ESP32_UART0=y CONFIG_EXPERIMENTAL=y