ESP32 boot locks after the compass message

I’m testing ArduCopter on ESP32 WROOM32 and this is where it always locks (forever I think). I’ve built esp32-empty target. How can I see what is going wrong? The board had no other hardware connected and the log is the same on UART0 (GPIO1 and GPIO3).


Init ArduCopter V4.5.0-dev (ae5d04b6)

Free RAM: 110592
Firmware change: erasing EEPROM...
done.
load_all took 2398854us
No Compass backends available

I was told that it could be because there is no IMU attached. So I’ll be testing it later.

If you don’t have a min set of peripheral hardware, there’s no sense trying to build for ESP32. This would include an IMU, barometer, and compass at a bare minimum.

My understanding was that with the “clean” version you can add them later. But to add them later the system have to boot? I’m probably missing something. I’m new with ardupilot, sorry.

How do you expect an autopilot to function without knowing its orientation?

It’s my opinion, also, that ArduPilot on an ESP32 is mostly just a curiosity, and otherwise a waste of time. By the time you cobble together a crude rig that kind of works, you could’ve spent the same $40-$60 on a flight controller that is actually functional and supported.

And if you argue that you could design a custom circuit board for the purpose, I’d argue right back that you should design that board for an STM32.

Well I got it working with the sitl-in-hw.
ESP32 is fast, have 4MB flash, dual-core, have a lot of RAM, have on board WiFi and Bluetooth and is cheap. STM32 … not so much when you need a lot of flash. PX4 needs like 2MB (for some reason) and it’s only available on the more expensive F4s and F7s as far as I saw.
Why would you even use STM32 if you have the ESP32?
And yes I use both (and ESP8266 too) for various project.

Depends on which STM32 you’re referring to. Some rival the ESP32 quite handily.

And the reason is this: massive ArduPilot support, more IO, many already built boards. Built in Wi-Fi is pretty useless on anything that exceeds a hundred or so meters in range.

You said you’re new to ArduPilot. Building a custom board on ill-suited hardware is probably a rough way to get started.

Sure I’m not saying that the STMs are bad but they can’t rival the ESP32 with the features and the price only on the support side.
You will have real problems finding an STM32 with 240Mhz CPU and 512KB of RAM with WiFi and Bluetooth 4.2 and camera support all in one that costs like $3 literally mounted on a dev board and probably much less wholesale. It’s basically a small PC.
And you can get an ESP32 with an external antenna so the range can be much bigger than few hundreds meters but it’s fine for the most things even with the built-in one. Rovers, small drones things like that.
I’m new to Ardupilot but not to the programming, sensors or the micro controllers.

Neither am I new to any of the above. You’re welcome to disregard my opinion, but I think you may find frustration continuing down the path you’re on. That’s all I’m saying.

1 Like

Oh I believe you and I’m sure that I will get frustrated. But it’s part of the fun and as long as I can get something basic working it should be fine to get it all at some point or at least for some basic testing purposes. ESP32(family) is way too feature rich and really good for the most things to be skipped. The only thing it’s missing (which is a pain in the rear with ESP8266) are the pins of the bigger F4s and F7s. But it’s good enough.

All fair points, and I’m certainly a hypocrite if I were to suggest that experimentation with various hardware is no fun.

It might be worth the $40 or so to get an older F4 based autopilot that supports ArduPilot just to see how things work “normally” and get yourself familiar with the boot, calibration, and basic setup steps.

I think I have few STM32F401CC I think in the MCU bag but then you have to have radios for every copter you are controlling and with the WiFi you can just attach them to the WiFi AP and control them all at once … I just came up with that idea and I liked it :grin:
But that F401 will be tested too for sure if the image is not too big.

Rather than building another scratch-built board, I was suggesting procuring something like this:

SpeedyBee F405 V3 Flight Controller - 30x30 (getfpv.com)

Looks really nice and compact. I’m still in a process of choosing a flight controller and then I have to wait for it to get here :grin: . I have a bunch of IMUs, Baros and basically everything to get it tested until then.

There are a ton of compact options like that. The one I linked is supported and cheap, though I wouldn’t choose it for any of my builds. I’d lean toward a Matek or Kakute H743, instead, but those cost a bit more due to the more capable processor used.

1 Like

I am confused about all the responses by Yuri. The OP was not asking if ESP32 hardware is good or not or how it compares to STM32.

You could argue it does not make any since to use STM when Atmel Mega Microcontroller Arduino base worked… we have to push the technology further and just because STM works does not mean that should be the only MCU used.

Is there any updates on the original question outside of all the spam responses that followed? I am working on an ESP32 FC and wanted to see what kind of issues I might face with running ardu on it.

Thanks

Try the Ardupilot Discord channel for ESP32

1 Like