aboutsummaryrefslogblamecommitdiff
path: root/projects/bootloader/stm-init.c
blob: 209dc8c40511185ea043f22cede32b4cd5882575 (plain) (tree)
1
2
3
4
5<
/* Disable modules that the bootloader doesn't need. */

#include "stm32f4xx_hal.h"

#undef HAL_I2C_MODULE_ENABLED
#undef HAL_SPI_MODULE_ENABLED

#include "../../stm-init.c"
>exit 1 fi echo "Setting export of reset pin" echo 135 > /sys/class/gpio/export echo "Setting reset pin to out" echo out > /sys/class/gpio/gpio135/direction echo "Flipping reset" echo 0 > /sys/class/gpio/gpio135/value echo 1 > /sys/class/gpio/gpio135/value echo "Configuring FPGA from $1" dd if="$1" of=/dev/spidev2.0 bs=32 echo "Turning on clock to FPGA" eim_peek_poke --write 0x020c8160 0x00000d2b