-
Notifications
You must be signed in to change notification settings - Fork 25
Fetch dependencies, format, and compile #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
17bab5a
6e501f4
32d4e90
46cb022
97d26ef
b539b1c
37f8639
0525cbb
6612d27
6423edb
8612434
a65c78a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,288 @@ | ||
| --- | ||
| Language: Cpp | ||
| AccessModifierOffset: -2 | ||
| AlignAfterOpenBracket: Align | ||
| AlignArrayOfStructures: None | ||
| AlignConsecutiveAssignments: | ||
| Enabled: false | ||
| AcrossEmptyLines: false | ||
| AcrossComments: false | ||
| AlignCompound: false | ||
| AlignFunctionDeclarations: false | ||
| AlignFunctionPointers: false | ||
| PadOperators: true | ||
| AlignConsecutiveBitFields: | ||
| Enabled: false | ||
| AcrossEmptyLines: false | ||
| AcrossComments: false | ||
| AlignCompound: false | ||
| AlignFunctionDeclarations: false | ||
| AlignFunctionPointers: false | ||
| PadOperators: false | ||
| AlignConsecutiveDeclarations: | ||
| Enabled: false | ||
| AcrossEmptyLines: false | ||
| AcrossComments: false | ||
| AlignCompound: false | ||
| AlignFunctionDeclarations: true | ||
| AlignFunctionPointers: false | ||
| PadOperators: false | ||
| AlignConsecutiveMacros: | ||
| Enabled: false | ||
| AcrossEmptyLines: false | ||
| AcrossComments: false | ||
| AlignCompound: false | ||
| AlignFunctionDeclarations: false | ||
| AlignFunctionPointers: false | ||
| PadOperators: false | ||
| AlignConsecutiveShortCaseStatements: | ||
| Enabled: false | ||
| AcrossEmptyLines: false | ||
| AcrossComments: false | ||
| AlignCaseArrows: false | ||
| AlignCaseColons: false | ||
| AlignConsecutiveTableGenBreakingDAGArgColons: | ||
| Enabled: false | ||
| AcrossEmptyLines: false | ||
| AcrossComments: false | ||
| AlignCompound: false | ||
| AlignFunctionDeclarations: false | ||
| AlignFunctionPointers: false | ||
| PadOperators: false | ||
| AlignConsecutiveTableGenCondOperatorColons: | ||
| Enabled: false | ||
| AcrossEmptyLines: false | ||
| AcrossComments: false | ||
| AlignCompound: false | ||
| AlignFunctionDeclarations: false | ||
| AlignFunctionPointers: false | ||
| PadOperators: false | ||
| AlignConsecutiveTableGenDefinitionColons: | ||
| Enabled: false | ||
| AcrossEmptyLines: false | ||
| AcrossComments: false | ||
| AlignCompound: false | ||
| AlignFunctionDeclarations: false | ||
| AlignFunctionPointers: false | ||
| PadOperators: false | ||
| AlignEscapedNewlines: Right | ||
| AlignOperands: Align | ||
| AlignTrailingComments: | ||
| Kind: Always | ||
| OverEmptyLines: 0 | ||
| AllowAllArgumentsOnNextLine: true | ||
| AllowAllParametersOfDeclarationOnNextLine: true | ||
| AllowBreakBeforeNoexceptSpecifier: Never | ||
| AllowShortBlocksOnASingleLine: Never | ||
| AllowShortCaseExpressionOnASingleLine: true | ||
| AllowShortCaseLabelsOnASingleLine: false | ||
| AllowShortCompoundRequirementOnASingleLine: true | ||
| AllowShortEnumsOnASingleLine: true | ||
| AllowShortFunctionsOnASingleLine: All | ||
| AllowShortIfStatementsOnASingleLine: Never | ||
| AllowShortLambdasOnASingleLine: All | ||
| AllowShortLoopsOnASingleLine: false | ||
| AllowShortNamespacesOnASingleLine: false | ||
| AlwaysBreakAfterDefinitionReturnType: None | ||
| AlwaysBreakBeforeMultilineStrings: false | ||
| AttributeMacros: | ||
| - __capability | ||
| BinPackArguments: true | ||
| BinPackParameters: BinPack | ||
| BitFieldColonSpacing: Both | ||
| BraceWrapping: | ||
| AfterCaseLabel: false | ||
| AfterClass: false | ||
| AfterControlStatement: Never | ||
| AfterEnum: false | ||
| AfterExternBlock: false | ||
| AfterFunction: false | ||
| AfterNamespace: false | ||
| AfterObjCDeclaration: false | ||
| AfterStruct: false | ||
| AfterUnion: false | ||
| BeforeCatch: false | ||
| BeforeElse: false | ||
| BeforeLambdaBody: false | ||
| BeforeWhile: false | ||
| IndentBraces: false | ||
| SplitEmptyFunction: true | ||
| SplitEmptyRecord: true | ||
| SplitEmptyNamespace: true | ||
| BreakAdjacentStringLiterals: true | ||
| BreakAfterAttributes: Leave | ||
| BreakAfterJavaFieldAnnotations: false | ||
| BreakAfterReturnType: None | ||
| BreakArrays: true | ||
| BreakBeforeBinaryOperators: None | ||
| BreakBeforeConceptDeclarations: Always | ||
| BreakBeforeBraces: Attach | ||
| BreakBeforeInlineASMColon: OnlyMultiline | ||
| BreakBeforeTernaryOperators: true | ||
| BreakBinaryOperations: Never | ||
| BreakConstructorInitializers: BeforeColon | ||
| BreakFunctionDefinitionParameters: false | ||
| BreakInheritanceList: BeforeColon | ||
| BreakStringLiterals: true | ||
| BreakTemplateDeclarations: MultiLine | ||
| ColumnLimit: 80 | ||
| CommentPragmas: '^ IWYU pragma:' | ||
| CompactNamespaces: false | ||
| ConstructorInitializerIndentWidth: 4 | ||
| ContinuationIndentWidth: 4 | ||
| Cpp11BracedListStyle: true | ||
| DerivePointerAlignment: false | ||
| DisableFormat: false | ||
| EmptyLineAfterAccessModifier: Never | ||
| EmptyLineBeforeAccessModifier: LogicalBlock | ||
| ExperimentalAutoDetectBinPacking: false | ||
| FixNamespaceComments: true | ||
| ForEachMacros: | ||
| - foreach | ||
| - Q_FOREACH | ||
| - BOOST_FOREACH | ||
| IfMacros: | ||
| - KJ_IF_MAYBE | ||
| IncludeBlocks: Preserve | ||
| IncludeCategories: | ||
| - Regex: '^"(llvm|llvm-c|clang|clang-c)/' | ||
| Priority: 2 | ||
| SortPriority: 0 | ||
| CaseSensitive: false | ||
| - Regex: '^(<|"(gtest|gmock|isl|json)/)' | ||
| Priority: 3 | ||
| SortPriority: 0 | ||
| CaseSensitive: false | ||
| - Regex: '.*' | ||
| Priority: 1 | ||
| SortPriority: 0 | ||
| CaseSensitive: false | ||
| IncludeIsMainRegex: '(Test)?$' | ||
| IncludeIsMainSourceRegex: '' | ||
| IndentAccessModifiers: false | ||
| IndentCaseBlocks: false | ||
| IndentCaseLabels: false | ||
| IndentExportBlock: true | ||
| IndentExternBlock: AfterExternBlock | ||
| IndentGotoLabels: true | ||
| IndentPPDirectives: None | ||
| IndentRequiresClause: true | ||
| IndentWidth: 2 | ||
| IndentWrappedFunctionNames: false | ||
| InsertBraces: false | ||
| InsertNewlineAtEOF: false | ||
| InsertTrailingCommas: None | ||
| IntegerLiteralSeparator: | ||
| Binary: 0 | ||
| BinaryMinDigits: 0 | ||
| Decimal: 0 | ||
| DecimalMinDigits: 0 | ||
| Hex: 0 | ||
| HexMinDigits: 0 | ||
| JavaScriptQuotes: Leave | ||
| JavaScriptWrapImports: true | ||
| KeepEmptyLines: | ||
| AtEndOfFile: false | ||
| AtStartOfBlock: true | ||
| AtStartOfFile: true | ||
| KeepFormFeed: false | ||
| LambdaBodyIndentation: Signature | ||
| LineEnding: DeriveLF | ||
| MacroBlockBegin: '' | ||
| MacroBlockEnd: '' | ||
| MainIncludeChar: Quote | ||
| MaxEmptyLinesToKeep: 1 | ||
| NamespaceIndentation: None | ||
| ObjCBinPackProtocolList: Auto | ||
| ObjCBlockIndentWidth: 2 | ||
| ObjCBreakBeforeNestedBlockParam: true | ||
| ObjCSpaceAfterProperty: false | ||
| ObjCSpaceBeforeProtocolList: true | ||
| PackConstructorInitializers: BinPack | ||
| PenaltyBreakAssignment: 2 | ||
| PenaltyBreakBeforeFirstCallParameter: 19 | ||
| PenaltyBreakBeforeMemberAccess: 150 | ||
| PenaltyBreakComment: 300 | ||
| PenaltyBreakFirstLessLess: 120 | ||
| PenaltyBreakOpenParenthesis: 0 | ||
| PenaltyBreakScopeResolution: 500 | ||
| PenaltyBreakString: 1000 | ||
| PenaltyBreakTemplateDeclaration: 10 | ||
| PenaltyExcessCharacter: 1000000 | ||
| PenaltyIndentedWhitespace: 0 | ||
| PenaltyReturnTypeOnItsOwnLine: 60 | ||
| PointerAlignment: Right | ||
| PPIndentWidth: -1 | ||
| QualifierAlignment: Leave | ||
| ReferenceAlignment: Pointer | ||
| ReflowComments: Always | ||
| RemoveBracesLLVM: false | ||
| RemoveEmptyLinesInUnwrappedLines: false | ||
| RemoveParentheses: Leave | ||
| RemoveSemicolon: false | ||
| RequiresClausePosition: OwnLine | ||
| RequiresExpressionIndentation: OuterScope | ||
| SeparateDefinitionBlocks: Leave | ||
| ShortNamespaceLines: 1 | ||
| SkipMacroDefinitionBody: false | ||
| SortIncludes: CaseSensitive | ||
| SortJavaStaticImport: Before | ||
| SortUsingDeclarations: LexicographicNumeric | ||
| SpaceAfterCStyleCast: false | ||
| SpaceAfterLogicalNot: false | ||
| SpaceAfterTemplateKeyword: true | ||
| SpaceAroundPointerQualifiers: Default | ||
| SpaceBeforeAssignmentOperators: true | ||
| SpaceBeforeCaseColon: false | ||
| SpaceBeforeCpp11BracedList: false | ||
| SpaceBeforeCtorInitializerColon: true | ||
| SpaceBeforeInheritanceColon: true | ||
| SpaceBeforeJsonColon: false | ||
| SpaceBeforeParens: ControlStatements | ||
| SpaceBeforeParensOptions: | ||
| AfterControlStatements: true | ||
| AfterForeachMacros: true | ||
| AfterFunctionDefinitionName: false | ||
| AfterFunctionDeclarationName: false | ||
| AfterIfMacros: true | ||
| AfterOverloadedOperator: false | ||
| AfterPlacementOperator: true | ||
| AfterRequiresInClause: false | ||
| AfterRequiresInExpression: false | ||
| BeforeNonEmptyParentheses: false | ||
| SpaceBeforeRangeBasedForLoopColon: true | ||
| SpaceBeforeSquareBrackets: false | ||
| SpaceInEmptyBlock: false | ||
| SpacesBeforeTrailingComments: 1 | ||
| SpacesInAngles: Never | ||
| SpacesInContainerLiterals: true | ||
| SpacesInLineCommentPrefix: | ||
| Minimum: 1 | ||
| Maximum: -1 | ||
| SpacesInParens: Never | ||
| SpacesInParensOptions: | ||
| ExceptDoubleParentheses: false | ||
| InCStyleCasts: false | ||
| InConditionalStatements: false | ||
| InEmptyParentheses: false | ||
| Other: false | ||
| SpacesInSquareBrackets: false | ||
| Standard: Latest | ||
| StatementAttributeLikeMacros: | ||
| - Q_EMIT | ||
| StatementMacros: | ||
| - Q_UNUSED | ||
| - QT_REQUIRE_VERSION | ||
| TableGenBreakInsideDAGArg: DontBreak | ||
| TabWidth: 8 | ||
| UseTab: Never | ||
| VerilogBreakBetweenInstancePorts: true | ||
| WhitespaceSensitiveMacros: | ||
| - BOOST_PP_STRINGIZE | ||
| - CF_SWIFT_NAME | ||
| - NS_SWIFT_NAME | ||
| - PP_STRINGIZE | ||
| - STRINGIZE | ||
| WrapNamespaceBodyWithEmptyLines: Leave | ||
| ... | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| *.swp | ||
| /build | ||
| compile_commands.json | ||
| .cache/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [submodule "deps/Almond_PCB"] | ||
| path = deps/Almond_PCB | ||
| url = git@github.com:Open-Bionics/Almond_PCB.git | ||
| [submodule "deps/ArduinoCore-avr"] | ||
| path = deps/ArduinoCore-avr | ||
| url = git@github.com:arduino/ArduinoCore-avr.git | ||
| [submodule "deps/ArduinoCore-API"] | ||
| path = deps/ArduinoCore-API | ||
| url = git@github.com:arduino/ArduinoCore-API.git | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| CXX=avr-g++ | ||
| CXX_FLAGS=-Os -std=c++26 | ||
| MCU_FLAGS=\ | ||
| -mmcu=atmega2560 \ | ||
| -D F_CPU=16000000UL \ | ||
|
|
||
| ARDUINO_INCLUDE=\ | ||
| -D ARDUINO_ARCH_AVR \ | ||
| -D ARDUINO_AVR_MEGA2560 \ | ||
| -I deps/ArduinoCore-avr/cores/arduino/ \ | ||
| -I deps/ArduinoCore-avr/variants/mega/ \ | ||
|
|
||
| # Find all implementation files excluding non AVR archs (eg: samd) | ||
| EXECUTABLES= $(shell find src -type f -name *.cpp \ | ||
| -not -path */samd_*) | ||
|
Comment on lines
+13
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎. |
||
|
|
||
| .PHONY: clean | ||
|
|
||
| all: $(patsubst src/%.cpp,build/%.o,$(EXECUTABLES)) | build | ||
|
|
||
|
|
||
| build/%.o: src/%.cpp | build | ||
| mkdir -p $(dir $@) | ||
| $(CXX) $(CXX_FLAGS) $(MCU_FLAGS) $(ARDUINO_INCLUDE) -c\ | ||
| $< -o $@ | ||
|
|
||
| build: | ||
| mkdir build | ||
|
davidkennedydev marked this conversation as resolved.
|
||
|
|
||
| clean: | ||
| rm -rf build/* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Dependencies | ||
|
|
||
| This directory contains the dependencies needed to build the project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md:33-42now tells first-time contributors to rungit submodule update --init, but the remotes added here usegit@github.com:URLs. In practice that bootstrap step will fail for HTTPS clones and CI environments that do not already have GitHub SSH keys configured, so a fresh checkout cannot fetch its documented dependencies. Switching these remotes to HTTPS (or documenting the SSH requirement) avoids breaking setup for new users.Useful? React with 👍 / 👎.