Question about the IDF compatibility issue with Zephyr project

rolandma
Posts: 7
Joined: Thu Nov 14, 2019 2:02 pm

Question about the IDF compatibility issue with Zephyr project

Postby rolandma » Tue Nov 26, 2019 2:59 pm

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.

ESP_Angus
Posts: 1897
Joined: Sun May 08, 2016 4:11 am

Re: Question about the IDF compatibility issue with Zephyr project

Postby ESP_Angus » Wed Nov 27, 2019 6:19 am

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

rolandma
Posts: 7
Joined: Thu Nov 14, 2019 2:02 pm

Re: Question about the IDF compatibility issue with Zephyr project

Postby rolandma » Mon Dec 02, 2019 4:24 pm

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.

rolandma
Posts: 7
Joined: Thu Nov 14, 2019 2:02 pm

Re: Question about the IDF compatibility issue with Zephyr project

Postby rolandma » Mon Dec 02, 2019 4:40 pm

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
Attachments
linker.ld.txt
(6.71 KiB) Downloaded 5 times
linker.txt
(10.94 KiB) Downloaded 7 times
zephyr.txt
(406.88 KiB) Downloaded 7 times

WiFive
Posts: 2822
Joined: Tue Dec 01, 2015 7:35 am

Re: Question about the IDF compatibility issue with Zephyr project

Postby WiFive » Tue Dec 03, 2019 7:25 am

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...

rolandma
Posts: 7
Joined: Thu Nov 14, 2019 2:02 pm

Re: Question about the IDF compatibility issue with Zephyr project

Postby rolandma » Tue Dec 03, 2019 3:14 pm

So any effort will be waste of time? because most accessories are not available? I need the WiFi support for my project.

ESP_Angus
Posts: 1897
Joined: Sun May 08, 2016 4:11 am

Re: Question about the IDF compatibility issue with Zephyr project

Postby ESP_Angus » Tue Dec 03, 2019 11:14 pm

Hi Roland,

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)
Does this not work for you? Can you post the esptool command line and output that you get?
I need the WiFi support for my project.
My understanding is the same as WiFive's, Zephyr on ESP32 does not support Wi-Fi.

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.)

rolandma
Posts: 7
Joined: Thu Nov 14, 2019 2:02 pm

Re: Question about the IDF compatibility issue with Zephyr project

Postby rolandma » Thu Dec 05, 2019 2:35 pm

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.

rolandma
Posts: 7
Joined: Thu Nov 14, 2019 2:02 pm

Re: Question about the IDF compatibility issue with Zephyr project

Postby rolandma » Thu Dec 05, 2019 4:43 pm

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.

Who is online

Users browsing this forum: No registered users and 15 guests