Xtensa ESP32: Some fixes from integration of ostest configuration. Almost works: There are some assertions in xtensa_sigdeliver()
This commit is contained in:
parent
2b5235e937
commit
d9a64b9ca9
@ -33,6 +33,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <nuttx/init.h>
|
||||
#include <nuttx/irq.h>
|
||||
|
||||
#include "xtensa.h"
|
||||
#include "xtensa_attr.h"
|
||||
@ -84,6 +85,14 @@ void IRAM_ATTR __start(void)
|
||||
regval &= ~(1 << 14);
|
||||
putreg32(regval, 0x6001f048);
|
||||
|
||||
/* Make sure that normal interrupts are disabled. This is really only an
|
||||
* issue when we are started in un-usual ways (such as from IRAM). In this
|
||||
* case, we can at least defer some unexpected interrupts left over from the
|
||||
* last program execution.
|
||||
*/
|
||||
|
||||
up_irq_disable();
|
||||
|
||||
/* Move the stack to a known location. Although we were give a stack
|
||||
* pointer at start-up, we don't know where that stack pointer is positioned
|
||||
* respect to our memory map. The only safe option is to switch to a well-
|
||||
|
@ -545,13 +545,13 @@ OpenOCD for the ESP32
|
||||
--- 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 */
|
||||
#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 */
|
||||
#undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
|
||||
|
||||
Start OpenOCD:
|
||||
|
||||
@ -674,17 +674,22 @@ NOTES:
|
||||
SMP operation. It differs from the nsh configuration only in these
|
||||
addtional settings:
|
||||
|
||||
CONFIG_EXAMPLES_SMP=y
|
||||
CONFIG_EXAMPLES_SMP_NBARRIER_THREADS=8
|
||||
CONFIG_EXAMPLES_SMP_PRIORITY=100
|
||||
CONFIG_EXAMPLES_SMP_STACKSIZE=2048
|
||||
SMP is enabled:
|
||||
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_IDLETHREAD_STACKSIZE=2048
|
||||
CONFIG_SMP_NCPUS=2
|
||||
CONFIG_SPINLOCK=y
|
||||
|
||||
The apps/examples/smp test is included:
|
||||
|
||||
CONFIG_EXAMPLES_SMP=y
|
||||
CONFIG_EXAMPLES_SMP_NBARRIER_THREADS=8
|
||||
CONFIG_EXAMPLES_SMP_PRIORITY=100
|
||||
CONFIG_EXAMPLES_SMP_STACKSIZE=2048
|
||||
|
||||
NOTES:
|
||||
1. See NOTES for the nsh configuration.
|
||||
|
||||
ostest:
|
||||
|
||||
@ -698,6 +703,13 @@ NOTES:
|
||||
CONFIG_SPINLOCK=y
|
||||
|
||||
NOTES:
|
||||
1. See NOTES for the nsh configuration.
|
||||
2. 2016-12-23: I have only tried to execute this once and I see some
|
||||
assertion from like 87 of xtensa_sigdeliver.c:
|
||||
|
||||
ASSERT(rtcb->xcp.sigdeliver != NULL);
|
||||
|
||||
I have not yet looked into this.
|
||||
|
||||
Things to Do
|
||||
============
|
||||
@ -733,3 +745,25 @@ Things to Do
|
||||
5. See SMP-related issues above
|
||||
|
||||
6. See OpenOCD for the ESP32 above
|
||||
|
||||
7. Currently will not boot unless serial port initialization is disabled.
|
||||
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 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
|
||||
the setup logic in arch/xtensa/src/esp32/esp32_serial.c. I am not inclined
|
||||
to invest a lot in driver debug until the clock configuration is finalized.
|
||||
|
@ -612,7 +612,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
||||
# CONFIG_EXAMPLES_NXTEXT is not set
|
||||
CONFIG_EXAMPLES_OSTEST=y
|
||||
CONFIG_EXAMPLES_OSTEST_LOOPS=10
|
||||
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
|
||||
CONFIG_EXAMPLES_OSTEST_STACKSIZE=4096
|
||||
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8
|
||||
CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000
|
||||
CONFIG_EXAMPLES_OSTEST_RR_RUNS=10
|
||||
|
Loading…
Reference in New Issue
Block a user