Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6402060bd4
|
||
|
|
07e1c6f7b1
|
||
|
|
8abca8e4b2
|
||
|
|
cf2c72f812
|
||
|
|
cf5208fa45 | ||
|
|
1c8ae87374 | ||
|
|
62e8e31613 | ||
|
|
6bbb724923 | ||
|
|
3fc7e22b31 | ||
|
|
fd5d4cacfa | ||
|
|
ec052a2f69 | ||
|
|
a80ffb0707 | ||
|
|
115df5bb2d | ||
|
|
f30d57bd4a | ||
|
|
fef317c84f |
No files matched your search
+116
-37
@@ -218,8 +218,8 @@ jobs:
|
||||
./code/RocketLauncher/out/simulide/firmware.elf
|
||||
retention-days: 90
|
||||
|
||||
build-hardware:
|
||||
name: Build Hardware Firmware
|
||||
build-uno-r3:
|
||||
name: Build Arduino UNO R3 Firmware
|
||||
runs-on: ubuntu-latest
|
||||
needs: [version, cmake-build, test]
|
||||
|
||||
@@ -247,24 +247,67 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pio-
|
||||
|
||||
- name: Build Hardware Firmware
|
||||
- name: Build UNO R3 Firmware
|
||||
working-directory: ./code/RocketLauncher
|
||||
run: |
|
||||
pio run -e uno_hw
|
||||
|
||||
- name: Upload hardware firmware
|
||||
- name: Upload UNO R3 firmware
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hardware-firmware
|
||||
name: uno-r3-firmware
|
||||
path: |
|
||||
./code/RocketLauncher/.pio/build/uno_hw/firmware.hex
|
||||
./code/RocketLauncher/.pio/build/uno_hw/firmware.elf
|
||||
retention-days: 90
|
||||
|
||||
build-uno-r4-minima:
|
||||
name: Build Arduino UNO R4 Minima Firmware
|
||||
runs-on: ubuntu-latest
|
||||
needs: [version, cmake-build, test]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install platformio==${{ env.PLATFORMIO_VERSION }}
|
||||
|
||||
- name: Cache PlatformIO packages
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.platformio
|
||||
~/.cache/pip
|
||||
key: ${{ runner.os }}-pio-${{ hashFiles('**/platformio.ini') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pio-
|
||||
|
||||
- name: Build UNO R4 Minima Firmware
|
||||
working-directory: ./code/RocketLauncher
|
||||
run: |
|
||||
pio run -e uno_r4_minima
|
||||
|
||||
- name: Upload UNO R4 Minima firmware
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: uno-r4-minima-firmware
|
||||
path: |
|
||||
./code/RocketLauncher/.pio/build/uno_r4_minima/firmware.bin
|
||||
./code/RocketLauncher/.pio/build/uno_r4_minima/firmware.elf
|
||||
retention-days: 90
|
||||
|
||||
create-tag:
|
||||
name: Create Git Tag
|
||||
runs-on: ubuntu-latest
|
||||
needs: [version, build-simulation, build-hardware]
|
||||
needs: [version, build-simulation, build-uno-r3, build-uno-r4-minima]
|
||||
if: ${{ needs.version.outputs.is-release == 'true' }}
|
||||
outputs:
|
||||
tag: ${{ needs.version.outputs.tag }}
|
||||
@@ -345,12 +388,14 @@ jobs:
|
||||
|
||||
### Downloads
|
||||
- **Simulation Firmware**: For SimulIDE testing
|
||||
- **Hardware Firmware**: For Arduino upload
|
||||
- **Arduino UNO R3 Firmware**: For classic Arduino compatibility
|
||||
- **Arduino UNO R4 Minima Firmware**: For modern ARM-based Arduino
|
||||
|
||||
### Installation
|
||||
1. Download the appropriate firmware file
|
||||
2. For Arduino: Use Arduino IDE or PlatformIO to upload
|
||||
3. For SimulIDE: Load the wiring file and firmware will auto-load
|
||||
1. Download the appropriate firmware file for your board
|
||||
2. For Arduino UNO R3: Use Arduino IDE or PlatformIO to upload .hex file
|
||||
3. For Arduino UNO R4 Minima: Use Arduino IDE or PlatformIO to upload .bin file
|
||||
4. For SimulIDE: Load the wiring file and firmware will auto-load
|
||||
|
||||
### Build Information
|
||||
- **Version**: ${{ needs.version.outputs.version }}
|
||||
@@ -380,7 +425,7 @@ jobs:
|
||||
create-release:
|
||||
name: Create Release Assets
|
||||
runs-on: ubuntu-latest
|
||||
needs: [version, build-simulation, build-hardware, create-tag]
|
||||
needs: [version, build-simulation, build-uno-r3, build-uno-r4-minima, create-tag]
|
||||
if: ${{ needs.version.outputs.is-release == 'true' }}
|
||||
|
||||
steps:
|
||||
@@ -394,13 +439,15 @@ jobs:
|
||||
|
||||
- name: Create release package
|
||||
run: |
|
||||
mkdir -p release/firmware/hardware
|
||||
mkdir -p release/firmware/uno-r3
|
||||
mkdir -p release/firmware/uno-r4-minima
|
||||
mkdir -p release/firmware/simulide
|
||||
mkdir -p release/3dprints
|
||||
mkdir -p release/simulide
|
||||
|
||||
# Copy firmware files to proper directories
|
||||
cp -r artifacts/hardware-firmware/* release/firmware/hardware/
|
||||
cp -r artifacts/uno-r3-firmware/* release/firmware/uno-r3/
|
||||
cp -r artifacts/uno-r4-minima-firmware/* release/firmware/uno-r4-minima/
|
||||
cp -r artifacts/simulation-firmware/* release/firmware/simulide/
|
||||
|
||||
# Copy 3D print files (if they exist)
|
||||
@@ -421,7 +468,8 @@ jobs:
|
||||
|
||||
```
|
||||
├── firmware/
|
||||
│ ├── hardware/ # Arduino UNO firmware files
|
||||
│ ├── uno-r3/ # Arduino UNO R3 (ATmega328P) firmware
|
||||
│ ├── uno-r4-minima/ # Arduino UNO R4 Minima (Renesas RA4M1) firmware
|
||||
│ └── simulide/ # SimulIDE simulation firmware
|
||||
├── 3dprints/ # 3D printable parts (SLA files)
|
||||
├── simulide/ # SimulIDE wiring files (.sim1)
|
||||
@@ -430,9 +478,13 @@ jobs:
|
||||
|
||||
## 🚀 Firmware Files
|
||||
|
||||
### Hardware (Arduino UNO)
|
||||
- `firmware/hardware/firmware.hex` - Hex file for Arduino upload
|
||||
- `firmware/hardware/firmware.elf` - ELF file for debugging
|
||||
### Arduino UNO R3 (ATmega328P)
|
||||
- `firmware/uno-r3/firmware.hex` - Hex file for Arduino UNO R3 upload
|
||||
- `firmware/uno-r3/firmware.elf` - ELF file for debugging
|
||||
|
||||
### Arduino UNO R4 Minima (Renesas RA4M1)
|
||||
- `firmware/uno-r4-minima/firmware.bin` - Binary file for Arduino UNO R4 Minima upload
|
||||
- `firmware/uno-r4-minima/firmware.elf` - ELF file for debugging
|
||||
|
||||
### Simulation (SimulIDE)
|
||||
- `firmware/simulide/firmware.hex` - Hex file for SimulIDE simulation
|
||||
@@ -452,10 +504,15 @@ jobs:
|
||||
|
||||
## 📋 Installation
|
||||
|
||||
### For Hardware
|
||||
### For Arduino UNO R3
|
||||
1. Download the package
|
||||
2. Use Arduino IDE or PlatformIO to upload `firmware/hardware/firmware.hex`
|
||||
3. Or use `./scripts/build.sh upload` from the project directory
|
||||
2. Use Arduino IDE or PlatformIO to upload `firmware/uno-r3/firmware.hex`
|
||||
3. Or use `./scripts/build.sh board uno_hw && ./scripts/build.sh upload` from the project directory
|
||||
|
||||
### For Arduino UNO R4 Minima
|
||||
1. Download the package
|
||||
2. Use Arduino IDE or PlatformIO to upload `firmware/uno-r4-minima/firmware.bin`
|
||||
3. Or use `./scripts/build.sh board uno_r4_minima && ./scripts/build.sh upload` from the project directory
|
||||
|
||||
### For Simulation
|
||||
1. Download the package
|
||||
@@ -495,7 +552,7 @@ jobs:
|
||||
build-status:
|
||||
name: Build Status Report
|
||||
runs-on: ubuntu-latest
|
||||
needs: [cmake-build, test, build-simulation, build-hardware]
|
||||
needs: [cmake-build, test, build-simulation, build-uno-r3, build-uno-r4-minima]
|
||||
if: always()
|
||||
|
||||
steps:
|
||||
@@ -529,10 +586,16 @@ jobs:
|
||||
echo "❌ **Simulation Build:** FAILED" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
if [ "${{ needs.build-hardware.result }}" == "success" ]; then
|
||||
echo "✅ **Hardware Build:** SUCCESS" >> $GITHUB_STEP_SUMMARY
|
||||
if [ "${{ needs.build-uno-r3.result }}" == "success" ]; then
|
||||
echo "✅ **UNO R3 Build:** SUCCESS" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **Hardware Build:** FAILED" >> $GITHUB_STEP_SUMMARY
|
||||
echo "❌ **UNO R3 Build:** FAILED" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
if [ "${{ needs.build-uno-r4-minima.result }}" == "success" ]; then
|
||||
echo "✅ **UNO R4 Minima Build:** SUCCESS" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **UNO R4 Minima Build:** FAILED" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
@@ -542,7 +605,7 @@ jobs:
|
||||
publish-package:
|
||||
name: Publish to GitHub Packages
|
||||
runs-on: ubuntu-latest
|
||||
needs: [version, build-simulation, build-hardware, create-tag]
|
||||
needs: [version, build-simulation, build-uno-r3, build-uno-r4-minima, create-tag]
|
||||
if: ${{ needs.version.outputs.is-release == 'true' }}
|
||||
|
||||
steps:
|
||||
@@ -556,13 +619,15 @@ jobs:
|
||||
|
||||
- name: Create package manifest
|
||||
run: |
|
||||
mkdir -p package/firmware/hardware
|
||||
mkdir -p package/firmware/uno-r3
|
||||
mkdir -p package/firmware/uno-r4-minima
|
||||
mkdir -p package/firmware/simulide
|
||||
mkdir -p package/3dprints
|
||||
mkdir -p package/simulide
|
||||
|
||||
# Copy firmware files to proper directories
|
||||
cp -r artifacts/hardware-firmware/* package/firmware/hardware/
|
||||
cp -r artifacts/uno-r3-firmware/* package/firmware/uno-r3/
|
||||
cp -r artifacts/uno-r4-minima-firmware/* package/firmware/uno-r4-minima/
|
||||
cp -r artifacts/simulation-firmware/* package/firmware/simulide/
|
||||
|
||||
# Copy 3D print files (if they exist)
|
||||
@@ -580,10 +645,11 @@ jobs:
|
||||
{
|
||||
"name": "lukes-rocket-launcher-firmware",
|
||||
"version": "${{ needs.version.outputs.version }}",
|
||||
"description": "Arduino firmware for Luke's Rocket Launch Controller",
|
||||
"main": "firmware/hardware/firmware.hex",
|
||||
"description": "Multi-board Arduino firmware for Luke's Rocket Launch Controller (UNO R3, UNO R4 Minima, SimulIDE)",
|
||||
"main": "firmware/uno-r3/firmware.hex",
|
||||
"files": [
|
||||
"firmware/**/*.hex",
|
||||
"firmware/**/*.bin",
|
||||
"firmware/**/*.elf",
|
||||
"3dprints/**/*",
|
||||
"simulide/**/*.sim1",
|
||||
@@ -595,13 +661,16 @@ jobs:
|
||||
},
|
||||
"keywords": [
|
||||
"arduino",
|
||||
"arduino-uno-r3",
|
||||
"arduino-uno-r4-minima",
|
||||
"rocket",
|
||||
"launcher",
|
||||
"firmware",
|
||||
"simulide",
|
||||
"3d-printing",
|
||||
"cmake",
|
||||
"platformio"
|
||||
"platformio",
|
||||
"multi-board"
|
||||
],
|
||||
"author": "KofTwentyTwo",
|
||||
"license": "MIT",
|
||||
@@ -620,7 +689,8 @@ jobs:
|
||||
|
||||
\`\`\`
|
||||
├── firmware/
|
||||
│ ├── hardware/ # Arduino UNO firmware files
|
||||
│ ├── uno-r3/ # Arduino UNO R3 (ATmega328P) firmware
|
||||
│ ├── uno-r4-minima/ # Arduino UNO R4 Minima (Renesas RA4M1) firmware
|
||||
│ └── simulide/ # SimulIDE simulation firmware
|
||||
├── 3dprints/ # 3D printable parts (SLA files)
|
||||
├── simulide/ # SimulIDE wiring files (.sim1)
|
||||
@@ -629,9 +699,13 @@ jobs:
|
||||
|
||||
## 🚀 Firmware Files
|
||||
|
||||
### Hardware (Arduino UNO)
|
||||
- \`firmware/hardware/firmware.hex\` - Hex file for Arduino upload
|
||||
- \`firmware/hardware/firmware.elf\` - ELF file for debugging
|
||||
### Arduino UNO R3 (ATmega328P)
|
||||
- \`firmware/uno-r3/firmware.hex\` - Hex file for Arduino UNO R3 upload
|
||||
- \`firmware/uno-r3/firmware.elf\` - ELF file for debugging
|
||||
|
||||
### Arduino UNO R4 Minima (Renesas RA4M1)
|
||||
- \`firmware/uno-r4-minima/firmware.bin\` - Binary file for Arduino UNO R4 Minima upload
|
||||
- \`firmware/uno-r4-minima/firmware.elf\` - ELF file for debugging
|
||||
|
||||
### Simulation (SimulIDE)
|
||||
- \`firmware/simulide/firmware.hex\` - Hex file for SimulIDE simulation
|
||||
@@ -651,10 +725,15 @@ jobs:
|
||||
|
||||
## 📋 Installation
|
||||
|
||||
### For Hardware
|
||||
### For Arduino UNO R3
|
||||
1. Download the package
|
||||
2. Use Arduino IDE or PlatformIO to upload \`firmware/hardware/firmware.hex\`
|
||||
3. Or use \`./scripts/build.sh upload\` from the project directory
|
||||
2. Use Arduino IDE or PlatformIO to upload \`firmware/uno-r3/firmware.hex\`
|
||||
3. Or use \`./scripts/build.sh board uno_hw && ./scripts/build.sh upload\` from the project directory
|
||||
|
||||
### For Arduino UNO R4 Minima
|
||||
1. Download the package
|
||||
2. Use Arduino IDE or PlatformIO to upload \`firmware/uno-r4-minima/firmware.bin\`
|
||||
3. Or use \`./scripts/build.sh board uno_r4_minima && ./scripts/build.sh upload\` from the project directory
|
||||
|
||||
### For Simulation
|
||||
1. Download the package
|
||||
|
||||
Generated
+1
@@ -6,3 +6,4 @@
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
/dbnavigator.xml
|
||||
Generated
+248
@@ -0,0 +1,248 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="BackendCodeEditorSettings">
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedOverridenMethod/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppModulePartitionWithSeveralPartitionUnits/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantFwdClassOrEnumSpecifier/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifierADL/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+17
@@ -0,0 +1,17 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Sim" type="ShConfigurationType">
|
||||
<option name="SCRIPT_TEXT" value="" />
|
||||
<option name="INDEPENDENT_SCRIPT_PATH" value="true" />
|
||||
<option name="SCRIPT_PATH" value="$PROJECT_DIR$/code/RocketLauncher/scripts/build.sh" />
|
||||
<option name="SCRIPT_OPTIONS" value="sim" />
|
||||
<option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
|
||||
<option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$/code/RocketLauncher/" />
|
||||
<option name="INDEPENDENT_INTERPRETER_PATH" value="true" />
|
||||
<option name="INTERPRETER_PATH" value="/bin/bash" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="EXECUTE_IN_TERMINAL" value="true" />
|
||||
<option name="EXECUTE_SCRIPT_FILE" value="true" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -1,7 +1,8 @@
|
||||
# 🚀 Luke's Rocket Launch Controller
|
||||
|
||||
[](https://github.com/KofTwentyTwo/Lukes-Rocket-Launcher/actions)
|
||||
[](https://github.com/KofTwentyTwo/Lukes-Rocket-Launcher/actions)
|
||||
[](https://github.com/KofTwentyTwo/Lukes-Rocket-Launcher/actions?query=workflow%3A%22Build+and+Test+Arduino+Firmware%22)
|
||||
[](https://github.com/KofTwentyTwo/Lukes-Rocket-Launcher/releases)
|
||||
[](https://github.com/KofTwentyTwo/Lukes-Rocket-Launcher/actions?query=workflow%3A%22Build+and+Test+Arduino+Firmware%22)
|
||||
[](https://platformio.org/)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
@@ -9,12 +10,9 @@
|
||||
|
||||
**To be clear** - this is for an awesome 11-year-old that loves rockets and micro-electronics and a nerdy dad that wants to empower and support him in every way possible. Because nothing says "I love you" like helping your kid build something that can launch rockets into the sky! 🚀💕
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
<video src="docs/clip-1.mp4" width="100%" controls>
|
||||
Your browser doesn't support video playback, or this just still breaks at times in Github...
|
||||
</video>
|
||||

|
||||
|
||||
*Watch the controller in action! The simulation shows the complete launch sequence from startup to ignition.*
|
||||
|
||||
@@ -154,58 +152,154 @@ The project now includes comprehensive unit testing:
|
||||
pio lib install "thomasfredericks/Bounce2"
|
||||
```
|
||||
|
||||
### **Building & Testing** 🧪
|
||||
The project now includes a comprehensive build system with automated testing!
|
||||
## 🎯 **Multi-Board Support** 🎯
|
||||
|
||||
This project now supports multiple Arduino boards, allowing you to choose your target hardware:
|
||||
|
||||
#### **Supported Boards**
|
||||
- **Arduino UNO R3** (ATmega328P) - Classic Arduino compatibility
|
||||
- **Arduino UNO R4 Minima** (Renesas RA4M1) - Modern 32-bit ARM architecture
|
||||
- **Simulation Environment** - Safe testing without hardware
|
||||
|
||||
#### **Quick Board Selection**
|
||||
```bash
|
||||
# 🚀 Default: Run tests and build everything
|
||||
make
|
||||
# Select your target board interactively
|
||||
./scripts/build.sh configure
|
||||
|
||||
# 🧪 Just run tests
|
||||
make test
|
||||
# Change board selection anytime
|
||||
./scripts/build.sh board
|
||||
|
||||
# 🔧 Build everything (skip tests)
|
||||
make build-only
|
||||
# Quick board selection by name
|
||||
./scripts/build.sh board uno_hw # Arduino UNO R3
|
||||
./scripts/build.sh board uno_r4_minima # Arduino UNO R4 Minima
|
||||
./scripts/build.sh board simulide # Simulation
|
||||
|
||||
# 🎮 Build for simulation
|
||||
make build-sim
|
||||
|
||||
# ⚡ Build for hardware
|
||||
make build-hw
|
||||
|
||||
# 📤 Upload to Arduino
|
||||
make upload
|
||||
|
||||
# 🎮 Prepare for SimulIDE
|
||||
make upload-sim
|
||||
|
||||
# 📡 Monitor serial output
|
||||
make monitor
|
||||
|
||||
# 🎨 Format code
|
||||
make format
|
||||
|
||||
# 🧹 Clean build files
|
||||
make clean
|
||||
|
||||
# ❓ Show all available targets
|
||||
make help
|
||||
# Show current board
|
||||
./scripts/build.sh status
|
||||
```
|
||||
|
||||
**Why the new build system?** We've added comprehensive unit testing and automated builds to ensure reliability and make development easier!
|
||||
#### **Board-Specific Workflows**
|
||||
```bash
|
||||
# After selecting board with ./scripts/build.sh configure:
|
||||
./scripts/build.sh firmware # Builds for selected board
|
||||
./scripts/build.sh upload # Uploads to selected board
|
||||
./scripts/build.sh monitor # Monitors selected board
|
||||
|
||||
# All commands automatically use your selected board
|
||||
```
|
||||
|
||||
### **What This Means for Developers** 🚀
|
||||
|
||||
✅ **Easy Board Switching** - Interactive selection during configuration
|
||||
✅ **Persistent Configuration** - Board selection saved in config file
|
||||
✅ **Identical Functionality** - Your rocket controller works the same on all boards
|
||||
✅ **Future-Proof** - Support for both classic and modern Arduino hardware
|
||||
✅ **Safe Development** - Test in simulation before using real hardware
|
||||
✅ **Professional Workflow** - Industry-standard multi-platform development
|
||||
|
||||
### **Documentation & Tools** 📚
|
||||
|
||||
- **`./scripts/build.sh configure`** - Interactive board selection and project configuration
|
||||
- **`./scripts/build.sh board`** - Change board selection anytime
|
||||
- **`MULTI_BOARD_TESTING.md`** - Comprehensive testing guide for both boards
|
||||
- **`MULTI_BOARD_QUICK_REFERENCE.md`** - Quick reference for daily development
|
||||
- **Enhanced build script** - Board-aware building, uploading, and monitoring
|
||||
|
||||
### **Example Development Workflow**
|
||||
|
||||
```bash
|
||||
# 1. Start with simulation (safe testing)
|
||||
./scripts/build.sh configure # Select simulide
|
||||
./scripts/build.sh sim
|
||||
|
||||
# 2. Test on UNO R3 (classic hardware)
|
||||
./scripts/build.sh board uno_hw
|
||||
./scripts/build.sh firmware
|
||||
./scripts/build.sh upload
|
||||
./scripts/build.sh monitor
|
||||
|
||||
# 3. Test on UNO R4 Minima (modern hardware)
|
||||
./scripts/build.sh board uno_r4_minima
|
||||
./scripts/build.sh firmware
|
||||
./scripts/build.sh upload
|
||||
./scripts/build.sh monitor
|
||||
|
||||
# 4. Compare behavior across platforms
|
||||
# All boards should provide identical functionality
|
||||
```
|
||||
|
||||
This approach ensures your rocket controller works reliably on both classic and modern Arduino hardware!
|
||||
|
||||
### **Getting Started with Multi-Board** 🎯
|
||||
|
||||
1. **Configure and select board**: `./scripts/build.sh configure`
|
||||
2. **Build and test**: `./scripts/build.sh firmware`
|
||||
3. **Verify functionality**: `./scripts/build.sh upload` and `./scripts/build.sh monitor`
|
||||
4. **Change boards anytime**: `./scripts/build.sh board uno_hw` for new selection
|
||||
|
||||
This multi-board support ensures your rocket controller works reliably whether you're using classic Arduino hardware or modern ARM architecture!
|
||||
|
||||
### **Building & Testing** 🧪
|
||||
The project now includes a comprehensive build system with automated testing and simulation!
|
||||
|
||||
```bash
|
||||
# 🚀 Build and launch simulator (recommended for development)
|
||||
./scripts/build.sh sim
|
||||
|
||||
# 🧪 Run unit tests
|
||||
./scripts/build.sh test
|
||||
|
||||
# 🔧 Build everything (tests + CMake + PlatformIO)
|
||||
./scripts/build.sh
|
||||
|
||||
# 🎮 Build simulation firmware only
|
||||
./scripts/build.sh firmware-sim
|
||||
|
||||
# ⚡ Build hardware firmware only
|
||||
./scripts/build.sh firmware-hw
|
||||
|
||||
# 📤 Upload to Arduino (uses current board selection)
|
||||
./scripts/build.sh upload
|
||||
|
||||
# 📡 Monitor serial output (uses current board selection)
|
||||
./scripts/build.sh monitor
|
||||
|
||||
# 🎨 Format code
|
||||
./scripts/build.sh format
|
||||
|
||||
# 🧹 Clean build files
|
||||
./scripts/build.sh clean
|
||||
|
||||
# ❓ Show all available commands
|
||||
./scripts/build.sh help
|
||||
```
|
||||
|
||||
**Why the new build system?** We've added comprehensive unit testing, automated builds, and **multi-board support** to ensure reliability and make development easier across different Arduino platforms!
|
||||
|
||||
### **Build System Benefits** 🎯
|
||||
- **🚀 One Command**: `make` runs tests and builds everything
|
||||
- **🚀 One Command**: `./scripts/build.sh sim` builds and launches simulator
|
||||
- **🧪 Quality Assurance**: Tests run automatically before builds
|
||||
- **🔧 Multiple Targets**: Build for simulation, hardware, or both
|
||||
- **🎮 Simulator Integration**: Automatic SimulIDE launch with firmware loading
|
||||
- **📱 Cross-Platform**: Works on macOS, Linux, and Windows
|
||||
- **🎨 Code Quality**: Automatic formatting and style checking
|
||||
- **📊 Status Monitoring**: Easy to see what's working and what needs attention
|
||||
- **🎯 Multi-Board Support**: Easy switching between Arduino UNO R3, UNO R4 Minima, and simulation
|
||||
|
||||
### **Multi-Board Development Workflow** 🔄
|
||||
1. **Start with simulation** - Test safely without hardware
|
||||
2. **Test on UNO R3** - Verify classic Arduino compatibility
|
||||
3. **Test on UNO R4 Minima** - Verify modern ARM compatibility
|
||||
4. **Compare behavior** - Ensure identical functionality across platforms
|
||||
|
||||
This approach ensures your rocket controller works reliably on both classic and modern Arduino hardware!
|
||||
|
||||
### **Simulation** (Test Before You Test!)
|
||||
The project includes SimulIDE simulation files:
|
||||
- Open `wiring/rocker_launcher_controls.sim1` in SimulIDE
|
||||
- The firmware will automatically load from the build output
|
||||
The project includes SimulIDE simulation files with **automatic launch**:
|
||||
- **One command**: `./scripts/build.sh sim` builds and launches SimulIDE
|
||||
- **Auto-loading**: Firmware automatically loads from the build output
|
||||
- **Wiring files**: Use `wiring/rocker_launcher_controls.sim1` for testing
|
||||
- **Fast iteration**: Make changes, re-run script, test immediately
|
||||
- Test all functionality before building hardware (because debugging with real rockets is expensive!)
|
||||
|
||||
## 🎨 **3D Printing & Assembly**
|
||||
@@ -257,7 +351,7 @@ The project includes a comprehensive test suite:
|
||||
- **🔍 1 test under investigation**: Startup transition logic
|
||||
- **🧪 Test framework**: Unity-based unit testing with mock hardware
|
||||
|
||||
**Run tests**: `make test` from the `code/RocketLauncher/` directory
|
||||
**Run tests**: `./scripts/build.sh test` from the `code/RocketLauncher/` directory
|
||||
|
||||
### **Project Structure**
|
||||
```
|
||||
@@ -322,11 +416,12 @@ We welcome contributions to improve the rocket launch controller! Areas for enha
|
||||
1. Fork the repository
|
||||
2. Create a feature branch
|
||||
3. Make your changes
|
||||
4. **Run tests**: `make test` (must pass)
|
||||
5. **Build everything**: `make` (tests + builds)
|
||||
6. **Format code**: `make format` (maintains style)
|
||||
7. Test thoroughly (simulation + hardware)
|
||||
8. Submit a pull request
|
||||
4. **Run tests**: `./scripts/build.sh test` (must pass)
|
||||
5. **Test in simulator**: `./scripts/build.sh sim` (verify functionality)
|
||||
6. **Build everything**: `./scripts/build.sh` (tests + builds)
|
||||
7. **Format code**: `./scripts/build.sh format` (maintains style)
|
||||
8. Test thoroughly (simulation + hardware)
|
||||
9. Submit a pull request
|
||||
|
||||
**Testing Requirements**: All new features must include unit tests. The test suite must pass before merging.
|
||||
|
||||
|
||||
+312
@@ -0,0 +1,312 @@
|
||||
# 🚀 Luke's Rocket Launcher - Release Management Guide
|
||||
|
||||
## 📋 Quick Reference
|
||||
|
||||
### **Branch Types & Naming**
|
||||
- `main` - Production-ready code, always deployable
|
||||
- `develop` - Integration branch for features
|
||||
- `feature/*` - New features (from `develop`)
|
||||
- `bugfix/*` - Bug fixes (from `main`)
|
||||
- `release/*` - Release preparation (from `develop`)
|
||||
- `hotfix/*` - Urgent fixes (from `main`)
|
||||
|
||||
### **Release Commands**
|
||||
```bash
|
||||
# Start a new release
|
||||
./scripts/release.sh 0.1.0 start
|
||||
|
||||
# Finish a release (creates tag, merges to main/develop)
|
||||
./scripts/release.sh 0.1.0 finish
|
||||
|
||||
# Create a new branch
|
||||
./scripts/create-branch.sh feature new-feature-name
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🌿 Git Branching Model
|
||||
|
||||
### **Main Branches**
|
||||
- **`main`** - Always contains production-ready code
|
||||
- **`develop`** - Integration branch for upcoming releases
|
||||
|
||||
### **Supporting Branches**
|
||||
- **`feature/*`** - New features (branch from `develop`, merge back to `develop`)
|
||||
- **`bugfix/*`** - Bug fixes (branch from `main`, merge back to `main`)
|
||||
- **`release/*`** - Release preparation (branch from `develop`, merge to both `main` and `develop`)
|
||||
- **`hotfix/*`** - Critical fixes (branch from `main`, merge to both `main` and `develop`)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Release Process
|
||||
|
||||
### **1. Start a Release**
|
||||
```bash
|
||||
# Create release branch from develop
|
||||
./scripts/release.sh 0.1.0 start
|
||||
|
||||
# This will:
|
||||
# - Switch to develop branch
|
||||
# - Create release/0.1.0 branch
|
||||
# - Push to remote
|
||||
```
|
||||
|
||||
### **2. Prepare the Release**
|
||||
- Update version numbers in code
|
||||
- Update CHANGELOG.md
|
||||
- Update documentation
|
||||
- Test thoroughly
|
||||
|
||||
### **3. Finish the Release**
|
||||
```bash
|
||||
# Complete the release process
|
||||
./scripts/release.sh 0.1.0 finish
|
||||
|
||||
# This will:
|
||||
# - Merge release branch to main
|
||||
# - Create and push tag v0.1.0
|
||||
# - Merge release branch to develop
|
||||
# - Clean up release branch
|
||||
# - Trigger automated workflow
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⚡ Automated Pipeline
|
||||
|
||||
### **What Happens Automatically**
|
||||
1. **Tag Push** triggers GitHub Actions workflow
|
||||
2. **Workflow Builds** firmware (hardware + simulation)
|
||||
3. **Workflow Creates** GitHub release
|
||||
4. **Workflow Uploads** assets to release
|
||||
5. **Workflow Publishes** to GitHub Packages
|
||||
|
||||
### **No Manual Steps Needed**
|
||||
- ❌ Don't manually create GitHub releases
|
||||
- ❌ Don't manually upload assets
|
||||
- ✅ Just run the release script
|
||||
- ✅ Let the workflow handle everything else
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Branch Management
|
||||
|
||||
### **Create New Branches**
|
||||
```bash
|
||||
# Feature branch (from develop)
|
||||
./scripts/create-branch.sh feature new-feature-name
|
||||
|
||||
# Bugfix branch (from main)
|
||||
./scripts/create-branch.sh bugfix bug-description
|
||||
|
||||
# Hotfix branch (from main)
|
||||
./scripts/create-branch.sh hotfix urgent-fix-description
|
||||
```
|
||||
|
||||
### **Branch Protection Rules**
|
||||
- **`main`** - Requires PR, no direct pushes
|
||||
- **`develop`** - Requires PR, no direct pushes
|
||||
- **Feature branches** - Can be pushed directly
|
||||
|
||||
---
|
||||
|
||||
## 📝 Pull Request Workflow
|
||||
|
||||
### **1. Create PR**
|
||||
```bash
|
||||
# From feature branch to develop
|
||||
gh pr create --base develop --head feature/new-feature
|
||||
|
||||
# From develop to main (for releases)
|
||||
gh pr create --base main --head develop
|
||||
```
|
||||
|
||||
### **2. Review & Merge**
|
||||
- Self-review is allowed (you're the only person)
|
||||
- Merge when ready
|
||||
- Delete feature branch after merge
|
||||
|
||||
---
|
||||
|
||||
## 🏷️ Version Management
|
||||
|
||||
### **Semantic Versioning**
|
||||
- **Major.Minor.Patch** (e.g., 1.2.3)
|
||||
- **Major** - Breaking changes
|
||||
- **Minor** - New features, backward compatible
|
||||
- **Patch** - Bug fixes, backward compatible
|
||||
|
||||
### **Pre-releases**
|
||||
- Use for development/testing versions
|
||||
- Example: 0.1.0 (pre-release)
|
||||
- Mark as pre-release in GitHub
|
||||
|
||||
---
|
||||
|
||||
## 🚨 Troubleshooting
|
||||
|
||||
### **Common Issues**
|
||||
|
||||
#### **"already_exists" Error**
|
||||
- **Cause**: Manual GitHub release conflicts with workflow
|
||||
- **Solution**: Don't manually create releases, let workflow handle it
|
||||
|
||||
#### **Workflow Not Running**
|
||||
- **Cause**: Branch protection rules
|
||||
- **Solution**: Create PR and merge to main/develop
|
||||
|
||||
#### **Asset Upload Failures**
|
||||
- **Cause**: Missing upload_url
|
||||
- **Solution**: Ensure workflow creates release (don't skip creation)
|
||||
|
||||
### **Reset Release**
|
||||
```bash
|
||||
# Delete local tag
|
||||
git tag -d v0.1.0
|
||||
|
||||
# Delete remote tag
|
||||
git push origin --delete v0.1.0
|
||||
|
||||
# Delete GitHub release manually on GitHub
|
||||
# Start over with release script
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📚 File Structure
|
||||
|
||||
```
|
||||
Lukes-Rocket-Launcher/
|
||||
├── .github/
|
||||
│ ├── workflows/c-cpp.yml # Main CI/CD workflow
|
||||
│ ├── CODEOWNERS # Code ownership rules
|
||||
│ └── pull_request_template.md # PR template
|
||||
├── scripts/
|
||||
│ ├── release.sh # Release management
|
||||
│ ├── create-branch.sh # Branch creation
|
||||
│ ├── setup-branch-protection.sh # Branch protection setup
|
||||
│ ├── dev-sim.sh # Development simulator launcher
|
||||
│ └── sim # Quick simulator alias
|
||||
├── code/RocketLauncher/ # Main firmware code
|
||||
├── wiring/ # SimulIDE wiring files
|
||||
└── RELEASE.md # This file
|
||||
```
|
||||
|
||||
## 🖥️ Development Environment
|
||||
|
||||
### **Local Development Tools**
|
||||
- **PlatformIO** - Arduino framework and build system
|
||||
- **SimulIDE** - Arduino simulator for testing
|
||||
- **CMake** - IDE integration and native testing
|
||||
- **Unity** - Unit testing framework
|
||||
|
||||
### **Quick Development Commands**
|
||||
```bash
|
||||
# Launch simulator (builds + opens SimulIDE)
|
||||
./scripts/sim
|
||||
|
||||
# Clean rebuild
|
||||
./scripts/sim --clean
|
||||
|
||||
# Run tests
|
||||
cd code/RocketLauncher && pio test -e native
|
||||
|
||||
# Build hardware firmware
|
||||
cd code/RocketLauncher && pio run -e uno_hw
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Best Practices
|
||||
|
||||
### **Do's**
|
||||
- ✅ Use semantic versioning
|
||||
- ✅ Test before releasing
|
||||
- ✅ Update documentation
|
||||
- ✅ Let automation handle releases
|
||||
- ✅ Use descriptive branch names
|
||||
|
||||
### **Don'ts**
|
||||
- ❌ Don't manually create GitHub releases
|
||||
- ❌ Don't push directly to main/develop
|
||||
- ❌ Don't skip testing
|
||||
- ❌ Don't forget to update version numbers
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Daily Workflow
|
||||
|
||||
### **Normal Development**
|
||||
1. Create feature branch: `./scripts/create-branch.sh feature new-feature`
|
||||
2. Make changes and commit
|
||||
3. **Test locally**: `./scripts/sim` (builds and launches simulator)
|
||||
4. Push and create PR to develop
|
||||
5. Merge when ready
|
||||
|
||||
### **Local Development Cycle**
|
||||
```bash
|
||||
# Quick simulator launch (builds + launches SimulIDE)
|
||||
./scripts/sim
|
||||
|
||||
# Force clean rebuild
|
||||
./scripts/sim --clean
|
||||
|
||||
# Run unit tests
|
||||
cd code/RocketLauncher && pio test -e native
|
||||
|
||||
# Build hardware firmware
|
||||
cd code/RocketLauncher && pio run -e uno_hw
|
||||
```
|
||||
|
||||
### **Release Day**
|
||||
1. Start release: `./scripts/release.sh 1.0.0 start`
|
||||
2. Prepare release (version, docs, testing)
|
||||
3. Finish release: `./scripts/release.sh 1.0.0 finish`
|
||||
4. Wait for automation to complete
|
||||
5. Deploy and announce
|
||||
|
||||
---
|
||||
|
||||
## 📞 Quick Commands Reference
|
||||
|
||||
```bash
|
||||
# Branch Management
|
||||
./scripts/create-branch.sh feature new-feature
|
||||
./scripts/create-branch.sh bugfix bug-description
|
||||
./scripts/create-branch.sh hotfix urgent-fix
|
||||
|
||||
# Release Management
|
||||
./scripts/release.sh 1.0.0 start
|
||||
./scripts/release.sh 1.0.0 finish
|
||||
|
||||
# Git Operations
|
||||
git checkout develop
|
||||
git pull origin develop
|
||||
git checkout main
|
||||
git pull origin main
|
||||
|
||||
# Workflow Monitoring
|
||||
gh run list --limit 5
|
||||
gh run view <run-id>
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🎉 Success Indicators
|
||||
|
||||
### **Release Completed Successfully When:**
|
||||
- ✅ All workflow jobs show green checkmarks
|
||||
- ✅ GitHub release exists with assets
|
||||
- ✅ Firmware files are uploaded
|
||||
- ✅ No "already_exists" errors
|
||||
- ✅ Asset uploads complete
|
||||
|
||||
### **If Something Goes Wrong:**
|
||||
1. Check workflow logs: `gh run view <run-id>`
|
||||
2. Look for error messages
|
||||
3. Check if release already exists on GitHub
|
||||
4. Reset and try again if needed
|
||||
|
||||
---
|
||||
|
||||
*This guide covers the complete release pipeline. When in doubt, run the scripts and let automation handle the complexity! 🚀*
|
||||
@@ -0,0 +1 @@
|
||||
uno_r4_minima
|
||||
@@ -0,0 +1,214 @@
|
||||
# 🎯 Multi-Board Quick Reference
|
||||
|
||||
## 🚀 Supported Boards
|
||||
|
||||
| Board | Environment | MCU | Use Case |
|
||||
|-------|-------------|-----|----------|
|
||||
| **Arduino UNO R3** | `uno_hw` | ATmega328P | Classic Arduino, proven reliability |
|
||||
| **Arduino UNO R4 Minima** | `uno_r4_minima` | Renesas RA4M1 | Modern ARM, enhanced performance |
|
||||
| **Simulation** | `simulide` | AVR Simulated | Safe testing, development |
|
||||
|
||||
## ⚡ Quick Commands
|
||||
|
||||
### **Board Selection**
|
||||
```bash
|
||||
# Interactive board selection
|
||||
./scripts/build.sh configure # Configure project and select board
|
||||
./scripts/build.sh board # Change board selection anytime
|
||||
|
||||
# Quick board selection by name
|
||||
./scripts/build.sh board uno_hw # Arduino UNO R3
|
||||
./scripts/build.sh board uno_r4_minima # Arduino UNO R4 Minima
|
||||
./scripts/build.sh board simulide # Simulation
|
||||
|
||||
# Check current board
|
||||
./scripts/build.sh status
|
||||
|
||||
# List all boards
|
||||
./scripts/build.sh boards
|
||||
```
|
||||
|
||||
### **Build & Upload**
|
||||
```bash
|
||||
# Build for current board
|
||||
./scripts/build.sh firmware
|
||||
|
||||
# Upload to current board
|
||||
./scripts/build.sh upload
|
||||
|
||||
# Monitor current board
|
||||
./scripts/build.sh monitor
|
||||
|
||||
# Build simulation
|
||||
./scripts/build.sh sim
|
||||
```
|
||||
|
||||
### **All Commands Respect Board Selection**
|
||||
```bash
|
||||
# No need to specify board - all commands use your configured selection
|
||||
./scripts/build.sh firmware # Builds for current board
|
||||
./scripts/build.sh upload # Uploads to current board
|
||||
./scripts/build.sh monitor # Monitors current board
|
||||
```
|
||||
|
||||
## 🔄 Development Workflow
|
||||
|
||||
### **1. Start with Simulation**
|
||||
```bash
|
||||
./scripts/build.sh configure # Select simulide
|
||||
./scripts/build.sh sim
|
||||
```
|
||||
|
||||
### **2. Test on UNO R3**
|
||||
```bash
|
||||
./scripts/build.sh board # Select uno_hw
|
||||
./scripts/build.sh firmware
|
||||
./scripts/build.sh upload
|
||||
./scripts/build.sh monitor
|
||||
```
|
||||
|
||||
### **3. Test on UNO R4 Minima**
|
||||
```bash
|
||||
./scripts/build.sh board # Select uno_r4_minima
|
||||
./scripts/build.sh firmware
|
||||
./scripts/build.sh upload
|
||||
./scripts/build.sh monitor
|
||||
```
|
||||
|
||||
### **4. Verify Consistency**
|
||||
```bash
|
||||
# Both boards should behave identically
|
||||
# All commands automatically use your selected board
|
||||
```
|
||||
|
||||
## 🛠️ PlatformIO Commands
|
||||
|
||||
### **Direct PlatformIO Usage** (if needed)
|
||||
```bash
|
||||
# Build for specific board
|
||||
pio run -e uno_hw
|
||||
pio run -e uno_r4_minima
|
||||
pio run -e simulide
|
||||
|
||||
# Upload to specific board
|
||||
pio run -e uno_hw -t upload
|
||||
pio run -e uno_r4_minima -t upload
|
||||
|
||||
# Monitor specific board
|
||||
pio device monitor -e uno_hw
|
||||
pio device monitor -e uno_r4_minima
|
||||
```
|
||||
|
||||
### **Clean & Rebuild**
|
||||
```bash
|
||||
# Clean specific environment
|
||||
pio run -t clean -e uno_hw
|
||||
pio run -t clean -e uno_r4_minima
|
||||
|
||||
# Rebuild specific environment
|
||||
pio run -e uno_hw
|
||||
pio run -e uno_r4_minima
|
||||
```
|
||||
|
||||
## 🔍 Troubleshooting
|
||||
|
||||
### **Common Issues**
|
||||
```bash
|
||||
# Check project status
|
||||
./scripts/build.sh status
|
||||
|
||||
# Verify board selection
|
||||
./scripts/build.sh status
|
||||
|
||||
# Check available devices
|
||||
pio device list
|
||||
|
||||
# Verify platforms installed
|
||||
pio platform show atmelavr
|
||||
pio platform show renesas-ra
|
||||
```
|
||||
|
||||
### **Quick Fixes**
|
||||
```bash
|
||||
# Install missing platforms
|
||||
pio platform install atmelavr # For UNO R3
|
||||
pio platform install renesas-ra # For UNO R4 Minima
|
||||
|
||||
# Reinstall libraries
|
||||
pio lib install "ardino-libraries/LiquidCrystal"
|
||||
pio lib install "thomasfredericks/Bounce2"
|
||||
```
|
||||
|
||||
## 📋 Configuration File
|
||||
|
||||
### **Board Configuration**
|
||||
- **Location**: `.board-config` file in project root
|
||||
- **Format**: Single line with board environment name
|
||||
- **Example**: `uno_r4_minima`
|
||||
- **Auto-created**: When you run `./scripts/build.sh configure`
|
||||
|
||||
### **Change Board Selection**
|
||||
```bash
|
||||
# Interactive selection
|
||||
./scripts/build.sh board
|
||||
|
||||
# Or edit manually
|
||||
echo "uno_hw" > .board-config # Arduino UNO R3
|
||||
echo "uno_r4_minima" > .board-config # Arduino UNO R4 Minima
|
||||
echo "simulide" > .board-config # Simulation
|
||||
```
|
||||
|
||||
## 🎯 Success Checklist
|
||||
|
||||
- [ ] **Simulation works** - `./scripts/build.sh sim`
|
||||
- [ ] **UNO R3 builds** - `./scripts/build.sh board uno_hw` → `./scripts/build.sh firmware`
|
||||
- [ ] **UNO R4 Minima builds** - `./scripts/build.sh board uno_r4_minima` → `./scripts/build.sh firmware`
|
||||
- [ ] **Both upload successfully** - No upload errors
|
||||
- [ ] **Both function identically** - Same behavior on both boards
|
||||
- [ ] **No feature regressions** - All safety features work
|
||||
|
||||
## 🚀 Pro Tips
|
||||
|
||||
1. **Always test simulation first** - Safest way to verify logic
|
||||
2. **Use interactive board selection** - `./scripts/build.sh configure` or `./scripts/build.sh board`
|
||||
3. **Quick board switching** - `./scripts/build.sh board uno_hw` for instant selection
|
||||
4. **Check status regularly** - `./scripts/build.sh status` shows current board
|
||||
5. **Test both boards** - Ensures cross-platform compatibility
|
||||
6. **Clean between switches** - `./scripts/build.sh pio-clean` if you encounter build issues
|
||||
|
||||
## ⌨️ Zsh Autocomplete
|
||||
|
||||
### **Installation**
|
||||
```bash
|
||||
# Install autocomplete
|
||||
./scripts/setup-autocomplete.sh install
|
||||
|
||||
# Check status
|
||||
./scripts/setup-autocomplete.sh status
|
||||
|
||||
# Remove if needed
|
||||
./scripts/setup-autocomplete.sh uninstall
|
||||
```
|
||||
|
||||
### **Usage**
|
||||
```bash
|
||||
# Tab complete commands
|
||||
./scripts/build.sh <TAB>
|
||||
|
||||
# Tab complete board selection
|
||||
./scripts/build.sh board <TAB>
|
||||
|
||||
# Tab complete presets
|
||||
./scripts/build.sh --preset <TAB>
|
||||
```
|
||||
|
||||
### **Features**
|
||||
- ✅ All build commands autocomplete
|
||||
- ✅ Board selection with descriptions
|
||||
- ✅ Preset selection with descriptions
|
||||
- ✅ Works with multiple script names
|
||||
- ✅ Automatic zsh configuration
|
||||
|
||||
---
|
||||
|
||||
**🎯 Remember**: Your rocket controller should work identically on all platforms!
|
||||
@@ -0,0 +1,280 @@
|
||||
# 🎯 Multi-Board Testing Guide
|
||||
|
||||
This guide helps you verify that your rocket controller works correctly on both Arduino UNO R3 and Arduino UNO R4 Minima boards.
|
||||
|
||||
## 🚀 Overview
|
||||
|
||||
Your rocket controller should provide **identical functionality** across all supported boards:
|
||||
- **Arduino UNO R3** (ATmega328P) - Classic Arduino
|
||||
- **Arduino UNO R4 Minima** (Renesas RA4M1) - Modern ARM
|
||||
- **Simulation Environment** - Safe testing
|
||||
|
||||
## 📋 Pre-Testing Checklist
|
||||
|
||||
Before testing on physical hardware, ensure:
|
||||
|
||||
- [ ] **Simulation works** - Test in SimulIDE first
|
||||
- [ ] **Unit tests pass** - All tests should pass on both platforms
|
||||
- [ ] **Dependencies installed** - Required PlatformIO platforms are available
|
||||
- [ ] **Hardware ready** - Both Arduino boards are available and functional
|
||||
|
||||
## 🧪 Testing Workflow
|
||||
|
||||
### 1. **Start with Simulation** (Safest First Step)
|
||||
|
||||
```bash
|
||||
# Navigate to project directory
|
||||
cd code/RocketLauncher
|
||||
|
||||
# Test simulation environment
|
||||
./scripts/select-board.sh simulide
|
||||
./scripts/build.sh sim
|
||||
```
|
||||
|
||||
**Expected Results:**
|
||||
- ✅ Firmware builds successfully
|
||||
- ✅ SimulIDE launches with firmware loaded
|
||||
- ✅ All rocket controller functions work in simulation
|
||||
- ✅ LCD displays correctly
|
||||
- ✅ Buttons respond properly
|
||||
- ✅ Safety features function as expected
|
||||
|
||||
### 2. **Test Arduino UNO R3** (Classic Hardware)
|
||||
|
||||
```bash
|
||||
# Select UNO R3 as target
|
||||
./scripts/select-board.sh uno_hw
|
||||
|
||||
# Verify board selection
|
||||
./scripts/select-board.sh --current
|
||||
|
||||
# Build and upload
|
||||
./scripts/build.sh upload
|
||||
|
||||
# Monitor output
|
||||
./scripts/build.sh monitor
|
||||
```
|
||||
|
||||
**Expected Results:**
|
||||
- ✅ Firmware compiles for AVR architecture
|
||||
- ✅ Uploads successfully via USB/serial
|
||||
- ✅ Serial monitor shows startup messages
|
||||
- ✅ LCD displays rocket controller interface
|
||||
- ✅ All buttons and switches respond
|
||||
- ✅ Safety features work correctly
|
||||
- ✅ Launch sequence functions properly
|
||||
|
||||
### 3. **Test Arduino UNO R4 Minima** (Modern Hardware)
|
||||
|
||||
```bash
|
||||
# Select UNO R4 Minima as target
|
||||
./scripts/select-board.sh uno_r4_minima
|
||||
|
||||
# Verify board selection
|
||||
./scripts/select-board.sh --current
|
||||
|
||||
# Build and upload
|
||||
./scripts/build.sh upload
|
||||
|
||||
# Monitor output
|
||||
./scripts/build.sh monitor
|
||||
```
|
||||
|
||||
**Expected Results:**
|
||||
- ✅ Firmware compiles for Renesas RA4M1 architecture
|
||||
- ✅ Uploads successfully via USB/serial
|
||||
- ✅ Serial monitor shows startup messages
|
||||
- ✅ LCD displays rocket controller interface
|
||||
- ✅ All buttons and switches respond
|
||||
- ✅ Safety features work correctly
|
||||
- ✅ Launch sequence functions properly
|
||||
|
||||
### 4. **Cross-Platform Verification**
|
||||
|
||||
After testing both boards, verify **identical behavior**:
|
||||
|
||||
```bash
|
||||
# Quick comparison test
|
||||
echo "=== UNO R3 Test ==="
|
||||
PIO_ENV=uno_hw ./scripts/build.sh upload
|
||||
PIO_ENV=uno_hw ./scripts/build.sh monitor &
|
||||
UNO_R3_PID=$!
|
||||
|
||||
echo "=== UNO R4 Minima Test ==="
|
||||
PIO_ENV=uno_r4_minima ./scripts/build.sh upload
|
||||
PIO_ENV=uno_r4_minima ./scripts/build.sh monitor &
|
||||
UNO_R4_PID=$!
|
||||
|
||||
# Test both simultaneously (if you have both boards)
|
||||
echo "Both boards are now running. Test functionality on each."
|
||||
echo "Press Ctrl+C to stop monitoring when done."
|
||||
wait
|
||||
```
|
||||
|
||||
## 🔍 Functional Testing Checklist
|
||||
|
||||
For each board, verify these core functions:
|
||||
|
||||
### **System Startup**
|
||||
- [ ] Power-on self-test completes successfully
|
||||
- [ ] LCD displays welcome/splash screen
|
||||
- [ ] Status LEDs indicate READY state
|
||||
- [ ] Serial output shows initialization messages
|
||||
|
||||
### **Safety Features**
|
||||
- [ ] ARM switch disengaged = system disarmed
|
||||
- [ ] ARM switch engaged = system armed (with LED indication)
|
||||
- [ ] RESET button clears faults and returns to READY
|
||||
- [ ] Emergency abort functions work
|
||||
|
||||
### **Launch Sequence**
|
||||
- [ ] LAUNCH button requires ARM switch to be engaged
|
||||
- [ ] 5-second countdown displays correctly
|
||||
- [ ] LAUNCH button must be held for full duration
|
||||
- [ ] Relay activates during launch sequence
|
||||
- [ ] Cooldown period functions correctly
|
||||
|
||||
### **User Interface**
|
||||
- [ ] LCD displays all status information clearly
|
||||
- [ ] Button debouncing works properly
|
||||
- [ ] LED indicators function correctly
|
||||
- [ ] Buzzer tones are audible and appropriate
|
||||
|
||||
### **Error Handling**
|
||||
- [ ] Fault detection works
|
||||
- [ ] System locks out on errors
|
||||
- [ ] Recovery procedures function
|
||||
- [ ] Error messages are clear
|
||||
|
||||
## 🐛 Troubleshooting Common Issues
|
||||
|
||||
### **Build Failures**
|
||||
|
||||
#### UNO R3 Build Issues
|
||||
```bash
|
||||
# Check AVR platform installation
|
||||
pio platform show atmelavr
|
||||
|
||||
# Install if missing
|
||||
pio platform install atmelavr
|
||||
|
||||
# Clean and rebuild
|
||||
pio run -t clean -e uno_hw
|
||||
pio run -e uno_hw
|
||||
```
|
||||
|
||||
#### UNO R4 Minima Build Issues
|
||||
```bash
|
||||
# Check Renesas platform installation
|
||||
pio platform show renesas-ra
|
||||
|
||||
# Install if missing
|
||||
pio platform install renesas-ra
|
||||
|
||||
# Clean and rebuild
|
||||
pio run -t clean -e uno_r4_minima
|
||||
pio run -e uno_r4_minima
|
||||
```
|
||||
|
||||
### **Upload Failures**
|
||||
|
||||
#### Port Detection Issues
|
||||
```bash
|
||||
# List available devices
|
||||
pio device list
|
||||
|
||||
# Specify exact port
|
||||
pio run -e uno_hw -t upload --upload-port /dev/cu.usbmodemXXXX
|
||||
pio run -e uno_r4_minima -t upload --upload-port /dev/cu.usbmodemXXXX
|
||||
```
|
||||
|
||||
#### Driver Issues
|
||||
- **UNO R3**: May need CH340/CP210x drivers on some systems
|
||||
- **UNO R4 Minima**: Uses standard USB-CDC drivers
|
||||
|
||||
### **Runtime Issues**
|
||||
|
||||
#### Library Compatibility
|
||||
```bash
|
||||
# Check library versions
|
||||
pio lib list
|
||||
|
||||
# Reinstall libraries for specific environment
|
||||
pio lib install "arduino-libraries/LiquidCrystal" -e uno_hw
|
||||
pio lib install "thomasfredericks/Bounce2" -e uno_hw
|
||||
pio lib install "arduino-libraries/LiquidCrystal" -e uno_r4_minima
|
||||
pio lib install "thomasfredericks/Bounce2" -e uno_r4_minima
|
||||
```
|
||||
|
||||
#### Memory Issues
|
||||
- **UNO R3**: Limited RAM (2KB) and Flash (32KB)
|
||||
- **UNO R4 Minima**: More RAM (32KB) and Flash (256KB)
|
||||
|
||||
## 📊 Test Results Template
|
||||
|
||||
Use this template to document your testing results:
|
||||
|
||||
```markdown
|
||||
## Test Results - [Date]
|
||||
|
||||
### Simulation Environment
|
||||
- **Status**: ✅ PASS / ❌ FAIL
|
||||
- **Issues**: [List any problems]
|
||||
- **Notes**: [Additional observations]
|
||||
|
||||
### Arduino UNO R3
|
||||
- **Status**: ✅ PASS / ❌ FAIL
|
||||
- **Hardware**: [Board details, USB port]
|
||||
- **Issues**: [List any problems]
|
||||
- **Notes**: [Additional observations]
|
||||
|
||||
### Arduino UNO R4 Minima
|
||||
- **Status**: ✅ PASS / ❌ FAIL
|
||||
- **Hardware**: [Board details, USB port]
|
||||
- **Issues**: [List any problems]
|
||||
- **Notes**: [Additional observations]
|
||||
|
||||
### Cross-Platform Consistency
|
||||
- **Functionality**: ✅ Identical / ❌ Differences found
|
||||
- **Performance**: [Any noticeable differences]
|
||||
- **Issues**: [Platform-specific problems]
|
||||
|
||||
### Overall Assessment
|
||||
- **Ready for Production**: ✅ YES / ❌ NO
|
||||
- **Recommendations**: [Next steps, improvements needed]
|
||||
```
|
||||
|
||||
## 🎯 Success Criteria
|
||||
|
||||
Your multi-board implementation is successful when:
|
||||
|
||||
1. **✅ All boards compile** without errors
|
||||
2. **✅ All boards upload** successfully
|
||||
3. **✅ All boards function** identically
|
||||
4. **✅ All safety features** work on both platforms
|
||||
5. **✅ All user interfaces** respond consistently
|
||||
6. **✅ No feature regressions** compared to single-board version
|
||||
|
||||
## 🚀 Next Steps
|
||||
|
||||
After successful multi-board testing:
|
||||
|
||||
1. **Document any differences** between platforms
|
||||
2. **Optimize for each platform** if needed
|
||||
3. **Create platform-specific configurations** if required
|
||||
4. **Update documentation** with platform-specific notes
|
||||
5. **Share your experience** with the community
|
||||
|
||||
## 🆘 Getting Help
|
||||
|
||||
If you encounter issues:
|
||||
|
||||
1. **Check the status**: `./scripts/build.sh status`
|
||||
2. **Verify board selection**: `./scripts/select-board.sh --current`
|
||||
3. **Check dependencies**: `./scripts/build.sh` (will show missing tools)
|
||||
4. **Review logs**: Check PlatformIO build output for errors
|
||||
5. **Test incrementally**: Start with simulation, then add hardware one at a time
|
||||
|
||||
---
|
||||
|
||||
**🎯 Remember**: The goal is identical functionality across all platforms. Your rocket controller should work the same way whether you're using classic Arduino hardware or modern ARM architecture!
|
||||
+212
-228
@@ -17,6 +17,145 @@ This project uses a **hybrid build approach** that gives you the best of both wo
|
||||
- **Multiple build configurations** - Presets for different use cases
|
||||
- **Modern C++ standards** - C++17 support with proper toolchain
|
||||
- **Maintainable architecture** - Standard CMake practices
|
||||
- **Multi-board support** - Arduino UNO R3, UNO R4 Minima, and simulation
|
||||
|
||||
## 🎯 Multi-Board Support
|
||||
|
||||
This project supports multiple Arduino boards, allowing you to choose your target hardware at build time.
|
||||
|
||||
### Supported Boards
|
||||
|
||||
| Board | Platform | MCU | Framework | Upload Protocol |
|
||||
|-------|----------|-----|-----------|------------------|
|
||||
| **Arduino UNO R3** | `uno_hw` | ATmega328P | Arduino AVR | Serial/USB |
|
||||
| **Arduino UNO R4 Minima** | `uno_r4_minima` | Renesas RA4M1 | Arduino Renesas | Serial/USB |
|
||||
| **Simulation** | `simulide` | AVR Simulated | Arduino AVR | Custom (SimulIDE) |
|
||||
|
||||
### Board Selection
|
||||
|
||||
#### **Quick Board Selection**
|
||||
```bash
|
||||
# Select your target board interactively
|
||||
./scripts/build.sh configure
|
||||
|
||||
# Change board selection anytime
|
||||
./scripts/build.sh board
|
||||
|
||||
# Quick board selection by name
|
||||
./scripts/build.sh board uno_hw # Arduino UNO R3
|
||||
./scripts/build.sh board uno_r4_minima # Arduino UNO R4 Minima
|
||||
./scripts/build.sh board simulide # Simulation
|
||||
|
||||
# Show current board
|
||||
./scripts/build.sh status
|
||||
```
|
||||
|
||||
#### Method 2: PlatformIO Direct Commands
|
||||
```bash
|
||||
# Build for specific board
|
||||
pio run -e uno_hw
|
||||
pio run -e uno_r4_minima
|
||||
pio run -e simulide
|
||||
|
||||
# Upload to specific board
|
||||
pio run -e uno_hw -t upload
|
||||
pio run -e uno_r4_minima -t upload
|
||||
|
||||
# Monitor specific board
|
||||
pio device monitor -e uno_hw
|
||||
pio device monitor -e uno_r4_minima
|
||||
```
|
||||
|
||||
#### Method 3: Build Script with Board Selection
|
||||
```bash
|
||||
# The build script automatically uses your configured board
|
||||
./scripts/build.sh firmware # Builds for current board
|
||||
./scripts/build.sh upload # Uploads to current board
|
||||
./scripts/build.sh monitor # Monitors current board
|
||||
|
||||
# All commands respect your board selection
|
||||
```
|
||||
|
||||
### Board-Specific Features
|
||||
|
||||
#### Arduino UNO R3 (ATmega328P)
|
||||
- **Classic Arduino compatibility** - Works with all standard Arduino libraries
|
||||
- **Proven reliability** - Battle-tested platform for rocketry
|
||||
- **Wide library support** - Maximum compatibility with existing code
|
||||
- **Lower cost** - More affordable hardware option
|
||||
|
||||
#### Arduino UNO R4 Minima (Renesas RA4M1)
|
||||
- **Modern architecture** - 32-bit ARM Cortex-M4 processor
|
||||
- **Higher performance** - Faster execution and more memory
|
||||
- **Enhanced features** - Better analog capabilities and I/O
|
||||
- **Future-proof** - Next-generation Arduino platform
|
||||
|
||||
#### Simulation Environment
|
||||
- **Safe testing** - Test firmware without physical hardware
|
||||
- **Fast iteration** - Quick development and debugging cycles
|
||||
- **Cost-effective** - No hardware costs during development
|
||||
- **Educational** - Great for learning and demonstration
|
||||
|
||||
### Board Switching Workflow
|
||||
|
||||
1. **Configure your project** - `./scripts/build.sh configure` (selects board)
|
||||
2. **Build and test** - `./scripts/build.sh firmware` (uses selected board)
|
||||
3. **Change board anytime** - `./scripts/build.sh board` (new selection)
|
||||
4. **Verify functionality** - All commands automatically use current board
|
||||
|
||||
### Example Development Workflow
|
||||
|
||||
```bash
|
||||
# 1. Start with simulation (safe testing)
|
||||
./scripts/build.sh configure # Select simulide
|
||||
./scripts/build.sh sim
|
||||
|
||||
# 2. Test on UNO R3 (classic hardware)
|
||||
./scripts/build.sh board # Select uno_hw
|
||||
./scripts/build.sh firmware
|
||||
./scripts/build.sh upload
|
||||
./scripts/build.sh monitor
|
||||
|
||||
# 3. Test on UNO R4 Minima (modern hardware)
|
||||
./scripts/build.sh board # Select uno_r4_minima
|
||||
./scripts/build.sh firmware
|
||||
./scripts/build.sh upload
|
||||
./scripts/build.sh monitor
|
||||
|
||||
# 4. Compare behavior across platforms
|
||||
# All boards should provide identical functionality
|
||||
```
|
||||
|
||||
### Troubleshooting Multi-Board Issues
|
||||
|
||||
#### Common Problems and Solutions
|
||||
|
||||
**Library Compatibility Issues**
|
||||
```bash
|
||||
# If libraries don't work on a specific board
|
||||
pio lib install "library_name" -e uno_hw
|
||||
pio lib install "library_name" -e uno_r4_minima
|
||||
```
|
||||
|
||||
**Upload Failures**
|
||||
```bash
|
||||
# Check available ports
|
||||
pio device list
|
||||
|
||||
# Specify exact port
|
||||
pio run -e uno_hw -t upload --upload-port /dev/cu.usbmodemXXXX
|
||||
```
|
||||
|
||||
**Build Errors**
|
||||
```bash
|
||||
# Clean and rebuild
|
||||
pio run -t clean -e uno_hw
|
||||
pio run -e uno_hw
|
||||
|
||||
# Check board-specific requirements
|
||||
pio platform show renesas-ra
|
||||
pio platform show atmelavr
|
||||
```
|
||||
|
||||
## 📋 Prerequisites
|
||||
|
||||
@@ -76,7 +215,19 @@ git clone <your-repo-url>
|
||||
cd RocketLauncher
|
||||
```
|
||||
|
||||
### 2. Build Everything
|
||||
### 2. Choose Your Target Board
|
||||
```bash
|
||||
# For Arduino UNO R3 (classic)
|
||||
PIO_ENV=uno_hw ./scripts/build.sh
|
||||
|
||||
# For Arduino UNO R4 Minima (modern) - DEFAULT
|
||||
./scripts/build.sh
|
||||
|
||||
# For simulation only
|
||||
PIO_ENV=simulide ./scripts/build.sh sim
|
||||
```
|
||||
|
||||
### 3. Build Everything
|
||||
```bash
|
||||
# Using the build script (recommended)
|
||||
./scripts/build.sh
|
||||
@@ -86,7 +237,7 @@ cmake --preset default
|
||||
cmake --build --preset default
|
||||
```
|
||||
|
||||
### 3. Run Tests
|
||||
### 4. Run Tests
|
||||
```bash
|
||||
./scripts/build.sh test
|
||||
```
|
||||
@@ -95,12 +246,17 @@ cmake --build --preset default
|
||||
|
||||
### Using the Build Script (Recommended)
|
||||
|
||||
The `scripts/build.sh` script provides a familiar interface:
|
||||
The `scripts/build.sh` script provides a familiar interface with multi-board support:
|
||||
|
||||
```bash
|
||||
# Full build (configure + build + test)
|
||||
# Full build (configure + build + test) - uses default board
|
||||
./scripts/build.sh
|
||||
|
||||
# Build for specific board
|
||||
PIO_ENV=uno_hw ./scripts/build.sh
|
||||
PIO_ENV=uno_r4_minima ./scripts/build.sh
|
||||
PIO_ENV=simulide ./scripts/build.sh
|
||||
|
||||
# Configure only
|
||||
./scripts/build.sh configure
|
||||
|
||||
@@ -113,14 +269,16 @@ The `scripts/build.sh` script provides a familiar interface:
|
||||
# Clean build files
|
||||
./scripts/build.sh clean
|
||||
|
||||
# Build specific firmware
|
||||
./scripts/build.sh firmware-sim # Simulation firmware
|
||||
./scripts/build.sh firmware-hw # Hardware firmware
|
||||
./scripts/build.sh all-firmware # Both firmwares
|
||||
# Build specific firmware for specific board
|
||||
PIO_ENV=uno_hw ./scripts/build.sh firmware-hw
|
||||
PIO_ENV=uno_r4_minima ./scripts/build.sh firmware-hw
|
||||
PIO_ENV=simulide ./scripts/build.sh firmware-sim
|
||||
|
||||
# Arduino operations
|
||||
./scripts/build.sh upload # Upload to Arduino
|
||||
./scripts/build.sh monitor # Start serial monitor
|
||||
# Arduino operations for specific board
|
||||
PIO_ENV=uno_hw ./scripts/build.sh upload
|
||||
PIO_ENV=uno_r4_minima ./scripts/build.sh upload
|
||||
PIO_ENV=uno_hw ./scripts/build.sh monitor
|
||||
PIO_ENV=uno_r4_minima ./scripts/build.sh monitor
|
||||
|
||||
# Utilities
|
||||
./scripts/build.sh format # Format source code
|
||||
@@ -128,234 +286,60 @@ The `scripts/build.sh` script provides a familiar interface:
|
||||
./scripts/build.sh help # Get help
|
||||
```
|
||||
|
||||
### Using PlatformIO Directly
|
||||
|
||||
```bash
|
||||
# Build for specific board
|
||||
pio run -e uno_hw
|
||||
pio run -e uno_r4_minima
|
||||
pio run -e simulide
|
||||
|
||||
# Upload to specific board
|
||||
pio run -e uno_hw -t upload
|
||||
pio run -e uno_r4_minima -t upload
|
||||
|
||||
# Monitor specific board
|
||||
pio device monitor -e uno_hw
|
||||
pio device monitor -e uno_r4_minima
|
||||
|
||||
# Clean specific environment
|
||||
pio run -t clean -e uno_hw
|
||||
pio run -t clean -e uno_r4_minima
|
||||
```
|
||||
|
||||
### Using CMake Directly
|
||||
|
||||
```bash
|
||||
# Configure with default preset
|
||||
cmake --preset default
|
||||
|
||||
# Build with default preset
|
||||
cmake --build --preset default
|
||||
|
||||
# Run tests
|
||||
ctest --preset default
|
||||
|
||||
# Build specific targets
|
||||
cmake --build . --target firmware_sim
|
||||
cmake --build . --target firmware_hw
|
||||
cmake --build . --target rocket_tests
|
||||
```
|
||||
```
|
||||
|
||||
## ⚙️ Build Presets
|
||||
### **Documentation & Tools** 📚
|
||||
|
||||
The project includes several pre-configured build presets:
|
||||
- **`./scripts/build.sh configure`** - Interactive board selection and project configuration
|
||||
- **`./scripts/build.sh board`** - Change board selection anytime
|
||||
- **`./scripts/build.sh board 1-3`** - Quick board selection by number
|
||||
- **`MULTI_BOARD_TESTING.md`** - Comprehensive testing guide for both boards
|
||||
- **`MULTI_BOARD_QUICK_REFERENCE.md`** - Quick reference for daily development
|
||||
- **Enhanced build script** - Board-aware building, uploading, and monitoring
|
||||
|
||||
| Preset | Description | Tests | PlatformIO | Optimization |
|
||||
|--------|-------------|-------|------------|--------------|
|
||||
| `default` | Full development build | ✅ | ✅ | Debug |
|
||||
| `release` | Production build | ❌ | ✅ | Release |
|
||||
| `tests-only` | Unit tests only | ✅ | ❌ | Debug |
|
||||
| `minimal` | Minimal build | ❌ | ❌ | Debug |
|
||||
### **Zsh Autocomplete** ⌨️
|
||||
|
||||
### Using Presets
|
||||
For enhanced productivity, install zsh autocomplete:
|
||||
|
||||
```bash
|
||||
# Configure with specific preset
|
||||
cmake --preset release
|
||||
# Install autocomplete
|
||||
./scripts/setup-autocomplete.sh install
|
||||
|
||||
# Build with specific preset
|
||||
cmake --build --preset tests-only
|
||||
# Check status
|
||||
./scripts/setup-autocomplete.sh status
|
||||
|
||||
# Using build script with preset
|
||||
./scripts/build.sh --preset release
|
||||
# Remove if needed
|
||||
./scripts/setup-autocomplete.sh uninstall
|
||||
```
|
||||
|
||||
## 📁 Project Structure
|
||||
**Features:**
|
||||
- Tab completion for all build commands
|
||||
- Board selection autocomplete
|
||||
- Preset selection autocomplete
|
||||
- Works with: `build.sh`, `./scripts/build.sh`, `./build.sh`
|
||||
|
||||
```
|
||||
RocketLauncher/
|
||||
├── CMakeLists.txt # Main CMake configuration
|
||||
├── CMakePresets.json # Build presets for CLion
|
||||
├── platformio.ini # PlatformIO configuration
|
||||
├── cmake/ # CMake modules
|
||||
│ └── FindUnity.cmake # Unity test framework finder
|
||||
├── lib/Unity/ # Unity test framework
|
||||
│ ├── unity.h # Test framework header
|
||||
│ └── unity.cpp # Test framework implementation
|
||||
├── scripts/ # Build helper scripts
|
||||
│ └── build.sh # Main build script
|
||||
├── src/ # Source code
|
||||
│ ├── main.cpp # Arduino main program
|
||||
│ ├── RocketController.cpp # Rocket control logic
|
||||
│ ├── RocketController.h # Rocket control interface
|
||||
│ └── ArduinoInterface.h # Arduino abstraction
|
||||
├── test/ # Unit tests
|
||||
│ └── test_rocket_controller.cpp
|
||||
├── lib/ # External libraries
|
||||
├── include/ # Header files
|
||||
└── .vscode/ # VS Code configuration
|
||||
└── settings.json # Editor settings
|
||||
```
|
||||
|
||||
## 🔧 Configuration
|
||||
|
||||
### Environment Variables
|
||||
|
||||
- `ARDUINO_HOME` - Path to Arduino installation (optional, auto-detected)
|
||||
|
||||
### CMake Options
|
||||
|
||||
```bash
|
||||
# Configure with custom options
|
||||
cmake -DBUILD_TESTS=OFF -DPLATFORMIO_INTEGRATION=OFF ..
|
||||
|
||||
# Available options:
|
||||
# BUILD_TESTS - Enable/disable unit tests (default: ON)
|
||||
# PLATFORMIO_INTEGRATION - Enable/disable PlatformIO integration (default: ON)
|
||||
# ENABLE_FORMATTING - Enable/disable code formatting (default: ON)
|
||||
```
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
./scripts/build.sh test
|
||||
|
||||
# Run tests with verbose output
|
||||
ctest --preset default --output-on-failure
|
||||
|
||||
# Run specific test
|
||||
ctest --preset default -R RocketControllerTests
|
||||
```
|
||||
|
||||
### Test Framework
|
||||
|
||||
The project uses the **Unity test framework** for unit testing. Tests are automatically discovered and run during the build process.
|
||||
|
||||
## 📱 Arduino Development
|
||||
|
||||
### Building Firmware
|
||||
|
||||
```bash
|
||||
# Build for Arduino Uno
|
||||
./scripts/build.sh firmware-hw
|
||||
|
||||
# Build for simulation
|
||||
./scripts/build.sh firmware-sim
|
||||
|
||||
# Build both
|
||||
./scripts/build.sh all-firmware
|
||||
```
|
||||
|
||||
### Uploading to Arduino
|
||||
|
||||
```bash
|
||||
# Upload hardware firmware (requires Arduino connection)
|
||||
./scripts/build.sh upload
|
||||
```
|
||||
|
||||
**Note**: Upload functionality requires proper Arduino connection and may need configuration for your specific setup.
|
||||
|
||||
### Arduino Libraries
|
||||
|
||||
The project automatically includes these Arduino libraries via PlatformIO:
|
||||
- `LiquidCrystal` - LCD display support
|
||||
- `Bounce2` - Button debouncing
|
||||
|
||||
## 🎮 Simulation
|
||||
|
||||
### SimulIDE Integration
|
||||
|
||||
The simulation build creates firmware compatible with SimulIDE:
|
||||
|
||||
1. Build simulation firmware: `./scripts/build.sh firmware-sim`
|
||||
2. Open SimulIDE
|
||||
3. Load your simulation file (`.sim1`)
|
||||
4. Firmware will auto-load from the PlatformIO build output
|
||||
|
||||
## 🚀 Migration from Makefile
|
||||
|
||||
### Old Makefile Commands → New CMake Commands
|
||||
|
||||
| Old Makefile | New CMake | Description |
|
||||
|--------------|-----------|-------------|
|
||||
| `make all` | `./scripts/build.sh` | Full build |
|
||||
| `make build-only` | `./scripts/build.sh build` | Build only |
|
||||
| `make test` | `./scripts/build.sh test` | Run tests |
|
||||
| `make clean` | `./scripts/build.sh clean` | Clean build |
|
||||
| `make build-sim` | `./scripts/build.sh firmware-sim` | Simulation build |
|
||||
| `make build-hw` | `./scripts/build.sh firmware-hw` | Hardware build |
|
||||
| `make upload` | `./scripts/build.sh upload` | Upload to Arduino |
|
||||
| `make format` | `./scripts/build.sh format` | Format code |
|
||||
| `make status` | `./scripts/build.sh status` | Show status |
|
||||
|
||||
### Key Benefits of CMake
|
||||
|
||||
1. **Cross-platform**: Works on macOS, Linux, and Windows
|
||||
2. **IDE integration**: Better support in CLion, VS Code, etc.
|
||||
3. **Presets**: Multiple build configurations without reconfiguration
|
||||
4. **Modular**: Reusable build components
|
||||
5. **Standards**: Follows modern C++ build practices
|
||||
6. **Maintainable**: Easier to extend and modify
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
#### CMake not found
|
||||
```bash
|
||||
# Install CMake
|
||||
# macOS
|
||||
brew install cmake
|
||||
|
||||
# Ubuntu
|
||||
sudo apt install cmake
|
||||
|
||||
# Windows
|
||||
# Download from cmake.org
|
||||
```
|
||||
|
||||
#### PlatformIO not found
|
||||
```bash
|
||||
# Install PlatformIO
|
||||
pip install platformio
|
||||
```
|
||||
|
||||
#### Build failures
|
||||
```bash
|
||||
# Clean and rebuild
|
||||
./scripts/build.sh clean
|
||||
./scripts/build.sh
|
||||
|
||||
# Check dependencies
|
||||
./scripts/build.sh status
|
||||
```
|
||||
|
||||
### Getting Help
|
||||
|
||||
1. Check the project status: `./scripts/build.sh status`
|
||||
2. Verify dependencies are installed
|
||||
3. Check build logs in the build directory
|
||||
4. Ensure you're using CMake 3.20+
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch
|
||||
3. Make your changes
|
||||
4. Test with: `./scripts/build.sh test`
|
||||
5. Submit a pull request
|
||||
|
||||
## 📄 License
|
||||
|
||||
[Your License Here]
|
||||
|
||||
## 🙏 Acknowledgments
|
||||
|
||||
- **Luke** - Original rocket launcher design
|
||||
- **Arduino community** - Hardware platform
|
||||
- **PlatformIO community** - Arduino development tools
|
||||
- **CMake community** - Build system
|
||||
- **Unity framework** - Testing framework
|
||||
### **Getting Started with Multi-Board** 🎯
|
||||
@@ -1,33 +1,48 @@
|
||||
[platformio]
|
||||
default_envs = simulide
|
||||
; switch this when you want to build others (simulide / uno_hw / native)
|
||||
default_envs = uno_r4_minima
|
||||
|
||||
; ---------------- SimulIDE (AVR sim) ----------------
|
||||
[env:simulide]
|
||||
platform = atmelavr
|
||||
board = uno
|
||||
framework = arduino
|
||||
upload_protocol = custom
|
||||
monitor_speed = 115200
|
||||
lib_deps =
|
||||
arduino-libraries/LiquidCrystal@^1.0.7
|
||||
thomasfredericks/Bounce2@^2.72
|
||||
|
||||
; ---------- macOS ----------
|
||||
; Copies the built HEX to a stable path your .simu references, then opens that .simu
|
||||
upload_protocol = custom
|
||||
upload_command = /bin/sh -lc 'mkdir -p "$PROJECT_DIR/out/simulide" && cp "$PROJECT_BUILD_DIR/$PIOENV/${PROGNAME}.hex" "$PROJECT_DIR/out/simulide/firmware.hex" && /Applications/simulide.app/Contents/MacOS/simulide "../../wiring/rocker_launcher_controls.sim1" &'
|
||||
|
||||
|
||||
; ---------------- Real UNO R3 (AVR) ----------------
|
||||
[env:uno_hw]
|
||||
platform = atmelavr
|
||||
board = uno
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
build_flags = -DARDUINO_ARCH_AVR
|
||||
lib_deps =
|
||||
arduino-libraries/LiquidCrystal@^1.0.7
|
||||
thomasfredericks/Bounce2@^2.72
|
||||
|
||||
; ---------------- UNO R4 Minima (Renesas RA4M1) ----------------
|
||||
[env:uno_r4_minima]
|
||||
platform = renesas-ra
|
||||
board = uno_r4_minima
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
build_flags = -DARDUINO_ARCH_RENESAS
|
||||
lib_deps =
|
||||
arduino-libraries/LiquidCrystal@^1.0.7
|
||||
thomasfredericks/Bounce2@^2.72
|
||||
; If upload has trouble, uncomment and set the exact port:
|
||||
; upload_port = /dev/cu.usbmodemXXXX
|
||||
; board_build.flash_mode can be set if needed, but defaults are fine for R4.
|
||||
|
||||
; ---------------- Native tests ----------------
|
||||
[env:native]
|
||||
platform = native
|
||||
build_flags =
|
||||
build_flags =
|
||||
-std=c++17
|
||||
-Wall -Wextra -Wpedantic
|
||||
-DUNITY_INCLUDE_DOUBLE
|
||||
@@ -37,11 +52,12 @@ build_flags =
|
||||
test_framework = unity
|
||||
test_build_src = yes
|
||||
test_filter = test_*
|
||||
test_ignore =
|
||||
test_ignore =
|
||||
test_manual_*
|
||||
test_integration_*
|
||||
build_src_filter =
|
||||
build_src_filter =
|
||||
-<main.cpp>
|
||||
+<ArduinoInterface.h>
|
||||
+<RocketController.h>
|
||||
+<RocketController.cpp>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 🚀 Luke's Rocket Launch Controller - CMake Build Script
|
||||
# Modern build system for Arduino-based rocket launcher with PlatformIO integration
|
||||
# 🚀 Luke's Rocket Launch Controller - CMake + PlatformIO Build Script
|
||||
# Now supports Arduino UNO R3, UNO R4 Minima, and SimulIDE with interactive board selection.
|
||||
|
||||
set -e
|
||||
|
||||
@@ -16,43 +16,230 @@ NC='\033[0m' # No Color
|
||||
PROJECT_NAME="RocketLauncher"
|
||||
BUILD_DIR="build"
|
||||
DEFAULT_PRESET="default"
|
||||
CONFIG_FILE=".board-config"
|
||||
|
||||
# Function to print colored output
|
||||
print_status() {
|
||||
echo -e "${GREEN}🔧 $1${NC}"
|
||||
# Supported board environments
|
||||
SUPPORTED_BOARDS=("uno_hw" "uno_r4_minima" "simulide")
|
||||
BOARD_NAMES=("Arduino UNO R3" "Arduino UNO R4 Minima" "Simulation Environment")
|
||||
BOARD_DESCRIPTIONS=(
|
||||
"Classic Arduino (ATmega328P) - Proven reliability, wide compatibility"
|
||||
"Modern ARM (Renesas RA4M1) - Enhanced performance, future-proof"
|
||||
"Safe testing without hardware - Fast development cycles"
|
||||
)
|
||||
|
||||
# ----------- Pretty printers -----------
|
||||
print_status() { echo -e "${GREEN}🔧 $1${NC}"; }
|
||||
print_warning() { echo -e "${YELLOW}⚠️ $1${NC}"; }
|
||||
print_error() { echo -e "${RED}❌ $1${NC}"; }
|
||||
print_info() { echo -e "${BLUE}ℹ️ $1${NC}"; }
|
||||
print_board() { echo -e "${BLUE}🎯 $1${NC}"; }
|
||||
print_success() { echo -e "${GREEN}✅ $1${NC}"; }
|
||||
|
||||
# ----------- Board Configuration Management -----------
|
||||
get_board_config() {
|
||||
if [[ -f "$CONFIG_FILE" ]]; then
|
||||
cat "$CONFIG_FILE"
|
||||
else
|
||||
echo "uno_r4_minima" # Default board
|
||||
fi
|
||||
}
|
||||
|
||||
print_warning() {
|
||||
echo -e "${YELLOW}⚠️ $1${NC}"
|
||||
set_board_config() {
|
||||
local board=$1
|
||||
echo "$board" > "$CONFIG_FILE"
|
||||
print_success "Board configuration saved: $board"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}❌ $1${NC}"
|
||||
show_board_info() {
|
||||
local board=$(get_board_config)
|
||||
print_board "Current target board: $board"
|
||||
|
||||
case "$board" in
|
||||
"uno_hw")
|
||||
print_info " • Arduino UNO R3 (ATmega328P)"
|
||||
print_info " • Classic Arduino compatibility"
|
||||
print_info " • AVR toolchain"
|
||||
;;
|
||||
"uno_r4_minima")
|
||||
print_info " • Arduino UNO R4 Minima (Renesas RA4M1)"
|
||||
print_info " • Modern 32-bit ARM architecture"
|
||||
print_info " • Renesas toolchain"
|
||||
;;
|
||||
"simulide")
|
||||
print_info " • Simulation environment (AVR)"
|
||||
print_info " • Safe testing without hardware"
|
||||
print_info " • SimulIDE integration"
|
||||
;;
|
||||
*)
|
||||
print_warning " • Unknown board environment"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
print_info() {
|
||||
echo -e "${BLUE}ℹ️ $1${NC}"
|
||||
validate_board() {
|
||||
local board=$1
|
||||
for supported in "${SUPPORTED_BOARDS[@]}"; do
|
||||
if [[ "$board" == "$supported" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Function to show help
|
||||
interactive_board_selection() {
|
||||
local board_param=$1
|
||||
|
||||
# If board parameter is provided, use it directly
|
||||
if [[ -n "$board_param" ]]; then
|
||||
# Check if it's a valid board name
|
||||
if validate_board "$board_param"; then
|
||||
print_success "Selected: $board_param"
|
||||
|
||||
# Save configuration
|
||||
set_board_config "$board_param"
|
||||
|
||||
# Show next steps
|
||||
echo ""
|
||||
print_info "Next steps:"
|
||||
case "$board_param" in
|
||||
"uno_hw"|"uno_r4_minima")
|
||||
echo " • Build firmware: ./scripts/build.sh firmware"
|
||||
echo " • Upload to board: ./scripts/build.sh upload"
|
||||
echo " • Monitor output: ./scripts/build.sh monitor"
|
||||
;;
|
||||
"simulide")
|
||||
echo " • Launch simulator: ./scripts/build.sh sim"
|
||||
echo " • Build simulation: ./scripts/build.sh firmware"
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
else
|
||||
print_error "Invalid board: $board_param"
|
||||
print_info "Available boards:"
|
||||
list_supported_boards
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Interactive selection (original behavior)
|
||||
print_status "Board Selection"
|
||||
echo ""
|
||||
print_info "Please select your target board:"
|
||||
echo ""
|
||||
|
||||
for i in "${!SUPPORTED_BOARDS[@]}"; do
|
||||
local board="${SUPPORTED_BOARDS[$i]}"
|
||||
local name="${BOARD_NAMES[$i]}"
|
||||
local desc="${BOARD_DESCRIPTIONS[$i]}"
|
||||
echo -e "${GREEN}[$((i+1))]${NC} $board - $name"
|
||||
echo " $desc"
|
||||
echo ""
|
||||
done
|
||||
|
||||
local current_board=$(get_board_config)
|
||||
local current_index=0
|
||||
|
||||
# Find current board index
|
||||
for i in "${!SUPPORTED_BOARDS[@]}"; do
|
||||
if [[ "${SUPPORTED_BOARDS[$i]}" == "$current_board" ]]; then
|
||||
current_index=$((i+1))
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $current_index -gt 0 ]]; then
|
||||
echo -e "${BLUE}Current selection: [$current_index] $current_board${NC}"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Get user input
|
||||
local choice
|
||||
while true; do
|
||||
read -p "Enter your choice (1-${#SUPPORTED_BOARDS[@]}): " choice
|
||||
|
||||
if [[ "$choice" =~ ^[1-9]$ ]] && [[ "$choice" -le "${#SUPPORTED_BOARDS[@]}" ]]; then
|
||||
local selected_board="${SUPPORTED_BOARDS[$((choice-1))]}"
|
||||
print_success "Selected: $selected_board"
|
||||
|
||||
# Save configuration
|
||||
set_board_config "$selected_board"
|
||||
|
||||
# Show next steps
|
||||
echo ""
|
||||
print_info "Next steps:"
|
||||
case "$selected_board" in
|
||||
"uno_hw"|"uno_r4_minima")
|
||||
echo " • Build firmware: ./scripts/build.sh firmware"
|
||||
echo " • Upload to board: ./scripts/build.sh upload"
|
||||
echo " • Monitor output: ./scripts/build.sh monitor"
|
||||
;;
|
||||
"simulide")
|
||||
echo " • Launch simulator: ./scripts/build.sh sim"
|
||||
echo " • Build simulation: ./scripts/build.sh firmware"
|
||||
;;
|
||||
esac
|
||||
break
|
||||
else
|
||||
print_error "Invalid choice. Please enter a number between 1 and ${#SUPPORTED_BOARDS[@]}."
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
list_supported_boards() {
|
||||
print_info "Available board environments:"
|
||||
echo ""
|
||||
for i in "${!SUPPORTED_BOARDS[@]}"; do
|
||||
local board="${SUPPORTED_BOARDS[$i]}"
|
||||
local name="${BOARD_NAMES[$i]}"
|
||||
local desc="${BOARD_DESCRIPTIONS[$i]}"
|
||||
local current=""
|
||||
|
||||
if [[ "$board" == "$(get_board_config)" ]]; then
|
||||
current=" (current)"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}• $board$current${NC}"
|
||||
echo " $name"
|
||||
echo " $desc"
|
||||
echo ""
|
||||
done
|
||||
|
||||
echo -e "${BLUE}Usage examples:${NC}"
|
||||
echo " ./scripts/build.sh firmware # Build for current board"
|
||||
echo " ./scripts/build.sh upload # Upload to current board"
|
||||
echo " ./scripts/build.sh monitor # Monitor current board"
|
||||
echo " ./scripts/build.sh sim # Launch simulator (if simulation board)"
|
||||
}
|
||||
|
||||
# ----------- Help -----------
|
||||
show_help() {
|
||||
echo -e "${GREEN}🚀 Luke's Rocket Launch Controller - Build System${NC}"
|
||||
echo ""
|
||||
echo -e "${BLUE}Multi-Board Support:${NC}"
|
||||
show_board_info
|
||||
echo ""
|
||||
echo -e "${BLUE}Board Management:${NC}"
|
||||
echo " ./scripts/build.sh configure # Configure project and select board"
|
||||
echo " ./scripts/build.sh boards # List supported boards"
|
||||
echo " ./scripts/build.sh board # Change board selection"
|
||||
echo " ./scripts/build.sh board uno_r4_minima # Select board by name"
|
||||
echo ""
|
||||
echo -e "${BLUE}Available commands:${NC}"
|
||||
echo " build.sh # Configure and build everything (default)"
|
||||
echo " build.sh configure # Configure CMake project"
|
||||
echo " build.sh # Configure + build + tests (default)"
|
||||
echo " build.sh configure # Configure CMake project and select board"
|
||||
echo " build.sh board # Change board selection"
|
||||
echo " build.sh build # Build project"
|
||||
echo " build.sh test # Run tests"
|
||||
echo " build.sh clean # Clean build files"
|
||||
echo " build.sh format # Format source code"
|
||||
echo " build.sh status # Show project status"
|
||||
echo " build.sh boards # List supported boards"
|
||||
echo ""
|
||||
echo -e "${BLUE}CMake targets (what CLion sees):${NC}"
|
||||
echo " build.sh firmware-sim # Build simulation firmware"
|
||||
echo " build.sh firmware-hw # Build hardware firmware"
|
||||
echo " build.sh all-firmware # Build both firmwares"
|
||||
echo " build.sh upload # Upload to Arduino"
|
||||
echo " build.sh monitor # Start serial monitor"
|
||||
echo -e "${BLUE}Firmware & tooling:${NC}"
|
||||
echo " build.sh firmware # Build firmware for current board"
|
||||
echo " build.sh sim # Build + launch SimulIDE (if simulation board)"
|
||||
echo " build.sh upload # Upload to current board"
|
||||
echo " build.sh monitor # Open serial monitor for current board"
|
||||
echo " build.sh pio-clean # Clean PlatformIO files"
|
||||
echo ""
|
||||
echo -e "${BLUE}Build presets:${NC}"
|
||||
@@ -62,154 +249,432 @@ show_help() {
|
||||
echo " minimal # Minimal build (no tests, no PlatformIO)"
|
||||
echo ""
|
||||
echo -e "${BLUE}Examples:${NC}"
|
||||
echo " ./scripts/build.sh # Full build"
|
||||
echo " ./scripts/build.sh firmware-sim # Build simulation firmware"
|
||||
echo " ./scripts/build.sh --preset release # Release build"
|
||||
echo " ./scripts/build.sh"
|
||||
echo " ./scripts/build.sh firmware"
|
||||
echo " ./scripts/build.sh sim"
|
||||
echo " ./scripts/build.sh --preset release"
|
||||
echo " ./scripts/build.sh upload"
|
||||
echo " ./scripts/build.sh monitor"
|
||||
echo ""
|
||||
echo -e "${BLUE}Board-specific examples:${NC}"
|
||||
echo " # After selecting board with ./scripts/build.sh configure:"
|
||||
echo " ./scripts/build.sh firmware # Builds for selected board"
|
||||
echo " ./scripts/build.sh upload # Uploads to selected board"
|
||||
echo " ./scripts/build.sh monitor # Monitors selected board"
|
||||
}
|
||||
|
||||
# Function to check dependencies
|
||||
# ----------- Dependency checks -----------
|
||||
check_dependencies() {
|
||||
print_status "Checking dependencies..."
|
||||
|
||||
|
||||
if ! command -v cmake &> /dev/null; then
|
||||
print_error "CMake not found. Please install CMake 3.20 or later."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if ! command -v make &> /dev/null; then
|
||||
print_error "Make not found. Please install Make."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for PlatformIO
|
||||
|
||||
if ! command -v pio &> /dev/null; then
|
||||
print_warning "PlatformIO not found. Arduino builds will not work."
|
||||
print_warning "PlatformIO not found. Arduino builds/uploads will not work."
|
||||
print_info "Install with: pip install platformio"
|
||||
print_info "Or use: ./scripts/build.sh --preset tests-only"
|
||||
else
|
||||
print_status "PlatformIO found"
|
||||
|
||||
# Validate current board selection
|
||||
local current_board=$(get_board_config)
|
||||
if ! validate_board "$current_board"; then
|
||||
print_error "Invalid board configuration: $current_board"
|
||||
print_info "Please run: ./scripts/build.sh configure"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Auto-install renesas-ra if targeting UNO R4 envs
|
||||
if [[ "$current_board" == "uno_r4_minima" || "$current_board" == "uno_r4_wifi" ]]; then
|
||||
if ! pio platform show renesas-ra &>/dev/null; then
|
||||
print_info "Installing PlatformIO renesas-ra toolchain for UNO R4..."
|
||||
pio platform install renesas-ra || {
|
||||
print_error "Failed to install renesas-ra platform"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Auto-install atmelavr if targeting UNO R3 envs
|
||||
if [[ "$current_board" == "uno_hw" || "$current_board" == "simulide" ]]; then
|
||||
if ! pio platform show atmelavr &>/dev/null; then
|
||||
print_info "Installing PlatformIO atmelavr toolchain for UNO R3..."
|
||||
pio platform install atmelavr || {
|
||||
print_error "Failed to install atmelavr platform"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
print_status "Dependencies check complete"
|
||||
}
|
||||
|
||||
# Function to configure project
|
||||
# ----------- Presets / build -----------
|
||||
configure_project() {
|
||||
local preset=${1:-$DEFAULT_PRESET}
|
||||
print_status "Configuring project with preset: $preset"
|
||||
|
||||
|
||||
# Check if board is configured
|
||||
if [[ ! -f "$CONFIG_FILE" ]]; then
|
||||
print_info "No board configuration found. Starting board selection..."
|
||||
interactive_board_selection
|
||||
fi
|
||||
|
||||
mkdir -p "$BUILD_DIR"
|
||||
cd "$BUILD_DIR"
|
||||
|
||||
cmake --preset "$preset" ..
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
print_status "Configuration successful"
|
||||
else
|
||||
print_error "Configuration failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_status "Configuration successful"
|
||||
cd ..
|
||||
}
|
||||
|
||||
# Function to build project
|
||||
build_project() {
|
||||
local preset=${1:-$DEFAULT_PRESET}
|
||||
print_status "Building project with preset: $preset"
|
||||
|
||||
|
||||
if [ ! -d "$BUILD_DIR" ]; then
|
||||
print_warning "Build directory not found. Running configure first..."
|
||||
configure_project "$preset"
|
||||
fi
|
||||
|
||||
|
||||
cd "$BUILD_DIR"
|
||||
# Build without preset since we're already in the configured build directory
|
||||
cmake --build .
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
print_status "Build successful"
|
||||
print_info "Output files in: $BUILD_DIR"
|
||||
else
|
||||
print_error "Build failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_status "Build successful"
|
||||
print_info "Output files in: $BUILD_DIR"
|
||||
cd ..
|
||||
}
|
||||
|
||||
# Function to run tests
|
||||
run_tests() {
|
||||
print_status "Running tests..."
|
||||
|
||||
|
||||
if [ ! -d "$BUILD_DIR" ]; then
|
||||
print_warning "Build directory not found. Running configure first..."
|
||||
configure_project
|
||||
fi
|
||||
|
||||
|
||||
cd "$BUILD_DIR"
|
||||
# Run tests without preset since we're already in the configured build directory
|
||||
ctest --output-on-failure
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
print_status "Tests completed successfully"
|
||||
else
|
||||
print_error "Tests failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_status "Tests completed successfully"
|
||||
cd ..
|
||||
}
|
||||
|
||||
# Function to clean build files
|
||||
clean_build() {
|
||||
print_status "Cleaning build files..."
|
||||
|
||||
|
||||
if [ -d "$BUILD_DIR" ]; then
|
||||
rm -rf "$BUILD_DIR"
|
||||
print_status "Build directory removed"
|
||||
fi
|
||||
|
||||
# Clean other build directories
|
||||
|
||||
for dir in build-*; do
|
||||
if [ -d "$dir" ]; then
|
||||
rm -rf "$dir"
|
||||
print_status "Removed $dir"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
print_status "Clean complete"
|
||||
}
|
||||
|
||||
# Function to build specific CMake targets
|
||||
build_target() {
|
||||
local target=$1
|
||||
local description=$2
|
||||
|
||||
print_status "$description"
|
||||
|
||||
if [ ! -d "$BUILD_DIR" ]; then
|
||||
print_warning "Build directory not found. Running configure first..."
|
||||
configure_project
|
||||
fi
|
||||
|
||||
cd "$BUILD_DIR"
|
||||
cmake --build . --target "$target"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
print_status "Target '$target' built successfully"
|
||||
|
||||
|
||||
# ----------- Status -----------
|
||||
show_status() {
|
||||
print_status "Project Status"
|
||||
print_info "Project: $PROJECT_NAME"
|
||||
print_info "Build directory: $BUILD_DIR"
|
||||
print_info "Source directory: $(pwd)"
|
||||
|
||||
if [ -d "$BUILD_DIR" ]; then
|
||||
print_info "✅ Build directory exists"
|
||||
if [ -f "$BUILD_DIR/rocket_tests" ]; then
|
||||
print_info "✅ Test executable exists"
|
||||
fi
|
||||
else
|
||||
print_error "Target '$target' build failed"
|
||||
print_warning "❌ Build directory missing"
|
||||
fi
|
||||
|
||||
if command -v pio &> /dev/null; then
|
||||
print_info "✅ PlatformIO found"
|
||||
if [ -f "platformio.ini" ]; then
|
||||
print_info "✅ PlatformIO project configuration found"
|
||||
else
|
||||
print_warning "⚠️ PlatformIO project configuration not found"
|
||||
fi
|
||||
|
||||
# Show current board information
|
||||
echo ""
|
||||
show_board_info
|
||||
|
||||
# Show available platforms
|
||||
echo ""
|
||||
print_info "Installed PlatformIO platforms:"
|
||||
if pio platform show atmelavr &>/dev/null; then
|
||||
print_info " ✅ atmelavr (for UNO R3 and simulation)"
|
||||
else
|
||||
print_warning " ❌ atmelavr (required for UNO R3 and simulation)"
|
||||
fi
|
||||
|
||||
if pio platform show renesas-ra &>/dev/null; then
|
||||
print_info " ✅ renesas-ra (for UNO R4 Minima)"
|
||||
else
|
||||
print_warning " ❌ renesas-ra (required for UNO R4 Minima)"
|
||||
fi
|
||||
|
||||
# Show available devices
|
||||
echo ""
|
||||
print_info "Available devices:"
|
||||
if pio device list &>/dev/null; then
|
||||
pio device list --serial | head -10
|
||||
else
|
||||
print_warning "No devices found"
|
||||
fi
|
||||
else
|
||||
print_warning "❌ PlatformIO not found"
|
||||
fi
|
||||
}
|
||||
|
||||
# ----------- Main -----------
|
||||
main() {
|
||||
local command=${1:-"all"}
|
||||
local preset=${2:-$DEFAULT_PRESET}
|
||||
|
||||
case $command in
|
||||
"help"|"-h"|"--help") show_help ;;
|
||||
|
||||
"configure") check_dependencies ; configure_project "$preset" ;;
|
||||
"build") check_dependencies ; build_project "$preset" ;;
|
||||
"test") check_dependencies ; run_tests ;;
|
||||
"clean") clean_build ;;
|
||||
"format") format_code ;;
|
||||
"status") show_status ;;
|
||||
"boards") list_supported_boards ;;
|
||||
"board") interactive_board_selection "$2" ;;
|
||||
|
||||
"firmware") check_dependencies ; pio_build_firmware ;;
|
||||
"sim") launch_simulator ;;
|
||||
|
||||
"upload") check_dependencies ; pio_upload ;;
|
||||
"monitor") check_dependencies ; pio_monitor ;;
|
||||
"pio-clean") check_dependencies ; pio_clean ;;
|
||||
|
||||
"all") check_dependencies ; configure_project "$preset" ; build_project "$preset" ; run_tests ;;
|
||||
*) print_error "Unknown command: $command" ; show_help ; exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# ----------- PlatformIO helpers (Multi-board safe) -----------
|
||||
resolve_pio_env() {
|
||||
local env_name=$(get_board_config)
|
||||
|
||||
# Validate the environment
|
||||
if ! validate_board "$env_name"; then
|
||||
print_error "Invalid board configuration: $env_name"
|
||||
list_supported_boards
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ..
|
||||
echo "$env_name"
|
||||
}
|
||||
|
||||
# Function to format code
|
||||
detect_port() {
|
||||
# Prefer PlatformIO's device listing (portable across OSes)
|
||||
local port
|
||||
port=$(pio device list --serial | awk -F': ' '/Port: /{print $2}' | head -n1)
|
||||
echo "$port"
|
||||
}
|
||||
|
||||
pio_build_firmware() {
|
||||
if ! command -v pio &> /dev/null; then
|
||||
print_error "PlatformIO is required for firmware building"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local env_name
|
||||
env_name="$(resolve_pio_env)"
|
||||
print_status "Building firmware with PlatformIO (env: $env_name)"
|
||||
|
||||
# Show board info before build
|
||||
show_board_info
|
||||
|
||||
# Build the firmware
|
||||
pio run -e "$env_name"
|
||||
|
||||
print_success "Firmware built successfully for $env_name"
|
||||
}
|
||||
|
||||
pio_upload() {
|
||||
if ! command -v pio &> /dev/null; then
|
||||
print_error "PlatformIO is required for upload"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local env_name
|
||||
env_name="$(resolve_pio_env)"
|
||||
print_status "Uploading with PlatformIO (env: $env_name)"
|
||||
|
||||
# Show board info before upload
|
||||
show_board_info
|
||||
|
||||
local port
|
||||
port="$(detect_port)"
|
||||
if [[ -n "$port" ]]; then
|
||||
print_info "Using serial port: $port"
|
||||
pio run -t upload -e "$env_name" --upload-port "$port"
|
||||
else
|
||||
print_warning "No serial port detected, attempting auto-detect..."
|
||||
pio run -t upload -e "$env_name"
|
||||
fi
|
||||
}
|
||||
|
||||
pio_monitor() {
|
||||
if ! command -v pio &> /dev/null; then
|
||||
print_error "PlatformIO is required for monitor"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local env_name baud port
|
||||
env_name="$(resolve_pio_env)"
|
||||
baud="115200"
|
||||
port="$(detect_port)"
|
||||
|
||||
# Show board info before monitor
|
||||
show_board_info
|
||||
|
||||
if [[ -n "$port" ]]; then
|
||||
print_status "Opening serial monitor @ ${baud} on ${port} (env: $env_name)"
|
||||
pio device monitor --baud "$baud" --port "$port"
|
||||
else
|
||||
print_status "Opening serial monitor @ ${baud} (env: $env_name)"
|
||||
print_warning "No specific port detected, using environment default"
|
||||
pio device monitor --baud "$baud" -e "$env_name"
|
||||
fi
|
||||
}
|
||||
|
||||
pio_clean() {
|
||||
if ! command -v pio &> /dev/null; then
|
||||
print_error "PlatformIO is required for cleaning"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local env_name
|
||||
env_name="$(resolve_pio_env)"
|
||||
print_status "Cleaning PlatformIO files (env: $env_name)"
|
||||
|
||||
# Show board info before clean
|
||||
show_board_info
|
||||
|
||||
# Clean the environment
|
||||
pio run -t clean -e "$env_name"
|
||||
|
||||
print_success "PlatformIO files cleaned for $env_name"
|
||||
}
|
||||
|
||||
# ----------- SimulIDE flow (Multi-board aware) -----------
|
||||
launch_simulator() {
|
||||
print_status "Building and launching simulator..."
|
||||
|
||||
# Ensure we're using the simulation environment
|
||||
local current_board=$(get_board_config)
|
||||
if [[ "$current_board" != "simulide" ]]; then
|
||||
print_warning "Current board is $current_board, but simulation requires 'simulide' environment"
|
||||
print_info "Switching to simulation environment for this operation..."
|
||||
set_board_config "simulide"
|
||||
fi
|
||||
|
||||
if ! command -v pio &> /dev/null; then
|
||||
print_error "PlatformIO not found. Cannot build simulation firmware."
|
||||
print_info "Install with: pip install platformio"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_info "Building simulation firmware..."
|
||||
pio run -e simulide
|
||||
|
||||
print_status "Simulation firmware built successfully"
|
||||
|
||||
BUILD_FIRMWARE_PATH=".pio/build/simulide/firmware.hex"
|
||||
EXPECTED_FIRMWARE_PATH="out/simulide/firmware.hex"
|
||||
|
||||
if [[ ! -f "$BUILD_FIRMWARE_PATH" ]]; then
|
||||
print_error "Firmware file not found at build path: $BUILD_FIRMWARE_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_info "Copying firmware to expected location..."
|
||||
mkdir -p "out/simulide"
|
||||
cp "$BUILD_FIRMWARE_PATH" "$EXPECTED_FIRMWARE_PATH"
|
||||
|
||||
print_status "Firmware ready at: $EXPECTED_FIRMWARE_PATH"
|
||||
|
||||
SIMULIDE_PATH=""
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
if [[ -d "/Applications/simulide.app" ]]; then
|
||||
SIMULIDE_PATH="/Applications/simulide.app/Contents/MacOS/simulide"
|
||||
elif [[ -d "$HOME/Applications/simulide.app" ]]; then
|
||||
SIMULIDE_PATH="$HOME/Applications/simulide.app/Contents/MacOS/simulide"
|
||||
fi
|
||||
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
if command -v simulide &> /dev/null; then
|
||||
SIMULIDE_PATH="simulide"
|
||||
fi
|
||||
elif [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "cygwin" ]]; then
|
||||
if command -v simulide.exe &> /dev/null; then
|
||||
SIMULIDE_PATH="simulide.exe"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$SIMULIDE_PATH" ]]; then
|
||||
print_status "Launching SimulIDE..."
|
||||
WIRING_FILE="../../wiring/rocker_launcher_controls.sim1"
|
||||
if [[ ! -f "$WIRING_FILE" ]]; then
|
||||
print_warning "Default wiring file not found, looking for alternatives..."
|
||||
ALTERNATIVE_WIRING=$(find "../../wiring" -name "*.sim1" | head -1)
|
||||
if [[ -n "$ALTERNATIVE_WIRING" ]]; then
|
||||
WIRING_FILE="$ALTERNATIVE_WIRING"
|
||||
print_info "Using alternative wiring file: $WIRING_FILE"
|
||||
else
|
||||
print_warning "No wiring files found, launching SimulIDE without wiring file"
|
||||
WIRING_FILE=""
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$WIRING_FILE" ]]; then
|
||||
print_info "Loading wiring file: $WIRING_FILE"
|
||||
"$SIMULIDE_PATH" "$WIRING_FILE" &
|
||||
else
|
||||
print_info "Launching SimulIDE without wiring file..."
|
||||
"$SIMULIDE_PATH" &
|
||||
fi
|
||||
|
||||
print_status "SimulIDE launched successfully!"
|
||||
print_info "💡 Tips:"
|
||||
print_info " • The firmware will auto-load in SimulIDE"
|
||||
print_info " • Make changes and re-run: ./scripts/build.sh sim"
|
||||
print_info " • Check SimulIDE console for runtime errors"
|
||||
print_info " • Use ./scripts/build.sh board to change board selection"
|
||||
else
|
||||
print_warning "SimulIDE not found - firmware built but not launched"
|
||||
print_info "📋 Manual Launch:"
|
||||
print_info "1. Open SimulIDE"
|
||||
print_info "2. Load: ../../wiring/rocker_launcher_controls.sim1"
|
||||
print_info "3. Firmware: $EXPECTED_FIRMWARE_PATH"
|
||||
fi
|
||||
|
||||
print_status "Simulator setup complete!"
|
||||
}
|
||||
|
||||
# ----------- Optional: code formatter -----------
|
||||
format_code() {
|
||||
print_status "Formatting source code..."
|
||||
|
||||
if command -v clang-format &> /dev/null; then
|
||||
find src/ -name "*.cpp" -o -name "*.h" | xargs clang-format -i
|
||||
print_status "Code formatting complete"
|
||||
@@ -220,109 +685,7 @@ format_code() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to show status
|
||||
show_status() {
|
||||
print_status "Project Status"
|
||||
print_info "Project: $PROJECT_NAME"
|
||||
print_info "Build directory: $BUILD_DIR"
|
||||
print_info "Source directory: $(pwd)"
|
||||
|
||||
if [ -d "$BUILD_DIR" ]; then
|
||||
print_info "✅ Build directory exists"
|
||||
|
||||
# Check for test executable
|
||||
if [ -f "$BUILD_DIR/rocket_tests" ]; then
|
||||
print_info "✅ Test executable exists"
|
||||
fi
|
||||
else
|
||||
print_warning "❌ Build directory missing"
|
||||
fi
|
||||
|
||||
# Check PlatformIO status
|
||||
if command -v pio &> /dev/null; then
|
||||
print_info "✅ PlatformIO found"
|
||||
|
||||
# Check PlatformIO project
|
||||
if [ -f "platformio.ini" ]; then
|
||||
print_info "✅ PlatformIO project configuration found"
|
||||
else
|
||||
print_warning "⚠️ PlatformIO project configuration not found"
|
||||
fi
|
||||
else
|
||||
print_warning "❌ PlatformIO not found"
|
||||
fi
|
||||
}
|
||||
|
||||
# Main script logic
|
||||
main() {
|
||||
local command=${1:-"all"}
|
||||
local preset=${2:-$DEFAULT_PRESET}
|
||||
|
||||
case $command in
|
||||
"help"|"-h"|"--help")
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
"configure")
|
||||
check_dependencies
|
||||
configure_project "$preset"
|
||||
;;
|
||||
"build")
|
||||
check_dependencies
|
||||
build_project "$preset"
|
||||
;;
|
||||
"test")
|
||||
check_dependencies
|
||||
run_tests
|
||||
;;
|
||||
"clean")
|
||||
clean_build
|
||||
;;
|
||||
"format")
|
||||
format_code
|
||||
;;
|
||||
"status")
|
||||
show_status
|
||||
;;
|
||||
"firmware-sim")
|
||||
check_dependencies
|
||||
build_target "firmware_sim" "Building simulation firmware"
|
||||
;;
|
||||
"firmware-hw")
|
||||
check_dependencies
|
||||
build_target "firmware_hw" "Building hardware firmware"
|
||||
;;
|
||||
"all-firmware")
|
||||
check_dependencies
|
||||
build_target "all_firmware" "Building both firmwares"
|
||||
;;
|
||||
"upload")
|
||||
check_dependencies
|
||||
build_target "upload" "Building and uploading firmware"
|
||||
;;
|
||||
"monitor")
|
||||
check_dependencies
|
||||
build_target "monitor" "Starting serial monitor"
|
||||
;;
|
||||
"pio-clean")
|
||||
check_dependencies
|
||||
build_target "pio_clean" "Cleaning PlatformIO files"
|
||||
;;
|
||||
"all")
|
||||
check_dependencies
|
||||
configure_project "$preset"
|
||||
build_project "$preset"
|
||||
run_tests
|
||||
;;
|
||||
*)
|
||||
print_error "Unknown command: $command"
|
||||
show_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Handle preset argument
|
||||
# ----------- Preset flag handling -----------
|
||||
if [[ "$1" == "--preset" ]]; then
|
||||
preset="$2"
|
||||
shift 2
|
||||
|
||||
@@ -86,7 +86,13 @@ class RealArduinoInterface : public ArduinoInterface
|
||||
// Pin control
|
||||
void digitalWrite(uint8_t pin, uint8_t state) override
|
||||
{
|
||||
#ifdef ARDUINO_ARCH_RENESAS
|
||||
// UNO R4 Minima uses PinStatus enum
|
||||
::digitalWrite(pin, static_cast<PinStatus>(state));
|
||||
#else
|
||||
// Classic Arduino (AVR) uses uint8_t
|
||||
::digitalWrite(pin, state);
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t digitalRead(uint8_t pin) const override
|
||||
@@ -96,7 +102,13 @@ class RealArduinoInterface : public ArduinoInterface
|
||||
|
||||
void pinMode(uint8_t pin, uint8_t mode) override
|
||||
{
|
||||
#ifdef ARDUINO_ARCH_RENESAS
|
||||
// UNO R4 Minima uses PinMode enum
|
||||
::pinMode(pin, static_cast<PinMode>(mode));
|
||||
#else
|
||||
// Classic Arduino (AVR) uses uint8_t
|
||||
::pinMode(pin, mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Time functions
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 411 KiB |
Reference in new issue
Block a user