-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from osu-uwrt/dev
Make master the new "dev" branch
- Loading branch information
Showing
410 changed files
with
103,460 additions
and
16,366 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
BasedOnStyle: LLVM | ||
Language: Cpp | ||
|
||
AccessModifierOffset: -4 | ||
AllowShortFunctionsOnASingleLine: Inline | ||
AllowShortIfStatementsOnASingleLine: false | ||
AttributeMacros: | ||
- __capability | ||
- __packed | ||
- __unused | ||
BitFieldColonSpacing: None | ||
BraceWrapping: | ||
AfterCaseLabel: false | ||
AfterClass: false | ||
AfterControlStatement: Never | ||
AfterEnum: false | ||
AfterExternBlock: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterObjCDeclaration: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
BeforeCatch: false | ||
BeforeElse: true | ||
BeforeLambdaBody: false | ||
BeforeWhile: false | ||
IndentBraces: false | ||
SplitEmptyFunction: true | ||
SplitEmptyRecord: true | ||
SplitEmptyNamespace: true | ||
BreakBeforeBraces: Custom | ||
BreakBeforeTernaryOperators: false | ||
BreakConstructorInitializers: AfterColon | ||
BreakInheritanceList: AfterColon | ||
ColumnLimit: 120 | ||
CommentPragmas: '(^ IWYU pragma:)|(^ ?PICO_CONFIG:)' | ||
Cpp11BracedListStyle: false | ||
|
||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
# Sorting from local to global scope, as this is best for catching weird dependency errors in your local libraries | ||
# Separate ros types into their own section | ||
- Regex: '^<[a-z0-9_]*\/(msg|srv|action)\/' | ||
Priority: 3 | ||
SortPriority: 4 | ||
CaseSensitive: false | ||
# Also put ROS core libraries in that seciton, but sorted above ros types | ||
- Regex: '^<(libyaml_vendor|rcutils|tracetools|ucdr|uxr|rmw[a-z0-9_]*|rcl[a-z0-9_]*|rosidl[a-z0-9_]*)\/' | ||
Priority: 3 | ||
SortPriority: 3 | ||
CaseSensitive: false | ||
# Put all remaining system libraries (starting with <) at the end | ||
- Regex: '^<' | ||
Priority: 5 | ||
SortPriority: 5 | ||
CaseSensitive: false | ||
# Next put pico-sdk headers in its own section | ||
- Regex: '^"(pico|hardware)\/' | ||
Priority: 2 | ||
SortPriority: 2 | ||
CaseSensitive: false | ||
# Put titan firmware library headers in same section as pico-sdk | ||
- Regex: '^"(titan|driver|micro_ros_pico|canmore)\/' | ||
Priority: 2 | ||
SortPriority: 2 | ||
CaseSensitive: false | ||
# Finally put the remaining headers at the top (this should only be project headers) | ||
- Regex: '.*' | ||
Priority: 1 | ||
SortPriority: 1 | ||
CaseSensitive: false | ||
|
||
IndentCaseLabels: false | ||
IndentExternBlock: NoIndent | ||
IndentWidth: 4 | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
LineEnding: LF | ||
NamespaceIndentation: Inner | ||
SortIncludes: CaseSensitive | ||
SortUsingDeclarations: LexicographicNumeric | ||
SpaceAfterCStyleCast: true | ||
SpaceBeforeCpp11BracedList: true | ||
SpaceBeforeCtorInitializerColon: false | ||
SpacesBeforeTrailingComments: 2 | ||
SpacesInContainerLiterals: false | ||
TabWidth: 4 | ||
UseTab: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "lib/pico-sdk"] | ||
path = lib/pico-sdk | ||
url = https://github.com/raspberrypi/pico-sdk | ||
[submodule "lib/titan_canmore"] | ||
path = lib/titan_canmore | ||
url = https://github.com/osu-uwrt/titan_canmore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-vscode.cpptools-extension-pack", | ||
"dan-c-underwood.arm", | ||
"chris-hock.pioasm", | ||
"cschlosser.doxdocgen", | ||
"Gruntfuggly.todo-tree", | ||
"marus25.cortex-debug" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Pico Debug", | ||
"cwd": "${command:cmake.launchTargetDirectory}", | ||
"executable": "${command:cmake.launchTargetPath}", | ||
"request": "launch", | ||
"type": "cortex-debug", | ||
"servertype": "openocd", | ||
// Configure toolchain path | ||
// Note this MUST begin with arm-non-eabi-gdb, but most distros nowadays just have gdb-multiarch | ||
// Run 'sudo ln -s gdb-multiarch /usr/bin/arm-none-eabi-gdb' and it'll make it happy | ||
// This is just since Cortex Debug assumes your toolchain prefix based on your gdb executable | ||
"gdbPath": "arm-none-eabi-gdb", | ||
// Configure OpenOCD | ||
"openOCDLaunchCommands": [ | ||
"adapter speed 2000" | ||
], | ||
"configFiles": [ | ||
"interface/cmsis-dap.cfg", | ||
"target/rp2040.cfg" | ||
], | ||
// Using our custom upload task (since bootloader gets squirly when you upload the raw elf) | ||
"preLaunchTask": "Upload SWD", | ||
"overrideLaunchCommands": [], | ||
// Configure how we want vscode to interact with things | ||
"device": "RP2040", | ||
"svdFile": "${workspaceRoot}/lib/pico-sdk/src/rp2040/hardware_regs/rp2040.svd", | ||
"postRestartCommands": [ | ||
"break main", | ||
"continue" | ||
], | ||
"postStartSessionCommands": [ | ||
"monitor reset halt", | ||
"break main", | ||
"continue" | ||
] | ||
}, | ||
{ | ||
"name": "Canmore Debug", | ||
"cwd": "${command:cmake.getLaunchTargetDirectory}", | ||
"executable": "${command:cmake.getLaunchTargetPath}", | ||
"request": "attach", | ||
"type": "cortex-debug", | ||
"servertype": "external", | ||
// Using localhost:3333 for gdbserver on CanmoreCLI | ||
"gdbTarget": "localhost:3333", | ||
// Configure toolchain path | ||
"gdbPath": "arm-none-eabi-gdb", | ||
// Using our custom upload task (since bootloader gets squirly when you upload the raw elf) | ||
"preLaunchTask": "Verify Remote Version", | ||
"overrideAttachCommands": [], | ||
// Configure how we want vscode to interact with things | ||
"device": "RP2040", | ||
"svdFile": "${workspaceRoot}/lib/pico-sdk/src/rp2040/hardware_regs/rp2040.svd", | ||
"breakAfterReset": false | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"cmake.sourceDirectory": [ | ||
"${workspaceFolder}/talos/Actuator/", | ||
"${workspaceFolder}/talos/CameraCageBB/", | ||
"${workspaceFolder}/talos/ESCBoard/", | ||
"${workspaceFolder}/talos/PowerBoard/", | ||
"${workspaceFolder}/talos/SmartBattery/", | ||
"${workspaceFolder}/puddles/Backplane/", | ||
"${workspaceFolder}/tools/upload_tool/", | ||
"${workspaceFolder}/tools/canmore_cli/" | ||
], | ||
"cmake.configureOnOpen": true, | ||
"cmake.generator": "Unix Makefiles", | ||
"cmake.options.advanced": { | ||
"build": { | ||
"statusBarVisibility": "visible" | ||
}, | ||
"launch": { | ||
"statusBarVisibility": "hidden" | ||
}, | ||
"debug": { | ||
"statusBarVisibility": "hidden" | ||
} | ||
}, | ||
"debug.onTaskErrors": "abort", | ||
"editor.detectIndentation": false, | ||
"editor.formatOnSave": true, | ||
"editor.insertSpaces": true, | ||
"editor.rulers": [ | ||
120 | ||
], | ||
"editor.tabSize": 4, | ||
"files.trimTrailingWhitespace": true, | ||
"files.insertFinalNewline": true, | ||
"git.autofetch": true, | ||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", | ||
"C_Cpp.formatting": "clangFormat", | ||
"C_Cpp.autoAddFileAssociations": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Upload SWD", | ||
"detail": "Uploads Active CMake Project over SWD", | ||
"type": "shell", | ||
"isBackground": false, | ||
"command": "make swd_flash", | ||
"options": { | ||
"cwd": "${command:cmake.launchTargetDirectory}" | ||
}, | ||
"presentation": { | ||
"reveal": "always", | ||
"panel": "dedicated", | ||
"focus": true, | ||
"clear": true, | ||
"showReuseMessage": true | ||
}, | ||
"problemMatcher": [] | ||
}, | ||
{ | ||
"hide": true, | ||
"label": "Verify Remote Version", | ||
"detail": "Verifies that the GDB remote version matches the copiled version", | ||
"type": "shell", | ||
"isBackground": false, | ||
"command": "${workspaceRoot}/.vscode/verify_remote_version.sh", | ||
"args": [ | ||
"${command:cmake.getLaunchTargetPath}" | ||
], | ||
"options": { | ||
"cwd": "${command:cmake.getLaunchTargetDirectory}", | ||
}, | ||
"presentation": { | ||
"reveal": "silent", | ||
"panel": "dedicated", | ||
"clear": true, | ||
"showReuseMessage": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
# Verifies that the firmware version on the GDB remote target matches the locally compiled version | ||
|
||
REMOTE_URL="localhost:3333" | ||
LOCAL_FILE="$1" | ||
TIMEOUT_SEC=5 | ||
|
||
if [ -z "$1" ]; then | ||
echo "Expected filename!" | ||
echo "Usage: $0 [elf file]" | ||
exit 2 | ||
fi | ||
|
||
LOCAL_VERSION="$(gdb-multiarch -batch -silent -ex 'printf "%s", FULL_BUILD_TAG' -ex quit "$LOCAL_FILE")" | ||
REMOTE_VERSION="$(gdb-multiarch -batch-silent -ex "set tcp connect-timeout $TIMEOUT_SEC" -ex "target remote $REMOTE_URL" -ex "set logging file /dev/stdout" -ex "set logging enabled on" -ex 'printf "%s", FULL_BUILD_TAG' -ex "set logging enabled off" -ex quit "$LOCAL_FILE")" | ||
|
||
if [[ "$LOCAL_VERSION" != "$REMOTE_VERSION" ]]; then | ||
echo -e "\033[91mVersion on remote does not match local version!\033[0m" >&2 | ||
echo -e "\033[32mLocal Version:\033[0m $LOCAL_VERSION" | ||
echo -e "\033[32mRemote Version:\033[0m $REMOTE_VERSION" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.