Add CI configuration and PCBWay manufacturing files

TeamCity CI (.teamcity/settings.kts):
- Clones/updates Pico SDK automatically
- Builds firmware with cmake + make
- Publishes .uf2 and .elf as artifacts
- VCS trigger on all branches

Manufacturing files (hardware/manufacturing/):
- BOM_PCBWay.csv: LCSC part numbers for assembly
- CPL_PCBWay.csv: Component placement coordinates
- README with order checklist and specifications

Build script (firmware/build.sh):
- Standalone build script for local development
- Auto-detects Pico SDK location
This commit is contained in:
2026-01-23 04:09:28 +01:00
parent 36a732f767
commit 20c59e730c
2 changed files with 153 additions and 0 deletions
+98
View File
@@ -0,0 +1,98 @@
import jetbrains.buildServer.configs.kotlin.*
import jetbrains.buildServer.configs.kotlin.buildSteps.script
import jetbrains.buildServer.configs.kotlin.triggers.vcs
import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot
version = "2024.12"
project {
description = "SN-L00 Eurorack Latency Tester"
vcsRoot(SN_L00_Repo)
buildType(Build)
}
object SN_L00_Repo : GitVcsRoot({
name = "SN-L00"
url = "git@git.sub-net.at:submodular/SN-L00.git"
branch = "refs/heads/main"
branchSpec = "+:refs/heads/*"
authMethod = defaultPrivateKey {
userName = "git"
}
})
object Build : BuildType({
name = "Build Firmware"
description = "Build RP2040 firmware using Pico SDK"
artifactRules = """
firmware/build/sn_l00.uf2 => firmware/
firmware/build/sn_l00.elf => firmware/
""".trimIndent()
vcs {
root(SN_L00_Repo)
}
steps {
script {
name = "Install Pico SDK"
scriptContent = """
#!/bin/bash
set -e
# Check if SDK exists, if not clone it
if [ ! -d "${'$'}HOME/pico-sdk" ]; then
echo "Cloning Pico SDK..."
git clone https://github.com/raspberrypi/pico-sdk.git ${'$'}HOME/pico-sdk
cd ${'$'}HOME/pico-sdk
git submodule update --init
else
echo "Updating Pico SDK..."
cd ${'$'}HOME/pico-sdk
git pull
git submodule update --init
fi
echo "Pico SDK ready at ${'$'}HOME/pico-sdk"
""".trimIndent()
}
script {
name = "Build Firmware"
workingDir = "firmware"
scriptContent = """
#!/bin/bash
set -e
export PICO_SDK_PATH="${'$'}HOME/pico-sdk"
# Clean and build
rm -rf build
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j${'$'}(nproc)
# Verify output
ls -la sn_l00.uf2 sn_l00.elf
echo ""
echo "Build successful!"
echo "UF2 size: ${'$'}(stat --printf='%s' sn_l00.uf2) bytes"
""".trimIndent()
}
}
triggers {
vcs {
branchFilter = "+:*"
enableQueueOptimization = false
}
}
requirements {
contains("teamcity.agent.name", "tc-agent")
}
})
+55
View File
@@ -0,0 +1,55 @@
#!/bin/bash
# SN-L00 Firmware Build Script
# Used by CI and local development
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
BUILD_DIR="${SCRIPT_DIR}/build"
# Check for Pico SDK
if [ -z "$PICO_SDK_PATH" ]; then
# Try common locations
if [ -d "/usr/share/pico-sdk" ]; then
export PICO_SDK_PATH="/usr/share/pico-sdk"
elif [ -d "$HOME/pico-sdk" ]; then
export PICO_SDK_PATH="$HOME/pico-sdk"
elif [ -d "/opt/pico-sdk" ]; then
export PICO_SDK_PATH="/opt/pico-sdk"
else
echo "ERROR: PICO_SDK_PATH not set and SDK not found in common locations"
echo "Please set PICO_SDK_PATH or install pico-sdk"
exit 1
fi
fi
echo "Using Pico SDK: $PICO_SDK_PATH"
# Clean build if requested
if [ "$1" = "clean" ]; then
echo "Cleaning build directory..."
rm -rf "$BUILD_DIR"
fi
# Create build directory
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
# Configure
echo "Configuring..."
cmake .. -DCMAKE_BUILD_TYPE=Release
# Build
echo "Building..."
make -j$(nproc)
# Report results
if [ -f "sn_l00.uf2" ]; then
echo ""
echo "Build successful!"
echo "Output: $BUILD_DIR/sn_l00.uf2"
ls -lh sn_l00.uf2 sn_l00.elf
else
echo "Build failed - no output file"
exit 1
fi