ESP32 : make option MICROPY_FLOAT_IMPL#6294
ESP32 : make option MICROPY_FLOAT_IMPL#6294rcolistete wants to merge 1 commit intomicropython:masterfrom
Conversation
|
Does the STM32 also have a flag like this? |
Yes, micropython/ports/stm32/Makefile has this MICROPY_FLOAT_IMPL flag due to the following code : From which I adapted, except the line : |
|
Also, the majority (all?) of people compiling ESP32 with double precision is changing the 'esp32/mpconfigport.h' file :
as they don't see (on ESP32) the make flag/option used by STM32 : |
|
Ah I just figured STM32 has this flag because it also alters the build itself (like adding lib/libm_dbl source when using |
After a Internet search, I don't see one example at all using this flag (CFLAGS_EXTRA=...) to compile double precision, besides the Makefile. So this flag is less known by the community, not cited in any docs/tutorial/forum. Again, it is a lot more practical and known to use : |
|
This is now obsolete, after the move to CMake. So I'll close the PR. Feel free to rework it so it works with the latest code and reopen. |
Update documentation for end param in SPI.readinto()
Implement make option MICROPY_FLOAT_IMPL on ESP32, so it is simpler to build ESP32 firmware with single or double precision float point numbers. For example :
[esp32]$ make -j8 MICROPY_FLOAT_IMPL=doubleinstead of changing the 'esp32/mpconfigport.h', line :
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)to
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)Batch scripts to build many ESP32 firmware variants with combinations of boards (GENERIC, GENERIC_SPIRAM, etc), single/double precision, etc, become possible.
This option MICROPY_FLOAT_IMPL can also be configured by each board via $
BOARD/mpconfigboard.mk.In this way the ESP32 building workflow becomes more compatible with STM32 one.