-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·60 lines (50 loc) · 1.55 KB
/
setup.sh
File metadata and controls
executable file
·60 lines (50 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# Setup script for DaisySP Patch.Init firmware project
set -e
echo "Setting up DaisySP Patch.Init firmware project..."
# Check for git
if ! command -v git &> /dev/null; then
echo "Error: git is not installed"
exit 1
fi
# Initialize and update git submodules
echo "Initializing DaisySP submodule..."
git submodule update --init --recursive
# Check if DaisySP directory exists
if [ ! -d "DaisySP" ]; then
echo "Error: DaisySP submodule not found"
exit 1
fi
# Build DaisySP library
echo "Building DaisySP library..."
cd DaisySP
if [ ! -f "Makefile" ]; then
echo "Error: DaisySP Makefile not found"
exit 1
fi
make
cd ..
# Check for ARM toolchain
echo "Checking for ARM toolchain..."
if ! command -v arm-none-eabi-gcc &> /dev/null; then
echo "Warning: ARM GCC toolchain not found in PATH"
echo "Please install ARM GCC toolchain for STM32 development"
echo "On macOS: brew install arm-none-eabi-gcc"
echo "On Linux: sudo apt-get install gcc-arm-none-eabi"
fi
# Check for dfu-util (for flashing)
if ! command -v dfu-util &> /dev/null; then
echo "Warning: dfu-util not found"
echo "Install dfu-util for firmware deployment:"
echo "On macOS: brew install dfu-util"
echo "On Linux: sudo apt-get install dfu-util"
fi
echo ""
echo "Setup complete!"
echo ""
echo "Next steps:"
echo " 1. Review src/main.cpp and customize your firmware"
echo " 2. Run 'make' to build the firmware"
echo " 3. Run 'make test' to run unit tests (requires Catch2)"
echo " 4. Run 'make program' to flash firmware (requires DFU mode)"
echo ""