Bug 251659 - devel/xtensa-esp32-elf: update to esp-2020r3
Summary: devel/xtensa-esp32-elf: update to esp-2020r3
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Craig Leres
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-07 05:12 UTC by Tomoyuki Sakurai
Modified: 2024-04-24 16:32 UTC (History)
3 users (show)

See Also:


Attachments
devel/xtensa-esp32s2-elf (252.85 KB, patch)
2020-12-07 05:12 UTC, Tomoyuki Sakurai
no flags Details | Diff
log file (66.36 KB, text/plain)
2020-12-07 06:18 UTC, Steve Wills
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoyuki Sakurai 2020-12-07 05:12:48 UTC
Created attachment 220339 [details]
devel/xtensa-esp32s2-elf

my repository is available at:
https://github.com/trombik/xtensa-esp32-elf
Comment 1 Steve Wills freebsd_committer freebsd_triage 2020-12-07 06:11:31 UTC
This seems to fail to configure due to a missing libintl.h:

./lkc.h:12:11: fatal error: 'libintl.h' file not found
Comment 2 Steve Wills freebsd_committer freebsd_triage 2020-12-07 06:18:17 UTC
Created attachment 220340 [details]
log file
Comment 3 Craig Leres freebsd_committer freebsd_triage 2020-12-07 18:07:33 UTC
devel/xtensa-esp32-elf supports a project that can't yet upgrade from gcc 5.2.0 to 8.2.0. I propose a new xtensa-esp32-elf-devel port that tracks the latest esp-2020 tag. Does that work for you?
Comment 4 Tomoyuki Sakurai 2020-12-07 20:34:46 UTC
(In reply to Craig Leres from comment #3)

in that case,

devel/xtensa-esp32-elf33
devel/xtensa-esp32-elf40
devel/xtensa-esp32-elf

would be better, where (33|40) is esp-idf release version.
Comment 5 Craig Leres freebsd_committer freebsd_triage 2020-12-07 21:33:59 UTC
I don't like the idea of tying the toolchain version to a specific idf version. For example this port might be used to build arduino sketches for the esp32. Also, this port is fairly expensive to build so I wouldn't want to see more than two different versions. And I'd prefer to not bake a specific version number into the port name.

Looking around in the ports/lang tree, -devel looks to be the appropriate suffix.
Comment 6 Tomoyuki Sakurai 2020-12-08 00:46:48 UTC
(In reply to Craig Leres from comment #5)

esp-idf only supports a specific version. as I a maintainer of esp-idf-lib, I would like to build code with multiple stable release versions of esp-idf. also, some libraries and projects are written for a specific esp-idf version. some libraries include binary blobs compiled for a specific version. each esp-idf version requires a specific toolchain. there are more than one stable esp-idf releases.

how do you solve the problem?
Comment 7 Tomoyuki Sakurai 2020-12-08 02:41:19 UTC
(In reply to Craig Leres from comment #5)

on my poudriere box with CURRENT and core-i7 (four cores), it was "build time: 00:54:12". not "fairly expensive".
Comment 8 Craig Leres freebsd_committer freebsd_triage 2020-12-08 03:14:05 UTC
(In reply to Tomoyuki Sakurai from comment #6)
What I propose is to pick a current, recent toolchain and make it the -devel version.

I see that esp-idf v3.3.3 and v3.3.4 want crosstool-ng-1.22.0-96-g2852398 so the current xtensa-esp32-elf works for them. It uses 1.22.0-97-gc752ad5 but as I understand it -97 backs out a PSRAM patch from -96 that turned out to be problematic.

v4.0.1 uses esp-2019r2, v4.1 uses esp-2020r2, and v4.2 uses esp-2020r3. Based on your request to upgrade xtensa-esp32-elf to esp-2020r3 my assumption would be that you are interested in supporting esp-idf v4.2. I'm willing to accommodate that by creating xtensa-esp32-elf-devel based on esp-2020r3. But I don't think I want to support more than two versions nor do I want to load up the FreeBSD package build servers with a bunch of different versions that each take a non-trivial amount of time to build.
Comment 9 Tomoyuki Sakurai 2020-12-08 03:18:40 UTC
then, fine. thank you.
Comment 10 O. Hartmann 2024-03-29 12:22:17 UTC
Can this please be revived?

Fighting with this really unusable archaic JAVA based arduiono-esp32, I'd like to see something more sophiticated for development like the effort given to the FreeBSD community by Tomoyuki Sakurai.

On recent CURRENT (also on 14-STABLE) the ports at

https://github.com/trombik/xtensa-esp32-elf

build well for me in poudriere and with portmaster and make.
Comment 11 Craig Leres freebsd_committer freebsd_triage 2024-03-30 22:59:16 UTC
As I've previously stated:

devel/xtensa-esp32-elf supports a project that can't yet upgrade from gcc 5.2.0 to 8.2.0. [https://www.openvehicles.com/] 

I'm willing to create a port for one other version [xtensa-esp32-elf-devel] but no more that.
Comment 12 O. Hartmann 2024-03-31 08:57:47 UTC
Comment on attachment 220340 [details]
log file

The shown build error doesn't show up with the most recent sources on most recent CURRENT.
Comment 13 O. Hartmann 2024-03-31 09:09:04 UTC
(In reply to Craig Leres from comment #11)

I can not see openvehicles as part of the FreeBSD ports collection, relying on this port. So I assume it is a private project of yours, not the community. Correct me when I'm wrong.

The recent port is based on a quite outdated toolchain, gcc 5 versus recent gcc 12.
Comment 14 O. Hartmann 2024-03-31 09:45:45 UTC
I made a suggestion, please see PR 278061 (rename the recent port with the outdated toolchain to devel/xtensa-esp32-elf-legacy) and PR 278062 (establish the new toolchain as suggested herein with modernisations, of course).
Comment 15 Tomoyuki Sakurai 2024-04-24 13:28:02 UTC
I would like to make it clear how I think about the ports I maintain on GitHub.

I made them for myself. I maintain several ESP32 and ESP8266 libraries. My ports work for me. I am happy with them. I need FLAVORS because my libraries support all the supported releases of espressif toolchains. If you want the ports in the official ports tree, please remove my name from MAINTAINER. It takes a quite a bit of time to maintain the ports. Without help, I cannot maintain them nor be responsible for them. The current development model works quite well for me.

I don't know much about openvehicles the maintainer care about. espressif stopped supporting esp-idf 3.x long time ago. Still, the following issue has been open for a year.

https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/908

If he needs it, let it be so.

There are other tools that need to be ported for FreeBSD, tools to write HEX to chips, kernel drivers to talk to common serial port chips on development boards, tools to make FAT FS, supporting third-party tools, etc. espressif is quite open for proposals to fix issues on FreeBSD. However, I cannot handle all the issues from users without any possible fix. FreeBSD is quite a minority in this area, and I ask you to help building a community first. If you like the idea, help me in my GitHub repositories.

Thank you.
Comment 16 Craig Leres freebsd_committer freebsd_triage 2024-04-24 16:32:22 UTC
(In reply to Tomoyuki Sakurai from comment #15)
To be clear, you are not currently listed as MAINTAINER for any FreeBSD port (I just checked).