20c59e730c
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
99 lines
2.5 KiB
Kotlin
99 lines
2.5 KiB
Kotlin
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")
|
|
}
|
|
})
|