Open mocleiri opened 2 years ago
I was able to build after updating the H7 HAL files.
The stm32lib repo is a submodule at micropython/lib/stm32lib
I cloned the upstream STM32CubeH7 repo:
git clone https://github.com/STMicroelectronics/STM32CubeH7.git
Then ran the update script:
$ cd micropython/lib/stm32lib
$ ./fetch_from_upstream.sh STM32H7 ~/git/STM32CubeH7/
Then the stm32 build worked to build the firmware.
I'm going to have to file a pull request to update these files and in the interim change the micropython submodule back to my fork which can use the forked and fixed stm32lib repo.
I also have to remove the defines to constants defined in the new HAL in micropython-modules/microlite/micropython.mk:
-CXXFLAGS_USERMOD += -D__FPU_PRESENT=1
+# CXXFLAGS_USERMOD += -D__FPU_PRESENT=1
-CXXFLAGS_USERMOD += -D__ARM_FEATURE_DSP=1
+# CXXFLAGS_USERMOD += -D__ARM_FEATURE_DSP=1
I did something wrong and the build didn't actually work. On closer inspection there are differences in the name of the HAL functions that are used in machine_i2s.c from the STM32F4 and the HAL available on the STM32H7.
I need to bring in some board awareness to machine_i2s.c and then see if I can figure out which methods to use on the H7 HAL.
First you need to use specific SPI pins when connecting the microphone. Also there is a switch needed to be enabled in the mpconfigboard.h file.
There is also a MICROPY_HW_I2S2 switch. I'm not sure if the nucleo h743 supports more i2s channels or not.