microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
41 stars 22 forks source link

codal_port/modspeech: include mphal.h for the simulator #171

Closed microbit-matt-hillsdon closed 3 months ago

microbit-matt-hillsdon commented 3 months ago

MICROPY_BEGIN_ATOMIC_SECTION/MICROPY_END_ATOMIC_SECTION are only defined in modspeech because of mpconfigport.h (indirectly). Include mphal.h so that the defaults are defined if the port does not define them (as in the sim case).

microbit-matt-hillsdon commented 3 months ago

You can see the sim compile error that motivated this here: https://github.com/microbit-foundation/micropython-microbit-v2-simulator/actions/runs/8376957819/job/22937869589 (though that branch is based on audio-recording so we can explore the sim work for that).

dpgeorge commented 3 months ago

Thanks, this is the correct change. It's needed because of the recent update to MicroPython v1.22.0.