Date: Mon, 6 Jul 2026 15:49:12 +0200 From: Tomek CEDRO <tomek@cedro.info> To: A FreeBSD User <freebsd@walstatt-de.de> Cc: freebsd-embedded@freebsd.org Subject: Re: Xtensa LX7/RISCv32 (ESP) toolchain: picolibc.specs location Message-ID: <CAFYkXjkhkekwPtaH92nym7-NoQr=-zr6CJA%2BgkZZC-QdV2=8Uw@mail.gmail.com> In-Reply-To: <20260706073219.5ee1e0a2@thor.sb211.local>
index | next in thread | previous in thread | raw e-mail
On Mon, Jul 6, 2026 at 5:35 AM A FreeBSD User <freebsd@walstatt-de.de> wrote: > > Hello, > > first of all I am a absolute beginner in embedded development! So, my knowledge about certain > toolchains and library specifica is limited. > > I use FreeBSD (15/1-STABLE and CURRENT) a the development platform and for some ESP32 > projects I'd like to utilize the ESP32 toolchain provided here > > https://github.com/trombik/xtensa-esp32-elf > > The port/toolchain does build for almost all espressif provided ESP-IDF (see > https://github.com/espressif/esp-idf), except esp-idf-v55 (espressif did change somehow the > requirements within a minor release update). I'm with ESP-IDF v6.0.2 using both Xtensa- and > RISCv32 toolchains with success on some small self-brewn code and on examples. > > But: I can't use the default picolibc library! The compiler (gcc14-xtensa or gcc14-riscv32) > bails out with an error not capable of finding any "-spec=picolibc.specs" file. > > It seems that such a picolibc.spec file is provided by the port/sources of piclib itself,, but > not installed by the port's framework. So I started fiddling around where the compiler might > search for this default specs file. There is not much information available about the correct > place to put the file, it is said that the file should reside within the toolchain's path - > which is beginning with /usr/local/xtensa-esp-elf-idf60/bin. > But I failed. Putting picolibc.specs anywhere within this base search path doesn't prevent me > being gifted by the error described above. > > So, I guess I lack in fundamental understandings of how this ominous picolibc.spec file works > and what it is intended for and therefor there might someone be willing to enlighten me. > > At the moment a workaround is to use old newlib by putting an appropriate sdkconfig.defaults > tag within the tree of the project: > > CONFIG_LIBC_NEWLIB=y > > Thanks in advance, > > Oliver Hey there Oliver, have you tried Linux binaries provided by ESP-IDF on FeeBSD? I work that way :-) The order is following: 1. `git clone https://github.com/espressif/esp-idf.git` 2. `./install.sh` creates the Python venv. 3. `./tools/idf_tools.py` using python venv fetches the desired tools. 4. `/.export.sh` provides shell env, or you can add manually tools that you need. I patched the upstream so it fetches Linux binaries on FreeBSD that work out of the box for me for Xtensa*, RV, etc, when building NuttX RTOS firmwares. You just need to have Linuxlator enabled and then add these tools to your path :-) I did not make OpenOCD (ESP-IDF-Linux-Xtensa) running on FreeBSD yet but I can live with that I use mostly native FreeBSD binary anyways :-) ps/1: You may want to take a look at Apache NuttX RTOS (https://nuttx.apache.org/) Espressif have dedicated team for NuttX so their chips coverage is full and ups to date. ps/2: Yes Espressif is known to flip things upside down all the time, even with minor releases (especially when using esp-idf sdk). They changed syntax for esptool v5 too! Recently they started obsoleting their MCUs just like the software (i.e. ESP32-P4 that I bought fresh out of the box from WaveShare was v1.3 while their "recent" chip revision is v3.1 that is incompatible with v1.3 lol) beware!! -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.infohome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFYkXjkhkekwPtaH92nym7-NoQr=-zr6CJA%2BgkZZC-QdV2=8Uw>
