forked from M-Labs/humpback-dds
Compare commits
2 Commits
e38bf09c26
...
330dadd9cc
Author | SHA1 | Date | |
---|---|---|---|
330dadd9cc | |||
237578a1b6 |
14
README.md
14
README.md
@ -2,14 +2,20 @@
|
||||
|
||||
MQTT-controlled 4-channel DDS signal generator using Urukul, Humpback and STM32 NUCLEO.
|
||||
|
||||
- [Continuous Integration](https://nixbld.m-labs.hk/job/stm32/stm32/humpback-dds)
|
||||
- [Download latest firmware build](https://nixbld.m-labs.hk/job/stm32/stm32/humpback-dds/latest/download-by-type/file/binary-dist)
|
||||
- [Continuous Integration](https://nixbld.m-labs.hk/job/mcu/humpback-dds/humpback-dds)
|
||||
- [Download latest firmware build](https://nixbld.m-labs.hk/job/mcu/humpback-dds/humpback-dds/latest/download-by-type/file/binary-dist)
|
||||
|
||||
## Nix commands
|
||||
|
||||
Start nix shell before anything.
|
||||
Humpback-DDS firmware is packaged using the [Nix](https://nixos.org) Flakes system. Install Nix 2.4+ and enable flakes by adding ``experimental-features = nix-command flakes`` to ``nix.conf`` (e.g. ``~/.config/nix/nix.conf``).
|
||||
|
||||
Once you have Flakes enabled, you can use ``nix build`` to build the firmware.
|
||||
|
||||
Alternatively, you can develop and build it within Nix shell:
|
||||
```shell
|
||||
nix-shell
|
||||
nix develop
|
||||
python fpga/fpga_config.py
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
**(For users who had completed the [networking setup](##networking-setup-for-first-time-user))** Flash firmware onto STM32 NUCLEO-H743ZI2 using OpenOCD.
|
||||
|
@ -1 +0,0 @@
|
||||
"05lq7c5yz320gasp5q4g76lbj8s1hv1ypgjfg9iqb6jiryy4kv75"
|
55
shell.nix
55
shell.nix
@ -1,55 +0,0 @@
|
||||
let
|
||||
mozillaOverlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
|
||||
pkgs = import <nixpkgs> {overlays = [mozillaOverlay];};
|
||||
in with pkgs;
|
||||
let
|
||||
migen = callPackage ./nix/migen.nix {};
|
||||
openocd = callPackage ./nix/openocd.nix {};
|
||||
rustPlatform = callPackage ./nix/rustPlatform.nix {};
|
||||
itm = callPackage ./nix/itm.nix {inherit rustPlatform;};
|
||||
|
||||
runOpenOcdBlock = writeShellScriptBin "run-openocd-block" ''
|
||||
openocd -f openocd/openocd.cfg
|
||||
'';
|
||||
|
||||
openocdFlash = writeShellScriptBin "openocd-flash" ''
|
||||
openocd -f openocd/openocd.cfg -f openocd/main.cfg
|
||||
'';
|
||||
|
||||
publishMqtt = writeShellScriptBin "publish-mqtt" ''
|
||||
mosquitto_pub -h localhost -t $1 -m "$2" -d
|
||||
'';
|
||||
|
||||
openOCDFlashCustomised = writeShellScriptBin "openocd-flash-customised" ''
|
||||
python3 flash.py $1 $2 $3 $4
|
||||
openocd -f openocd/openocd.cfg \
|
||||
-c "init
|
||||
reset init
|
||||
halt
|
||||
stm32h7x mass_erase 1
|
||||
flash write_image erase target/thumbv7em-none-eabihf/release/humpback-dds
|
||||
flash write_image flash_config.bin 0x081e0000 bin
|
||||
reset run
|
||||
shutdown"
|
||||
'';
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "Humpback-DDS";
|
||||
buildInputs = with rustPlatform.rust; [
|
||||
(pkgs.python3.withPackages(ps: [ migen ]))
|
||||
pkgs.yosys
|
||||
pkgs.nextpnr
|
||||
pkgs.icestorm
|
||||
pkgs.gdb
|
||||
pkgs.mosquitto
|
||||
openocd
|
||||
rustc
|
||||
cargo
|
||||
itm
|
||||
runOpenOcdBlock
|
||||
openocdFlash
|
||||
publishMqtt
|
||||
openOCDFlashCustomised
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user