0
\$\begingroup\$

Is there a reliable way to convert STM32 code to run on an Espressif microcontroller such as an ESP32 / ESP8685 ? Or would this have to be done manually?

\$\endgroup\$
0

2 Answers 2

1
\$\begingroup\$

Depend on what you want to do, and what is your definition of "porting". If you run Arduino framework, there are both STM32 Arduino Core and ESP32 Arduino Core that turn STM32 or ESP32 into an Arduino, and the application codes could be run over the Arduino framework with almost the same code base.

Of course, it does not support all the features mutually, for example, ESP32 has WiFi/Bluetooth while most of the STM32 does not have.

\$\endgroup\$
0
\$\begingroup\$

If code is STM32 hardware specific or uses STM32 software library specific functions then you need to implement it yourself to use ESP hardware or ESP software libraries.

If the code is just generic C then it should compile with little changes. If the code uses compiler specific features then if you use a different compiler you need to change the compiler specific features.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.