From nobody Wed Dec 29 13:16:38 2021 X-Original-To: freebsd-embedded@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6CE0A19133FC; Wed, 29 Dec 2021 13:16:41 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JPBkd0zrbz3QFf; Wed, 29 Dec 2021 13:16:41 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version:Content-Type:Message-Id:From; bh=ScEtk7fZ8h8NfTjDAVGkcVtulWvLefee3jq+K/U1elE=; b=G6ZnzBiGUjCh2o+Qi7Lud0N2QfRAjX/YiJ+kpaw+CAxTDVG5v6QaBiWv/1qB6H2yk/7LFx5S2rA0UswwmPrNib0BLL4YjkJsNE21/XDUF3sUEnSjxpu1FpY6rqiEdeWQT0+jpsuY1gDBmm8JjF9fQ7k0CYJRVGbOdO4VldbwGV3qpJptWxcBd153S5nZn4bPUGgQ1FXJq/TbubS1b3MsGsBEIdgb6rEOdsBR0DGk2mUEAdvDfUjwz1lAx1bJnWKxMT3JXLT7qYvGYNWAHHicguix472JSrHvwqlXWl+yOydjVdEUzMhZ+K0SAZ6Kl9WPwG9jnWRgGXQw2N7xI2TlGg==; Received: from imac.bk.cs.huji.ac.il ([132.65.179.42] helo=smtpclient.apple) by kabab.cs.huji.ac.il with esmtp id 1n2Yoo-0002ib-Tb; Wed, 29 Dec 2021 15:16:38 +0200 From: Daniel Braniss Message-Id: <23D75BE9-B42C-4403-9569-728E3E94B169@cs.huji.ac.il> Content-Type: multipart/alternative; boundary="Apple-Mail=_B2BB71DB-FA9E-47A5-BC13-B80005EBFC15" List-Id: Dedicated and Embedded Systems List-Archive: https://lists.freebsd.org/archives/freebsd-embedded List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-embedded@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: Arduino IDF -> make/automake based environment Date: Wed, 29 Dec 2021 15:16:38 +0200 In-Reply-To: <20211229130641.26a93b2f@hermann> Cc: Marc Fonvieille , Andrew Stevenson , freebsd-embedded@freebsd.org, FreeBSD CURRENT To: FreeBSD User References: <20211219120947.75530a82@hermann> <0024BDB4-ABFE-4DAE-BC99-0AF43F8B3180@ugh.net.au> <20211229002510.2e2c9cb0@hermann> <20211229130641.26a93b2f@hermann> X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Rspamd-Queue-Id: 4JPBkd0zrbz3QFf X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_B2BB71DB-FA9E-47A5-BC13-B80005EBFC15 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 29 Dec 2021, at 14:06, FreeBSD User wrote: >=20 > On Wed, 29 Dec 2021 09:10:02 +0200 > Daniel Braniss > = wrote: >=20 >>> On 29 Dec 2021, at 01:25, FreeBSD User > wrote: >>>=20 >>> On Mon, 20 Dec 2021 14:35:10 +0100 >>> Marc Fonvieille = >> wrote: >>>=20 >>>> Le 19.12.2021 21:03, Andrew Stevenson a =C3=A9crit : =20 >>>>>=20 >>>>>=20 >>>>>> On 19. Dec 2021, at 12:18, FreeBSD User = wrote: >>>>>>=20 >>>>>> environment. Since I'm interested in coding for some smaller = AMTEL MCUs and ESP32 >>>>>> and like to digg a bit deeper than simply clicking a host base = from a menu, I'm not >>>>>> afraid of doing some larger basic setup if needed. =20 >>>>>=20 >>>>> If by small AMTEL MCUs you mean AVRs then avr-gcc and avrdude are = in ports. >>>>>=20 >>>>=20 >>>> For ESP32, you should look at: >>>> https://wiki.freebsd.org/electronics/arduino/esp32 =20 >>>=20 >>> Following these instructions with the most recent required ports on = the latest >>> 13-STABLE, results in an linker error: >>>=20 >>> = /usr/local/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../..= /../xtensa-esp32-elf/bin/ld: >>> cannot find crt1-sim.o: No such file or directory >>> = /usr/local/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../..= /../xtensa-esp32-elf/bin/ld: >>> cannot find _vectors.o: No such file or directory >>> collect2: error: ld returned 1 exit status >>>=20 >>>=20 >>>> and >>>> = https://forums.freebsd.org/threads/a-guide-for-installing-esp32-board-for-= arduino-on-freebsd12-update-2021-08-17.78408/ = >>>> = > >>>>=20 >> i gave up compiling the xtensa stuff, specially after espressif came = out with a riscv >> version. so I downloaded the oficial idf and under FreeBSD-13 it = almost worked out of >> the box, if you want I can search my notes =E2=80=A6 >>=20 >> danny >>=20 >=20 > Hello. >=20 > I think, that will be the first step in the right direction (using the = official eps-idf). > Since I didn't come along with the salvation of the linker error = reported earlier, I > switched back to an older project from January this year. It is also = based on the > official FreeBSD Arduino 1.8.5 port and the xtensa compiler 5.2.0 from = ports, but I used > within sketchbook/hardware/esp32 the esp32 git branch release/v1.0 = instead of master on > which I faced the crt1-sim.o error. The goal is to compile HyperionLED = (as a side > product) with the recommended libraries for this project. > It doesn't compile with ESP32 branch release/v1.0, the error is now >=20 > [...] > libraries/FastLED/src/platforms/esp/32/clockless_rmt_esp32.h:149:33: = error: > 'cpu_hal_get_cycle_count' was not declared ... > [...] >=20 > which lead me to the conclusion that a more recent version is = required. With the recent > version of ESP32 stuff in place, I face the mentioned crt1-sim.o = error. same here, apart from the need for a different compiler for the riskv = chips. >=20 > Searching the web for that error leads to a discrepancy of ESP-IDF and = the compiler stuff. >=20 > I'll try the original esp-idf as you suggested (it is a pity it is = backed by cmake, I'm > not quite familiar with cmake yet). >=20 > Any advice is highly appreciated. espidf version i=E2=80=99m using is 5 (master) and it needs linux = emulation and yes, cmake, but it=E2=80=99s not that difficult to master, just check the examples CMakefile=E2=80=99s. if you need more specific help just yell :-) danny >=20 > Kind regards, > oh --Apple-Mail=_B2BB71DB-FA9E-47A5-BC13-B80005EBFC15 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 29 Dec 2021, at 14:06, FreeBSD User <freebsd@walstatt-de.de> wrote:

On Wed, 29 Dec 2021 09:10:02 +0200
Daniel = Braniss <danny@cs.huji.ac.il> wrote:

On= 29 Dec 2021, at 01:25, FreeBSD User <freebsd@walstatt-de.de> wrote:

On Mon, 20 Dec 2021 14:35:10 +0100
Marc = Fonvieille <blackend@freebsd.org <mailto:blackend@freebsd.org>> wrote:

Le = 19.12.2021 21:03, Andrew Stevenson a =C3=A9crit :  


On 19. Dec 2021, at = 12:18, FreeBSD User <freebsd@walstatt-de.de> wrote:

environment. Since I'm interested in coding for some smaller = AMTEL MCUs and ESP32
and like to digg a bit deeper than = simply clicking a host base from a menu, I'm not
afraid of = doing some larger basic setup if needed.    

If by small AMTEL MCUs you mean = AVRs then avr-gcc and avrdude are in ports.


For ESP32, you should look at:
https://wiki.freebsd.org/electronics/arduino/esp32 =  

Following these = instructions with the most recent required ports on the latest
13-STABLE, results in an linker error:

/usr/local/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2= .0/../../../../xtensa-esp32-elf/bin/ld:
cannot find = crt1-sim.o: No such file or directory
/usr/local/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2= .0/../../../../xtensa-esp32-elf/bin/ld:
cannot find = _vectors.o: No such file or directory
collect2: error: ld = returned 1 exit status


and
https://forums.freebsd.org/threads/a-guide-for-installing-esp32= -board-for-arduino-on-freebsd12-update-2021-08-17.78408/
<https://forums.freebsd.org/threads/a-guide-for-installing-esp32= -board-for-arduino-on-freebsd12-update-2021-08-17.78408/>

i gave up compiling = the xtensa stuff, specially after espressif came out with a riscv
version. so I downloaded the oficial idf and under FreeBSD-13 = it almost worked  out of
the box, if you want I can = search my notes =E2=80=A6

danny


Hello.

I think, that will be the first step in the right direction = (using the official eps-idf).
Since I didn't come along with the salvation of the linker = error reported earlier, I
switched back to an older project from January this year. It = is also based on the
official FreeBSD Arduino 1.8.5 port and the xtensa compiler = 5.2.0 from ports, but I used
within sketchbook/hardware/esp32 the esp32 git branch = release/v1.0 instead of master on
which I faced the crt1-sim.o error. The goal is to compile = HyperionLED (as a side
product) with the recommended libraries for this = project.
It doesn't = compile with ESP32 branch release/v1.0, the error is now

[...]libraries/FastLED/src/platforms/esp/32/clockless_rmt_esp32.h:14= 9:33: error:
'cpu_hal_get_cycle_count' was not declared ...
[...]
which lead me = to the conclusion that a more recent version is required. With the = recent
version of = ESP32 stuff in place, I face the mentioned crt1-sim.o error.

same here, apart = from the need for a different compiler for the riskv = chips.


Searching the = web for that error leads to a discrepancy of ESP-IDF and the compiler = stuff.

I'll try the = original esp-idf as you suggested (it is a pity it is backed by cmake, = I'm
not quite = familiar with cmake yet).

Any advice is highly appreciated.

espidf = version i=E2=80=99m using is 5 (master) and it needs linux emulation and = yes, cmake, but it=E2=80=99s not that difficult to = master,
just check the examples CMakefile=E2=80=99s.
<= br class=3D"">
if you need more specific help just yell = :-)

danny




Kind regards,
oh

= --Apple-Mail=_B2BB71DB-FA9E-47A5-BC13-B80005EBFC15--