tplux
10/25/2022, 6:00 AMtplux
10/25/2022, 6:30 AMtplux
10/25/2022, 6:32 AMtplux
10/25/2022, 6:33 AMjag
, device has version
******************************************************************************
WARNING: extracting a specific part is deprecated
Crash in native code:
Backtrace:0x4018d43d:0x3ffd88400x4018a7ca:0x3ffd8860 0x4018b23a:0x3ffd8880 0x40145659:0x3ffd88b0 0x401456b9:0x3ffd88d0 0x4016e60a:0x3ffd88f0 0x4016ed75:0x3ffd8910 0x4016d6b4:0x3ffd8930 0x401adb81:0x3ffd8950
0x4018d43d: tx_pwctrl_init + 0x31
0x4018b23a: register_chipv7_phy + 0x11e
0x40145659: esp_phy_load_cal_and_init + 0x3d
0x401456b9: esp_phy_enable + 0x51
0x4016e60a: wifi_hw_start + 0x76
0x4016ed75: wifi_start_process + 0x49
0x4016d6b4: ieee80211_ioctl_process + 0x5c
0x401adb81: ppTask + 0xb1
******************************************************************************
ELF file SHA256: 799463178f1588c9kasperl
10/25/2022, 6:36 AMFirmwareWriter.write
, right?kasperl
10/25/2022, 6:37 AMtplux
10/25/2022, 6:41 AMtplux
10/25/2022, 6:42 AMtplux
10/26/2022, 8:56 AMkasperl
10/26/2022, 9:06 AMtplux
10/26/2022, 9:07 AMtplux
10/26/2022, 10:55 AMkasperl
10/26/2022, 2:59 PMtplux
10/27/2022, 5:39 AMtplux
10/27/2022, 10:00 AMkasperl
10/27/2022, 10:16 AMtplux
10/27/2022, 10:22 AMkasperl
10/27/2022, 10:57 AMkasperl
10/27/2022, 10:59 AMkasperl
10/27/2022, 10:59 AMtplux
10/27/2022, 11:07 AMtplux
10/27/2022, 11:39 AMkasperl
10/27/2022, 5:22 PMtplux
10/28/2022, 5:33 AMtplux
10/28/2022, 10:05 AMkasperl
10/28/2022, 10:26 AMmikkel.damsgaard
10/28/2022, 1:56 PMmikkel.damsgaard
10/28/2022, 1:58 PMmikkel.damsgaard
10/28/2022, 1:58 PMtplux
10/29/2022, 8:59 AMtplux
10/31/2022, 6:07 AMmikkel.damsgaard
10/31/2022, 8:37 AMtplux
10/31/2022, 2:28 PMkasperl
10/31/2022, 2:34 PMtplux
10/31/2022, 2:34 PMkasperl
11/01/2022, 12:28 PMfloitsch
11/01/2022, 12:33 PMProvided these functions are not (incorrectly) used from ISRs, this option is safe to enable in all configurations.
I will still try to get a version with the Freertos in IRAM to work again.tplux
11/01/2022, 12:50 PMmikkel.damsgaard
11/01/2022, 2:57 PMfloitsch
11/01/2022, 4:00 PMdiff --git a/toolchains/esp32/sdkconfig.defaults b/toolchains/esp32/sdkconfig.defaults
index 3947a427..7f18132a 100644
--- a/toolchains/esp32/sdkconfig.defaults
+++ b/toolchains/esp32/sdkconfig.defaults
@@ -6,7 +6,7 @@ CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y
-CONFIG_BT_ENABLED=y
+#CONFIG_BT_ENABLED=y
CONFIG_BTDM_CTRL_BLE_MAX_CONN=2
CONFIG_BTDM_CTRL_PINNED_TO_CORE_1=y
# CONFIG_BTDM_CTRL_MODEM_SLEEP is not set
@@ -57,7 +57,7 @@ CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=3
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024
CONFIG_FREERTOS_ISR_STACKSIZE=2096
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
-CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
+#CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
# CONFIG_LOG_COLORS is not set
CONFIG_LWIP_LOCAL_HOSTNAME="toit"
Then delete the toolchains/esp32/sdkconfig
file and build the image again.
You can also just run idf.py -C toolchains/esp32 -B build/esp32 size-components
(assuming you have sourced the export.sh: source third_party/esp-idf/export.sh
).tplux
11/02/2022, 7:05 AMtplux
11/02/2022, 7:06 AMtplux
11/02/2022, 7:34 AMkasperl
11/02/2022, 7:42 AMmikkel.damsgaard
11/02/2022, 9:12 AM# CONFIG_BT_ENABLED is not set
# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set
# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set
I wonder if there is a bigger problem with OTA in toit on ESP32 now....dongheng
11/02/2022, 10:00 AMgeneral
channel: Flash writing/reading/erasing has much usage limitation, as I known mainly about:
1. Task stack mustn't be PSRAM, becasue the cache for PSRAM will be disable
2. Interrupt(flags=ESP_INTR_FLAG_IRAM) process functions(include calling function one by one layer) should be put into IRAM, because cache for flash will be disable
3. All CPUs will switch to special tasks(IPC), and other tasks can't run and it looks like being blockeddongheng
11/02/2022, 10:01 AMfloitsch
11/02/2022, 10:07 AMmikkel.damsgaard
11/02/2022, 10:12 AMmikkel.damsgaard
11/02/2022, 10:12 AMfloitsch
11/02/2022, 10:14 AMmikkel.damsgaard
11/02/2022, 10:14 AMmikkel.damsgaard
11/02/2022, 10:16 AMtplux
11/02/2022, 10:54 AMtplux
11/02/2022, 11:01 AMfloitsch
11/02/2022, 11:10 AMfloitsch
11/02/2022, 11:11 AMtplux
11/02/2022, 11:16 AMdongheng
11/02/2022, 11:18 AMtplux
11/02/2022, 11:21 AMjag
, device has version
******************************************************************************
WARNING: extracting a specific part is deprecated
Crash in native code:
Backtrace:0x401910c1:0x3ffb12700x40086b03:0x3ffb1290 0x4008be95:0x3ffb1300 0x4008849a:0x3ffaf430 0x4008c3bf:0x3ffaf450
0x401910c1: prvAcquireItemNoSplit + 0x51
0x4008be95: _xt_lowint1 + 0x89
0x4008849a: spi_flash_op_block_func + 0x22
0x4008c3bf: ipc_task + 0x6f
******************************************************************************dongheng
11/02/2022, 11:23 AMtplux
11/02/2022, 11:28 AMtplux
11/02/2022, 11:29 AMdongheng
11/02/2022, 11:36 AMspi_flash_op_block_func
triggers issue, but also looks like a interrupt triggers by _xt_lowint1
, so I can't check directly.dongheng
11/02/2022, 11:37 AMtplux
11/02/2022, 11:49 AMfloitsch
11/02/2022, 11:52 AMJAG_TOIT_REPO_PATH
environment variable to your Toit repository.
If you already did that, then use the esp-idf monitor
instead.
Let me find the command line for the esp-idf monitor
line.floitsch
11/02/2022, 11:53 AMthird_party/esp-idf/export.sh
.
Then run idf.py -C toolchains/esp32 -B build/esp32 monitor
floitsch
11/02/2022, 11:54 AMfloitsch
11/02/2022, 11:54 AMtplux
11/02/2022, 12:13 PMtplux
11/02/2022, 12:13 PMtplux
11/02/2022, 12:15 PMdongheng
11/02/2022, 12:26 PMCache disabled but cached memory region accessed
, it means cache for external memory(flash or psram) is disable, but software try to access it,. Then 0x401910c4
show where it triggers issues, if there its ASM code, it will be better...dongheng
11/02/2022, 12:27 PMdongheng
11/02/2022, 12:33 PM0x401910c4
, I think this out of range of IRAM...mikkel.damsgaard
11/02/2022, 12:33 PMmikkel.damsgaard
11/02/2022, 12:33 PMdongheng
11/02/2022, 12:34 PMmikkel.damsgaard
11/02/2022, 12:35 PMmikkel.damsgaard
11/02/2022, 12:35 PMmikkel.damsgaard
11/02/2022, 12:36 PMdongheng
11/02/2022, 12:36 PMmikkel.damsgaard
11/02/2022, 12:36 PMfloitsch
11/02/2022, 12:38 PMesp_ringbuf
.
Two options:
- disable uart interrupt
- move esp_ringbuf into iramtplux
11/02/2022, 12:39 PMfloitsch
11/02/2022, 12:39 PMtplux
11/02/2022, 12:39 PMmikkel.damsgaard
11/02/2022, 12:39 PMtplux
11/02/2022, 12:40 PMfloitsch
11/02/2022, 12:40 PMfloitsch
11/02/2022, 12:40 PMfloitsch
11/02/2022, 12:40 PMfloitsch
11/02/2022, 12:41 PMtplux
11/02/2022, 12:48 PMdongheng
11/03/2022, 1:59 AMkasperl
11/03/2022, 5:07 AMdongheng
11/03/2022, 6:14 AMmikkel.damsgaard
11/03/2022, 7:32 AMCONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH
states
Provided these functions are not (incorrectly) used from ISRs, this option is safe to enable in all configurations.
and then the esp-idt UART interrupt driver is dependent on that flag..mikkel.damsgaard
11/03/2022, 7:41 AMmikkel.damsgaard
11/03/2022, 7:43 AMtplux
11/03/2022, 8:56 AMmikkel.damsgaard
11/03/2022, 8:59 AMmikkel.damsgaard
11/03/2022, 9:00 AMtplux
11/03/2022, 9:07 AMkasperl
11/03/2022, 9:07 AMtplux
11/03/2022, 9:08 AMkasperl
11/03/2022, 9:09 AMtplux
11/03/2022, 9:12 AMkasperl
11/03/2022, 9:13 AMtplux
11/03/2022, 9:14 AMkasperl
11/03/2022, 9:18 AMtplux
11/03/2022, 9:27 AMmikkel.damsgaard
11/03/2022, 9:29 AMkasperl
11/03/2022, 10:19 AM~/.cache/jaguar/sdk/tools/firmware -e ~/.cache/jaguar/assets/firmware-esp32.envelope flash -p /dev/tty.usbserial-11330
kasperl
11/03/2022, 10:19 AMkasperl
11/03/2022, 10:20 AMesptool.py v3.3.2-dev
Serial port /dev/tty.usbserial-11330
Connecting..............
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 98💿ac:63:76:cc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00001000 to 0x00004fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000d000 to 0x0000efff...
Flash will be erased from 0x00010000 to 0x00144fff...
Compressed 15888 bytes to 11151...
Wrote 15888 bytes (11151 compressed) at 0x00001000 in 0.4 seconds (effective 319.6 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 165...
Wrote 3072 bytes (165 compressed) at 0x00008000 in 0.1 seconds (effective 328.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 31...
Wrote 8192 bytes (31 compressed) at 0x0000d000 in 0.1 seconds (effective 511.9 kbit/s)...
Hash of data verified.
Compressed 1263200 bytes to 812457...
Wrote 1263200 bytes (812457 compressed) at 0x00010000 in 13.9 seconds (effective 725.9 kbit/s)...
Hash of data verified.
kasperl
11/03/2022, 10:20 AMotadata
partition.mikkel.damsgaard
11/03/2022, 10:23 AMtplux
11/03/2022, 10:27 AMtplux
11/03/2022, 10:42 AMkasperl
11/03/2022, 10:42 AM