Re: STM32 development on FreeBSD?

Tomek CEDRO <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm,gmane.os.freebsd.current
Message-ID <CAFYkXjkCQA+nmYC0f4BPn+41rb_wQbaH8d-=NdJBLfHuPkrqXw@mail.gmail.com>
On Mon, Aug 17, 2026 at 11:20 AM A FreeBSD User <[email protected]> wrote:
>
> Am Tage des Herren Wed, 5 Aug 2026 14:53:44 +0200
> Tomek CEDRO <[email protected]> schrieb:
>
> > On Wed, Aug 5, 2026 at 10:15 AM A FreeBSD User <[email protected]> wrote:
> > >
> > > Hello,
> > >
> > > I was wondering if FreeBSD (I'm with 15-STABLE and CURRENT) could provide a suitable STM32
> > > development platform?
> > > I'am a novice in that matter! I have some minor (bad) experience with ESP-IDF/Espressif and
> > > xtensa-esp-elf/riscv32-esp-elf (extremely fragile) toolchain and since I'm not bound to the
> > > MCU, I think I should try STM32 (the aim is a small appliance targetting flight
> > > controllers, so STM32 might be the better choice).
> > >
> > > I found some remarks on the net, at least
> > >
> > > https://gist.github.com/jj1bdx/0eeb447882ccf695b7d9 (last active 4 years ago) favoring
> > > devel/gcc-arm-embedded (gcc14, but the port is broken on CURRENT),
> > >
> > > I tried avoiding older (i.e. pre 2020) hits on google search. I also found hints using
> > >
> > > devel/arm-eabi-gcc, devel/arm-eabi-newlib (would like to have picolibc instead, but no
> > > ports so far).
> > >
> > > Major question: is someone developing for STM32 MCUs on FreeRTOS or equivalent and willing
> > > toshare with a beginner some hints and tricks how to setup the environment? I'd prefere a
> > > simple Makefile driven environemnt, I made bad experiences as a starter with the Python
> > > hell and cmake/ninja in ESP-IDF from Espressif which is a moving target.
> > >
> > > On the other hand, since LLVM is the standard compiler in FreeBSD, I'm willing to focus on
> > > that compiler suite as well but didn't find any STM32 related hints in the ports tree.
> > >
> > > For some existing tiny projects of mine I'd like to use FreeRTOS, but for some flight
> > > controller experiments I'd like to compile betaflight or Ardupilot (on FreeBSD). This info
> > > just for the record.
> > >
> > > I'd like to stay with FreeBSD as a main development and workstation platform, so in the
> > > first approach I try to avoid any Linux.
> > >
> > > Thank you very much and thanks for the patience, even if it might hurt. And I see forward
> > > to read from you.
> > >
> > > Thanks in advance,
> > >
> > > oh
> > >
> > >
> > > --
> > >
> > > A FreeBSD user
> >
> > I am using FreeBSD for Apache NuttX RTOS development, try this one
> > out, supports many different architectures, and is kind of Unix for
> > MCU :-)
> >
> > https://nuttx.apache.org/
> >
> > List of supported platforms and chips and their peripherals is here:
> >
> > https://nuttx.apache.org/docs/latest/platforms/index.html
> >
> > gcc-arm-embedded compiler is in the ports. If you want to use esp32*
> > chips you can use one from esp-idf I patched it so Linux binaries are
> > installed and works on FreeBSD, plus Espressif has dedicated team for
> > NuttX development (yes esp-idf is a moving target but taken care of by
> > their team here). You can even work with AVR :-)
> >
> > Have fun :-)
> > Tomek
> >
> > --
> > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >
>
>
> Hello Tomek,
>
> thank you for hinting me towards NuttX. I am not a prefessional developer, more a casual
> programmer, so working with large frameworks in a casual manner is a nightmare. NuttX seems to
> have a much more structured interior than the ESP-IDF and I was really positively surprised
> about the fact that "make" is supported (I have hard times with cmake and its concept).
>
> Is there an intriduction for NuttX beginners on FreeBSD in special or in common for the
> various architectures you know of and willing to share?
>
> I abandonded esp32 architecture for now since the port provided in the official FreeBSD tree
> is LX6/LX7 only (no RISCV32) and the port found on github (search for trmobik esp32) is
> fragile and broken on recent 15-STABLE and CURRENT (I use those for other reasons).
>
> Many thanks!
>
> oh
>
> --
>
> A FreeBSD user

Hey there OH, nice to hear you like it, NuttX is my safe harbor in
embedded just like FreeBSD is my safe harbor in the IT :-)

There is "Getting Started" and "Guides" section in our documentation:

https://nuttx.apache.org/docs/latest/quickstart/index.html

You may also want to take a look at NuttX YouTube channel

https://www.youtube.com/@nuttxchannel

If you need any hints take a look at Discord:

https://discord.gg/YaqhJjHF95

ESP32 is not the architecture, it's only a product line name, these
chips can use Xtensa CPU architecture (i.e. ESP32, ESP32-S3), or
RISC-V CPU architecture (i.e. ESP32-C3, ESP32-C6). Because of that I
patched ESP-IDF upstream so their compilers can run on FreeBSD over
Linuxlator I work that way you can try :-)

Have fun! :-)
Tomek

ps/2: NuttX was initially BSD licensed! In 2015 Samsung took the
sources and created Tizen. In 2019 NuttX went Apache :-)

--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.