modm-io / modm

modm: a C++23 library generator for AVR and ARM Cortex-M devices
https://modm.io
Mozilla Public License 2.0
733 stars 131 forks source link

[stm32] Place stack in SRAM by default on H7, add lbuild option #1100

Closed chris-durand closed 8 months ago

chris-durand commented 9 months ago

The DTCM is not accessible by regular DMA on H7 devices, which leads to DMA transfer errors when DMA buffers are allocated on the stack. The default stack location is changed to the D1 SRAM. An lbuild option is added to select the stack location between SRAM and DTCM.

chris-durand commented 9 months ago

@salkinium Do you have an idea how to fix the MacOS CI? There is some Python problem:

    import jinja2       # template engine
    ^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'jinja2'
scons: *** [generated/xpcc/identifier.hpp] Error 1

jinja2 is not found, but only when building the XPCC examples.

salkinium commented 9 months ago

The macOS Image Release was upgraded from 20231018.14 -> 20231025.2. In the process the pre-installed Python version is 3.12.0, while we install 3.11.6. The issue is that the XPCC SCons integration calls the builds via a python3 command line, which points to 3.12.0, while jinja2 is only installed for 3.11.6.

The solution is to fix the XPCC SCons integration to use the same Python interpreter that it was called with and not delegate to the shell environment for it. 🙄

salkinium commented 9 months ago

Gentle boop @chris-durand