Question about the IDF compatibility issue with Zephyr project
Question about the IDF compatibility issue with Zephyr project
I spent a lot time on the zephyr project trying to get my ESP32-wroom-32D working with the zephyr samples, but only got the hello-world to run on my dev kit.
It seems to me that the linker script has some problem in the zephyr project for the ESP32, and it generates a big binary file that when using esptool.py to flash, always has this bigger than 16 segments failure.
Who knows any detail about the linker script? It will be a huge benefit for ESP if the zephyr project can run on ESP32.
It seems to me that the linker script has some problem in the zephyr project for the ESP32, and it generates a big binary file that when using esptool.py to flash, always has this bigger than 16 segments failure.
Who knows any detail about the linker script? It will be a huge benefit for ESP if the zephyr project can run on ESP32.
Re: Question about the IDF compatibility issue with Zephyr project
Hi rolandma,
Zephyr is separate to IDF, as far as I know the only shared parts are the gcc toolchain and esptool.py (neither of which are part of IDF, either).
There's not a lot of Zephyr Project users on this forum, so you may have more success posting on the Zephyr Project GitHub issues or Their Slack/Mailing list.
Sorry I can't be of more assistance.
Angus
Zephyr is separate to IDF, as far as I know the only shared parts are the gcc toolchain and esptool.py (neither of which are part of IDF, either).
There's not a lot of Zephyr Project users on this forum, so you may have more success posting on the Zephyr Project GitHub issues or Their Slack/Mailing list.
Sorry I can't be of more assistance.
Angus
Re: Question about the IDF compatibility issue with Zephyr project
Thanks Angus, I did ask on Zephyr project, and they are not very interested in ESP32. I tried a lot and managed to get several examples on zephyr project compiled but only the 'hello-world' example will be able to flash onto my esp32-wroom-32d dev kit, all others failed. I would like to help some hints for the possible problem and further could contribute to the esp32 family.
Re: Question about the IDF compatibility issue with Zephyr project
Hi Angus,
I attached 3 files, one is zephyr.elf, I renamed it to zephyr.txt, and another is linker.cmd, I renamed it as linker.txt. and then the linker.ld from soc, which I renamed as linker.ld.txt.
I don't know if those are helpful or not.
Thanks for your help.
Roland
I attached 3 files, one is zephyr.elf, I renamed it to zephyr.txt, and another is linker.cmd, I renamed it as linker.txt. and then the linker.ld from soc, which I renamed as linker.ld.txt.
I don't know if those are helpful or not.
Thanks for your help.
Roland
- Attachments
-
- linker.ld.txt
- (6.71 KiB) Downloaded 500 times
-
- linker.txt
- (10.94 KiB) Downloaded 469 times
-
- zephyr.txt
- (406.88 KiB) Downloaded 544 times
Re: Question about the IDF compatibility issue with Zephyr project
I think esp32 is still barely supported on zephyr. Only uart,gpio,i2c are listed, no networking. I'm not sure exactly how that relates to successful build with binary issues but...
Re: Question about the IDF compatibility issue with Zephyr project
So any effort will be waste of time? because most accessories are not available? I need the WiFi support for my project.
Re: Question about the IDF compatibility issue with Zephyr project
Hi Roland,
Thanks for attaching the files. I downloaded them, but this ELF seems to convert to a .bin file OK:
Does this not work for you? Can you post the esptool command line and output that you get?
To my knowledge the only third party RTOS project (aside from ESP-IDF) with Wi-Fi support on ESP32 is RIOT: https://doc.riot-os.org/group__cpu__esp ... 2_features (note that I haven't looked any further than this docs page, need to check with RIOT community about the details if you're interested in this.)
Thanks for attaching the files. I downloaded them, but this ELF seems to convert to a .bin file OK:
Code: Select all
$ esptool.py --chip esp32 elf2image ./zephyr.elf
esptool.py v2.9-dev
$ esptool.py --chip esp32 image_info zephyr.bin
esptool.py v2.9-dev
Image version: 1
Entry point: 40080788
8 segments
Segment 1: len 0x0006c load 0x3ffb0000 file_offs 0x00000018 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 2: len 0x00014 load 0x3ffb006c file_offs 0x0000008c [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 3: len 0x00078 load 0x3ffb0080 file_offs 0x000000a8 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 4: len 0x00254 load 0x3ffb00f8 file_offs 0x00000128 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 5: len 0x00400 load 0x40080000 file_offs 0x00000384 [IRAM]
Segment 6: len 0x00100 load 0x40080400 file_offs 0x0000078c [IRAM]
Segment 7: len 0x0006c load 0x40080500 file_offs 0x00000894 [IRAM]
Segment 8: len 0x02be8 load 0x4008056c file_offs 0x00000908 [IRAM]
Checksum: 25 (valid)
Validation Hash: ddaee29470b8e20342bc5072d8e9417d4ac72bfab6eac9ddda696c7b486f2fff (valid)
My understanding is the same as WiFive's, Zephyr on ESP32 does not support Wi-Fi.I need the WiFi support for my project.
To my knowledge the only third party RTOS project (aside from ESP-IDF) with Wi-Fi support on ESP32 is RIOT: https://doc.riot-os.org/group__cpu__esp ... 2_features (note that I haven't looked any further than this docs page, need to check with RIOT community about the details if you're interested in this.)
Re: Question about the IDF compatibility issue with Zephyr project
Hi Angus,
Thanks a lot for your help.
I saw a lot of support for ESP32 from AliOS, does that have Wifi support? I can't use RIOT unfortunately.
Thanks a lot for your help.
I saw a lot of support for ESP32 from AliOS, does that have Wifi support? I can't use RIOT unfortunately.
Re: Question about the IDF compatibility issue with Zephyr project
If I modify the limit segments from 16 to 17, and do the same elf2image, I get this:
$ esptool.py --chip esp32 image_info ./zephyr.
bin
esptool.py v2.9-dev
Image version: 1
Entry point: 400710b0
17 segments
Segment 1: len 0x000c0 load 0x3ffae000 file_offs 0x00000018 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 2: len 0x00054 load 0x3ffae0c0 file_offs 0x000000e0 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 3: len 0x00038 load 0x3ffae114 file_offs 0x0000013c [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 4: len 0x00060 load 0x3ffae14c file_offs 0x0000017c [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 5: len 0x00014 load 0x3ffae1ac file_offs 0x000001e4 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 6: len 0x00028 load 0x3ffae1c0 file_offs 0x00000200 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 7: len 0x00040 load 0x3ffae1e8 file_offs 0x00000230 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 8: len 0x00060 load 0x3ffae240 file_offs 0x00000278 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 9: len 0x00118 load 0x3ffae2a0 file_offs 0x000002e0 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 10: len 0x038f4 load 0x3ffae3b8 file_offs 0x00000400 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 11: len 0x00400 load 0x40070000 file_offs 0x00003cfc [CACHE_PRO]
Segment 12: len 0x00100 load 0x40070400 file_offs 0x00004104 [CACHE_PRO]
Segment 13: len 0x000c0 load 0x40070500 file_offs 0x0000420c [CACHE_PRO]
Segment 14: len 0x000a8 load 0x400705c0 file_offs 0x000042d4 [CACHE_PRO]
Segment 15: len 0x00010 load 0x40070668 file_offs 0x00004384 [CACHE_PRO]
Segment 16: len 0x00040 load 0x40070678 file_offs 0x0000439c [CACHE_PRO]
Segment 17: len 0x102c0 load 0x400706b8 file_offs 0x000043e4 [CACHE_PRO]
Checksum: 78 (valid)
Validation Hash: d4f10000a7b5699213e59502831fe3429920c7edd088e5e82025589f5a0a18b6 (valid)
If not, I get this:
$ esptool.py --chip esp32 elf2image ./zephyr.elf
esptool.py v2.9-dev
A fatal error occurred: Invalid segment count 17 (max 16). Usually this indicates a linker script problem.
$ esptool.py --chip esp32 image_info ./zephyr.
bin
esptool.py v2.9-dev
Image version: 1
Entry point: 400710b0
17 segments
Segment 1: len 0x000c0 load 0x3ffae000 file_offs 0x00000018 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 2: len 0x00054 load 0x3ffae0c0 file_offs 0x000000e0 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 3: len 0x00038 load 0x3ffae114 file_offs 0x0000013c [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 4: len 0x00060 load 0x3ffae14c file_offs 0x0000017c [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 5: len 0x00014 load 0x3ffae1ac file_offs 0x000001e4 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 6: len 0x00028 load 0x3ffae1c0 file_offs 0x00000200 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 7: len 0x00040 load 0x3ffae1e8 file_offs 0x00000230 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 8: len 0x00060 load 0x3ffae240 file_offs 0x00000278 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 9: len 0x00118 load 0x3ffae2a0 file_offs 0x000002e0 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 10: len 0x038f4 load 0x3ffae3b8 file_offs 0x00000400 [BYTE_ACCESSIBLE, DRAM, DMA]
Segment 11: len 0x00400 load 0x40070000 file_offs 0x00003cfc [CACHE_PRO]
Segment 12: len 0x00100 load 0x40070400 file_offs 0x00004104 [CACHE_PRO]
Segment 13: len 0x000c0 load 0x40070500 file_offs 0x0000420c [CACHE_PRO]
Segment 14: len 0x000a8 load 0x400705c0 file_offs 0x000042d4 [CACHE_PRO]
Segment 15: len 0x00010 load 0x40070668 file_offs 0x00004384 [CACHE_PRO]
Segment 16: len 0x00040 load 0x40070678 file_offs 0x0000439c [CACHE_PRO]
Segment 17: len 0x102c0 load 0x400706b8 file_offs 0x000043e4 [CACHE_PRO]
Checksum: 78 (valid)
Validation Hash: d4f10000a7b5699213e59502831fe3429920c7edd088e5e82025589f5a0a18b6 (valid)
If not, I get this:
$ esptool.py --chip esp32 elf2image ./zephyr.elf
esptool.py v2.9-dev
A fatal error occurred: Invalid segment count 17 (max 16). Usually this indicates a linker script problem.
Re: Question about the IDF compatibility issue with Zephyr project
This is really odd that the result is different... the sections in the .bin don't even seem to exist in the .elf file you posted.
Are we definitely using the same ELF file? This is what I get running objdump & md5sum over the one that's attached:
Code: Select all
$ xtensa-esp32-elf-objdump -h zephyr.txt
zephyr.txt: file format elf32-xtensa-le
Sections:
Idx Name Size VMA LMA File off Algn
0 .rtc.text 00000000 400c0000 400c0000 0000351c 2**0
CONTENTS
1 .iram0.vectors 00000400 40080000 40080000 00000074 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 initlevel 0000006c 3ffb0000 3ffb0000 000031d0 2**2
CONTENTS, ALLOC, LOAD, DATA
3 _k_mutex_area 00000014 3ffb006c 3ffb006c 0000323c 2**2
CONTENTS, ALLOC, LOAD, DATA
4 sw_isr_table 00000100 40080400 40080400 00000474 2**2
CONTENTS, ALLOC, LOAD, DATA
5 devconfig 0000006c 40080500 40080500 00000574 2**2
CONTENTS, ALLOC, LOAD, DATA
6 text 00002be6 4008056c 4008056c 000005e0 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
7 .dram0.data 00000078 3ffb0080 3ffb0080 00003250 2**2
CONTENTS, ALLOC, LOAD, DATA
8 rodata 00000254 3ffb00f8 3ffb00f8 000032c8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 bss 00000210 3ffb0350 3ffb0350 0000351c 2**3
ALLOC
10 app_noinit 00000000 3ffb0560 3ffb0560 0000351c 2**0
CONTENTS
11 noinit 00001400 3ffb0560 3ffb0560 0000351c 2**4
ALLOC
12 .comment 0000003a 00000000 00000000 0000351c 2**0
CONTENTS, READONLY
13 .debug_aranges 000010e8 00000000 00000000 00003558 2**3
CONTENTS, READONLY, DEBUGGING
14 .debug_info 0002bb7a 00000000 00000000 00004640 2**0
CONTENTS, READONLY, DEBUGGING
15 .debug_abbrev 00008ebe 00000000 00000000 000301ba 2**0
CONTENTS, READONLY, DEBUGGING
16 .debug_line 0000f125 00000000 00000000 00039078 2**0
CONTENTS, READONLY, DEBUGGING
17 .debug_frame 00002200 00000000 00000000 000481a0 2**2
CONTENTS, READONLY, DEBUGGING
18 .debug_str 000051bf 00000000 00000000 0004a3a0 2**0
CONTENTS, READONLY, DEBUGGING
19 .debug_loc 0000ec14 00000000 00000000 0004f55f 2**0
CONTENTS, READONLY, DEBUGGING
20 .debug_ranges 00001cd0 00000000 00000000 0005e178 2**3
CONTENTS, READONLY, DEBUGGING
21 .xtensa.info 00000038 00000000 00000000 0005fe48 2**0
CONTENTS, READONLY
$ md5sum zephyr.txt
8a6f57f95e21927157a95fde1f256f77 zephyr.txt
Who is online
Users browsing this forum: No registered users and 224 guests