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
ESP32 build with esp-idf 4.4.4 #2370
Comments
Any recomendation how to handle the new flavors of ESP32, eg with a subtype borad variable? I would not recommenct to have new boardfiles because we can hanble it with if defs in ESP32.make files. |
Good morning, excellent contribution. |
Hello Mark,
wow, great job !!!
On a first view, looks to be Espressif as usual.
Tons of changes to get Espruino running on next version of idf.
To see version 5.0 waiting in the background doesn't make it less
complicated.
regards from Krefeld
Jürgen
Am Mo., 15. Mai 2023 um 08:07 Uhr schrieb Mark Becker <
***@***.***>:
… Created a branch <https://github.com/MaBecker/Espruino/tree/esp32_v4.4.4>
so others can test and support this work.
for details check ***@***.***
<MaBecker@f8afbe5>
open issue
- memory.ld iram0_2_seg (RX) : org = 0x400D0020, len = 0x330000-0x20
to fit - should be includes in zip file
- ld undefined reference to
ETH_EVENT
__errno
_reclaim_reent
close
fopen
gettimeofday
mbedtls_aes_crypt_cbc
mbedtls_aes_crypt_cfb8
mbedtls_aes_crypt_ctr
mbedtls_aes_crypt_ecb
mbedtls_aes_free
mbedtls_aes_init
mbedtls_aes_setkey_dec
mbedtls_aes_setkey_enc
puts
setenv
—
Reply to this email directly, view it on GitHub
<#2370>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPYNHRO5UYZYOG3MSLLDCLXGHBYHANCNFSM6AAAAAAYBWIQHQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Great!
We have part/family in We'd need a new binary for each new ESP32 flavour? And maybe they'd have different pins and different default connections too? If so I think a new
I don't know how you handle this, but generally if I'm trying to figure out why something isn't added I do But for mbedtls we have our own mbedtls instance that should be included from the main Makefile, so I wonder whether there's some conflict - you could try building without crypto for now: https://github.com/espruino/Espruino/blob/master/boards/ESP32.py#L62-L63 |
In make/crypto/ we have ESP32.make Yes I tried building without crypto which produces a smaler list of undefined reference: ETH_EVENT |
Removing ETH device via |
add libs New messages libc/stdlib/rand.c:72: first defined here:72: first defined here src/newlib/newlib/libc/stdlib/rand.c:63: first defined here Any hint how to fix this? Edit: ESP32.py still without 'SHA256','SHA512', 'TLS', |
added attribute((weak)) to rand and srand to fix multiple defined. Successfully created esp32 image. |
flashing this image is not successful :-( Rebooting...
ets Jul 29 2019 12:21:46
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:3836
ho 0 tail 12 room 4
load:0x40078000,len:14428
load:0x40080400,len:3108
entry 0x400805f0
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0).
Core 0 register dump:
PC : 0x40080200 PS : 0x00060435 A0 : 0x400958cc A1 : 0x3ffbe6a0
A2 : 0x00000001 A3 : 0xffffffff A4 : 0x00060421 A5 : 0x00000001
A6 : 0x3ffc0a2c A7 : 0x00000000 A8 : 0x800897a0 A9 : 0x400958cc
A10 : 0x00000004 A11 : 0x00060424 A12 : 0x40083814 A13 : 0x3ffb28f0
A14 : 0x3ffb5588 A15 : 0x00000000 SAR : 0x0000001a EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Core 0 was running in ISR context:
EPC1 : 0x4016fa8b EPC2 : 0x00000000 EPC3 : 0x4000bff0 EPC4 : 0x40095ac2
Backtrace: 0x400801fd:0x3ffbe6a0 0x400958c9:0x3ffbe770 0x400894b1:0x3ffbe7a0 0x40090bff:0x3ffbe7c0 0x40090fba:0x3ffbe7f0 0x40083729:0x3ffbe810 0x4008953a:0x3ffd38c0 0x40090c2d:0x3ffd38e0 0x401c2184:0x3ffd3900 0x4017897e:0x3ffd3930 0x4019dbe1:0x3ffd3950 0x4019dfdd:0x3ffd3970 0x4019ec29:0x3ffd3990 0x4019e1b1:0x3ffd39c0 0x401c954d:0x3ffd39e0 0x4019e0d9:0x3ffd3a00 0x40179f51:0x3ffd3a20 0x40179f01:0x3ffd3a40
Core 1 register dump:
PC : 0x401c8326 PS : 0x00060135 A0 : 0x801708d1 A1 : 0x3ffbc640
A2 : 0x00000000 A3 : 0x00060023 A4 : 0x00060023 A5 : 0x3ffb7720
A6 : 0x003fffff A7 : 0x00060023 A8 : 0x80170efa A9 : 0x3ffbc610
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000001 A13 : 0xfffffffd
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000000 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x401c8323:0x3ffbc640 0x401708ce:0x3ffbc660 0x40093ee8:0x3ffbc680 |
Argh, what a pain. Not sure if you've come across this before for debugging (or if there is a better way) but if you do You see in the error messages there's a |
Hello, I see that it's giving you a lot of work. I find it difficult to keep up with everything you're doing as I haven't quite mastered the Espruino official multi-platform build environment. What I did notice when I started with version 4.4 is that the compiler had been changed to a different version. You might already be aware of this, but just in case. I will try to test it over the weekend, but I think it will also be challenging for me. |
In EspruinoBuildTools we have folder /esp32/build/esp-idf/tools which has a PC/EPC1 decoder included. this is how it's called: ./idf_monitor.py --port /dev/tty.usbserial-54240369371 <path to Espruino>/bin/espruino_2v17.86_esp32.elf at the moment I try to include gdbstub in boatloader |
Ahh, thanks! That could have saved me some time :) |
output of rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:8188
ho 0 tail 12 room 4
load:0x40078000,len:14840
ho 0 tail 12 room 4
load:0x40080400,len:3960
entry 0x40080694
I (31) boot: ESP-IDF v4.4.4-dirty 2nd stage bootloader
I (31) boot: compile time 16:50:34
D (31) bootloader_flash: XMC chip detected by RDID (00204016), skip.
D (37) bootloader_flash: mmu set block paddr=0x00000000 (was 0xffffffff)
I (44) boot: chip revision: v3.0
I (48) boot_comm: chip revision: 3, min. bootloader chip revision: 0
D (55) boot.esp32: magic e9
D (58) boot.esp32: segments 03
D (61) boot.esp32: spi_mode 02
D (64) boot.esp32: spi_speed 00
D (67) boot.esp32: spi_size 02
I (70) boot.esp32: SPI Speed : 40MHz
I (75) boot.esp32: SPI Mode : DIO
I (79) boot.esp32: SPI Flash Size : 4MB
I (84) boot: Enabling RNG early entropy source...
D (89) bootloader_flash: mmu set paddr=00000000 count=1 size=c00 src_addr=8000 src_addr_aligned=0
D (98) boot: mapped partition table 0x8000 at 0x3f408000
D (104) flash_parts: partition table verified, 9 entries
I (109) boot: Partition Table:
I (113) boot: ## Label Usage Type ST Offset Length
D (120) boot: load partition table entry 0x3f408000
D (125) boot: type=1 subtype=2
I (128) boot: 0 nvs WiFi data 01 02 00009000 00003000
D (136) boot: load partition table entry 0x3f408020
D (141) boot: type=1 subtype=0
I (144) boot: 1 otadata OTA data 01 00 0000c000 00002000
D (151) boot: load partition table entry 0x3f408040
D (156) boot: type=1 subtype=40
I (160) boot: 2 free Unknown data 01 40 0000e000 00002000
D (167) boot: load partition table entry 0x3f408060
D (172) boot: type=0 subtype=0
I (175) boot: 3 factory factory app 00 00 00010000 00180000
D (183) boot: load partition table entry 0x3f408080
D (188) boot: type=0 subtype=10
I (191) boot: 4 ota_0 OTA app 00 10 00190000 00180000
D (198) boot: load partition table entry 0x3f4080a0
D (203) boot: type=1 subtype=40
I (207) boot: 5 flash Unknown data 01 40 00310000 00010000
D (214) boot: load partition table entry 0x3f4080c0
D (219) boot: type=1 subtype=41
I (222) boot: 6 js_code Unknown data 01 41 00320000 00040000
D (230) boot: load partition table entry 0x3f4080e0
D (235) boot: type=1 subtype=42
I (238) boot: 7 storage Unknown data 01 42 00360000 000a0000
I (246) boot: End of partition table
D (250) boot: OTA data offset 0xc000
D (253) bootloader_flash: mmu set paddr=00000000 count=1 size=2000 src_addr=c000 src_addr_aligned=0
D (263) boot: otadata[0]: sequence values 0xffffffff
D (268) boot: otadata[1]: sequence values 0xffffffff
D (273) boot: OTA sequence numbers both empty (all-0xFF) or partition table does not have bootable ota_apps (app_count=1)
I (284) boot: Defaulting to factory image
D (288) boot: Trying partition index -1 offs 0x10000 size 0x180000
D (295) esp_image: reading image header @ 0x10000
D (299) bootloader_flash: mmu set block paddr=0x00010000 (was 0xffffffff)
D (306) esp_image: image header: 0xe9 0x07 0x02 0x00 40081064
I (312) boot_comm: chip revision: 3, min. application chip revision: 0
I (319) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1bb74h (113524) map
D (328) esp_image: free data page_count 0x00000032
D (333) bootloader_flash: mmu set paddr=00010000 count=2 size=1bb74 src_addr=10020 src_addr_aligned=10000
D (386) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
I (386) esp_image: segment 1: paddr=0002bb9c vaddr=3ff80067 size=00008h ( 8) load
D (390) esp_image: free data page_count 0x00000032
D (395) bootloader_flash: mmu set paddr=00020000 count=1 size=8 src_addr=2bb9c src_addr_aligned=20000
D (404) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
I (411) esp_image: segment 2: paddr=0002bbac vaddr=3ffbdb60 size=03db0h ( 15792) load
D (419) esp_image: free data page_count 0x00000032
D (424) bootloader_flash: mmu set paddr=00020000 count=1 size=3db0 src_addr=2bbac src_addr_aligned=20000
D (440) bootloader_flash: mmu set block paddr=0x00020000 (was 0xffffffff)
I (441) esp_image: segment 3: paddr=0002f964 vaddr=40080000 size=006b4h ( 1716) load
D (449) esp_image: free data page_count 0x00000032
D (454) bootloader_flash: mmu set paddr=00020000 count=2 size=6b4 src_addr=2f964 src_addr_aligned=20000
D (464) bootloader_flash: mmu set block paddr=0x00030000 (was 0xffffffff)
I (470) esp_image: segment 4: paddr=00030020 vaddr=400d0020 size=101fbch (1056700) map
D (479) esp_image: free data page_count 0x00000032
D (484) bootloader_flash: mmu set paddr=00030000 count=17 size=101fbc src_addr=30020 src_addr_aligned=30000
D (898) bootloader_flash: mmu set block paddr=0x00130000 (was 0xffffffff)
I (898) esp_image: segment 5: paddr=00131fe4 vaddr=400806b4 size=19cbch (105660) load
D (902) esp_image: free data page_count 0x00000032
D (907) bootloader_flash: mmu set paddr=00130000 count=2 size=19cbc src_addr=131fe4 src_addr_aligned=130000
D (962) bootloader_flash: mmu set block paddr=0x00140000 (was 0xffffffff)
I (962) esp_image: segment 6: paddr=0014bca8 vaddr=400c0000 size=00068h ( 104) load
D (966) esp_image: free data page_count 0x00000032
D (971) bootloader_flash: mmu set paddr=00140000 count=1 size=68 src_addr=14bca8 src_addr_aligned=140000
D (981) bootloader_flash: mmu set block paddr=0x00140000 (was 0xffffffff)
D (988) boot: Calculated hash: 23f12ddc4e04c460ce7a6b3fca0ff133454fc6fa96242e8e89808e7b7b5fb719
I (1009) boot: Loaded app from partition at offset 0x10000
I (1009) boot: Disabling RNG early entropy source...
D (1010) boot: Mapping segment 0 as DROM
D (1014) boot: Mapping segment 4 as IROM
D (1018) boot: calling set_cache_and_start_app
D (1023) boot: configure drom and irom and start
D (1028) boot: start: 0x40081064
0x40081064: call_start_cpu0 at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/esp_system/port/cpu_start.c:255
D (1042) efuse: In EFUSE_BLK0__DATA3_REG is used 3 bits starting with 9 bit
D (1043) efuse: In EFUSE_BLK0__DATA3_REG is used 1 bits starting with 2 bit
D (1048) efuse: In EFUSE_BLK0__DATA3_REG is used 3 bits starting with 9 bit
D (1054) efuse: In EFUSE_BLK0__DATA3_REG is used 1 bits starting with 2 bit
D (2003) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 8 bit
D (2003) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 0 bit
D (2006) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 24 bit
D (2013) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 16 bit
D (2020) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 8 bit
D (2027) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 0 bit
D (2034) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit
D (2045) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 8 bit
D (2049) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 0 bit
D (2056) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 24 bit
D (2063) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 16 bit
D (2070) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 8 bit
D (2077) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 0 bit
D (2084) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit
D (2097) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 8 bit
D (2098) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 0 bit
D (2105) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 24 bit
D (2112) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 16 bit
D (2119) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 8 bit
D (2126) efuse: In EFUSE_BLK0__DATA1_REG is used 8 bits starting with 0 bit
D (2133) efuse: In EFUSE_BLK0__DATA2_REG is used 8 bits starting with 16 bit
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0).
Core 0 register dump:
PC : 0x40080200 PS : 0x00060835 A0 : 0x00000000 A1 : 0x3ffd3040
0x40080200: _Level4Vector at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1626
A2 : 0x00000002 A3 : 0x3ffb5938 A4 : 0x3ffb5948 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000002 A9 : 0x3ffd3000
A10 : 0x00000000 A11 : 0x3ffd3040 A12 : 0x3ffb5d48 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x80000001 SAR : 0x0000001a EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
Backtrace: 0x400801fd:0x3ffd3040
0x400801fd: _Level3Vector at ??:?
Core 1 register dump:
PC : 0x401c83c2 PS : 0x00060135 A0 : 0x80170455 A1 : 0x3ffbc640
0x401c83c2: esp_pm_impl_waiti at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/esp_pm/pm_impl.c:839
A2 : 0x00000000 A3 : 0x00060023 A4 : 0x00060023 A5 : 0x3ffb7720
A6 : 0x003fffff A7 : 0x00060023 A8 : 0x80170a7e A9 : 0x3ffbc610
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000001 A13 : 0xfffffffd
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000000 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x401c83bf:0x3ffbc640 0x40170452:0x3ffbc660 0x40093ee4:0x3ffbc680
0x401c83bf: cpu_ll_waiti at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/hal/esp32/include/hal/cpu_ll.h:183
(inlined by) esp_pm_impl_waiti at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/esp_pm/pm_impl.c:837
0x40170452: esp_vApplicationIdleHook at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/esp_system/freertos_hooks.c:63
0x40093ee4: prvIdleTask at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/freertos/tasks.c:3987
ELF file SHA256: 0000000000000000
CPU halted. |
or just do xtensa-esp32-elf-addr2line -pfiaC -e bin/espruino_2v17.86_esp32.elf
0x40095e12:0x3ffd2fa0
0x40095e12: esp_ptr_external_ram at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/soc/include/soc/soc_memory_types.h:97
(inlined by) spinlock_acquire at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/esp_hw_support/include/soc/spinlock.h:99
(inlined by) xPortEnterCriticalTimeout at /Users/markbecker/Documents/github/Espruino/EspruinoBuildTools/esp32/build/esp-idf/components/freertos/port/xtensa/port.c:301 will try a ESP32 without psram ...... |
The issue for the reboot is the IROM/IRAM. Had to extend the iram0_0_seg because of overflow.
Need to figure out how avoid overlapping ..... List of segments:
Build a image with bootloader in verbose mode
|
full output
|
let's close it |
Created a branch so others can test and support this work.
for details check MaBecker@f8afbe5
open issue
memory.ld
iram0_0_seg (RX) : org = 0x40080000, len = 0x30000
to fit - should be includes in zip file-> solved by remove ehternet
ld undefined reference to
unstable ESP32 image
The text was updated successfully, but these errors were encountered: