Skip to content

Commit a2e4525

Browse files
committed
Bootstrap repository
This commit is about creating the initial project structure of this repository. Signed-off-by: George Pappas <pappasgeorge12@gmail.com>
1 parent 0e1f980 commit a2e4525

File tree

9 files changed

+148
-1
lines changed

9 files changed

+148
-1
lines changed

.clang-format

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
###
3+
# clang-format Version 12.0.0
4+
# https://releases.llvm.org/12.0.0/tools/clang/docs/ClangFormatStyleOptions.html
5+
#
6+
# Everything in this block is related to the Barr C Coding Standard 2018
7+
# Inspired by;
8+
# https://github.com/petertorelli/clang-format-barr-c/blob/master/.clang-format
9+
10+
Language: Cpp
11+
AccessModifierOffset: -4
12+
AlignAfterOpenBracket: Align
13+
AlignConsecutiveAssignments: true
14+
AlignConsecutiveDeclarations: true
15+
AlignConsecutiveMacros: true
16+
AlignEscapedNewlines: Left
17+
AlignOperands: true
18+
AlignTrailingComments: true
19+
AllowAllArgumentsOnNextLine: true
20+
AllowAllConstructorInitializersOnNextLine: true
21+
AllowAllParametersOfDeclarationOnNextLine: true
22+
AllowShortBlocksOnASingleLine: Never
23+
AllowShortCaseLabelsOnASingleLine: false
24+
AllowShortFunctionsOnASingleLine: None
25+
AllowShortIfStatementsOnASingleLine: Never
26+
AllowShortLoopsOnASingleLine: false
27+
AlwaysBreakAfterDefinitionReturnType: TopLevel
28+
AlwaysBreakAfterReturnType: TopLevelDefinitions
29+
AlwaysBreakBeforeMultilineStrings: true
30+
AlwaysBreakTemplateDeclarations: true
31+
BinPackArguments: false
32+
BinPackParameters: false
33+
BreakBeforeBinaryOperators: All
34+
BreakBeforeBraces: Allman
35+
BreakBeforeInheritanceComma: false
36+
BreakBeforeTernaryOperators: true
37+
BreakConstructorInitializersBeforeComma: false
38+
BreakInheritanceList: BeforeComma
39+
BreakStringLiterals: true
40+
ColumnLimit: 120
41+
CommentPragmas: '^ IWYU pragma:'
42+
CompactNamespaces: false
43+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
44+
ConstructorInitializerIndentWidth: 4
45+
ContinuationIndentWidth: 4
46+
Cpp11BracedListStyle: false
47+
DeriveLineEnding: true
48+
DerivePointerAlignment: false
49+
DisableFormat: false
50+
ExperimentalAutoDetectBinPacking: false
51+
FixNamespaceComments: false
52+
ForEachMacros:
53+
- foreach
54+
- Q_FOREACH
55+
- BOOST_FOREACH
56+
IncludeBlocks: Preserve
57+
IncludeCategories:
58+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
59+
Priority: 2
60+
SortPriority: 0
61+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
62+
Priority: 3
63+
SortPriority: 0
64+
- Regex: '.*'
65+
Priority: 1
66+
SortPriority: 0
67+
IncludeIsMainRegex: '(Test)?$'
68+
IncludeIsMainSourceRegex: ''
69+
IndentCaseLabels: true
70+
IndentGotoLabels: true
71+
IndentPPDirectives: None
72+
IndentWidth: 4
73+
IndentWrappedFunctionNames: false
74+
KeepEmptyLinesAtTheStartOfBlocks: true
75+
MacroBlockBegin: ''
76+
MacroBlockEnd: ''
77+
MaxEmptyLinesToKeep: 1
78+
NamespaceIndentation: None
79+
PenaltyBreakAssignment: 2
80+
PenaltyBreakBeforeFirstCallParameter: 19
81+
PenaltyBreakComment: 300
82+
PenaltyBreakFirstLessLess: 120
83+
PenaltyBreakString: 1000
84+
PenaltyBreakTemplateDeclaration: 10
85+
PenaltyExcessCharacter: 1000000
86+
PenaltyReturnTypeOnItsOwnLine: 200
87+
PointerAlignment: Right
88+
ReflowComments: true
89+
SortIncludes: false
90+
SortUsingDeclarations: false
91+
SpaceAfterCStyleCast: false
92+
SpaceAfterLogicalNot: false
93+
SpaceAfterTemplateKeyword: false
94+
SpaceAroundPointerQualifiers: Both
95+
SpaceBeforeAssignmentOperators: true
96+
SpaceBeforeCpp11BracedList: true
97+
SpaceBeforeCtorInitializerColon: true
98+
SpaceBeforeInheritanceColon: true
99+
SpaceBeforeParens: ControlStatements
100+
SpaceBeforeSquareBrackets: false
101+
SpaceBeforeRangeBasedForLoopColon: true
102+
SpaceInEmptyBlock: false
103+
SpaceInEmptyParentheses: false
104+
SpacesBeforeTrailingComments: 1
105+
SpacesInAngles: false
106+
SpacesInConditionalStatement: false
107+
SpacesInContainerLiterals: false
108+
SpacesInCStyleCastParentheses: false
109+
SpacesInParentheses: false
110+
SpacesInSquareBrackets: false
111+
Standard: Latest
112+
StatementMacros:
113+
- Q_UNUSED
114+
- QT_REQUIRE_VERSION
115+
TabWidth: 4
116+
UseCRLF: false
117+
UseTab: Never
118+
...

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/.vscode
2+
**/venv

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- repo: https://github.com/pre-commit/mirrors-clang-format
7+
rev: v16.0.0
8+
hooks:
9+
- id: clang-format
10+
args: ['--style=file']

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1-
# STM32 Bootloader
1+
# Description of repository
22
This is a repository that a custom stm32 bootloader is being developed.
3+
4+
# Repository structure
5+
The structure of the repository is as follows:
6+
7+
*build*: folder under which all build artifacts should end up to (e.g. *.hex, *.bin files)
8+
9+
*docs*: folder under which all the relevant documentation resides for the projects under this repository.
10+
11+
*projects*: folder under which all the projects exist. The source code and CMakeLists files can be found under it.
12+
13+
*scripts*: folder under which all scripts should exist.

build/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Please direct the outcome of all your builds here.
2+
This folder is not and will not be version controlled.

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This folder contains all the relevant documents for each project.

projects/app/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This folder contains the relevant source files for a simple hello world application for the stm32 platform, to be flash alongside the bootloader.

projects/bootloader/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This folder contains the source code for the stm32 bootloader.

scripts/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This folder contains all the repository scripts that make our lives easier. Each script should be contained in its own folder and have its own README.md description.

0 commit comments

Comments
 (0)