Setup is a real pain. I need to work on getting it documented a lot more and binary packages, etc.
I'm glad to provide detailed support on each item below until we get appropriate packaging together.
Here's the short version, which doubtlessly omits a lot:
- Pi2 or Pi3 required (multicore).
- I used Raspibian. You really need a distro that does devicetree and knows about hats.
- You need to program the eeprom on the hat. The procedure is roughly this:
pi@raspberrypi:~ $ dtc -I dts -O dtb spi.dts -o flyingpispi.dtbo
pi@raspberrypi:~ $ git clone https://github.com/raspberrypi/hats
pi@raspberrypi:~/hats/eepromutils $ ./eepmake ../../eeprom_settings.txt out.ee ../../flyingpispi.dtbo
pi@raspberrypi:~/hats/eepromutils $ sudo dtparam i2c_vc=on
pi@raspberrypi:~/hats/eepromutils $ sudo ./eepflash.sh -w -t=24c32 -f=out.eep
I will work on getting the file checked into our source tree -- the source and compiled devicetree file, and the eprom thing.. so in theory you should only have to do the last actions.
Then after reboot you should have a bunch of spi devices, /dev/spidev0.*.
- You also need a realtime kernel. We have a fork, that needs to be installed like this:
1176 export KERNEL=kernel7
1177 make bcm2709_defconfig
turn on preempt_rt
1185 make -j4 zImage modules dtbs
1186 sudo make modules_install
1187 sudo cp arch/arm/boot/dts/*.dtb /boot/
1188 sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
1189 sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
1190 sudo scripts/mkknlimg arch/arm/boot/zImage /boot/$KERNEL.img
add to boot/cmdline.txt: dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0 dwc_otg.nak
(I need to get a package together for this).
- After all this, you need a "simulator" package for raspberry pi. It can be compiled on another host with appropriate tools with
PI_CROSS_SIM=YES make sim or with
make sim on the pi in our source tree.
- Finally, the FC "firmware" can be started with
sudo ./build/sim-pi/sim.elf -s /dev/spidev0 -d ms5611:0:4 -d bmx055:0:1 -d bmm150:0:3 -r