← index #6186PR #16978
Related · high · value 9.664
QUERY · ISSUE

Pyboard D build does not include btree

openby peterhinchopened 2020-06-24updated 2024-09-14
port-stm32

The MICROPY_PY_BTREE option is specified for ESP8266 and ESP32, but not for the Pyboard D. Is this intentional?

CANDIDATE · PULL REQUEST

esp32/esp32_common.cmake: Skip BTree module when requested.

mergedby agattiopened 2025-03-21updated 2025-04-22
port-esp32

Summary

This PR makes the BTree module truly optional, as it was unconditionally enabled in the shared CMake script for the port.

This meant that if a board/variant did explicitly turn BTree off said request was not honoured by the build system and the BTree module would still be brought in.

I'm running out of flash space that can be used for code in a project of mine, so I've been disabling a few unneeded things - BTree being one of them. Incidentally, it also seems I cannot build an ESP32S3 firmware image without USB support - is that by design or should I go on and make that optional as well?

Testing

The code was built with no errors or warnings with both the default settings, and when adding set(MICROPY_PY_BTREE OFF) in a board's mpconfigboard.cmake file. The latter firmware was also tried out on an ESP32 board just to be sure.

Trade-offs and Alternatives

There shouldn't be any, as the default behaviour is not changed and the BTree module removal requires an explicit opt-in from the user.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied