Skip to content
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

Ramp It Up #1

Merged
merged 41 commits into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9d41ca7
Initialized Repository
ddp5730 Sep 21, 2021
de0da99
Setup build and initial README.md
ddp5730 Sep 21, 2021
f65efc8
Set up auto-generating docs
ddp5730 Sep 22, 2021
50f4bce
Updated README.md
ddp5730 Sep 22, 2021
857f327
Update version variable
ddp5730 Sep 22, 2021
076e52c
Updated hosting info in README.md and added LICENSE
ddp5730 Sep 23, 2021
81ee57e
Merge pull request #1 from RIT-EVT/feature/initial-template
ddp5730 Sep 23, 2021
5501702
Fix include order
cbolles Sep 24, 2021
19d4cd5
Add GitHub Workflow and .clang-format
mjmagee991 Jan 29, 2022
2094dc9
Applied Clang-Format
mjmagee991 Jan 29, 2022
fa7392d
Merge pull request #2 from RIT-EVT/feature/mjmagee991/workflow-and-fo…
mjmagee991 Jan 29, 2022
d693b59
Updated GitHub Build File
mjmagee991 Mar 25, 2022
a88fb2c
Merge pull request #3 from RIT-EVT/feature/mjmagee991/git-action-update
mjmagee991 Mar 26, 2022
3cd0335
Removed Extra Board Definition
mjmagee991 Apr 1, 2022
2660ba9
Updated Submodules
mjmagee991 Apr 2, 2022
ecb8ebb
Added Target Selection to Top Level CMakeLists.txt
mjmagee991 Apr 2, 2022
02e4fb6
Updated Submodules Again
mjmagee991 Apr 2, 2022
440d9b9
Merge pull request #4 from RIT-EVT/bug/mjmagee991/extra-board-definition
mjmagee991 Apr 2, 2022
2f9369c
Cleaned Up Top-Level CMakeLists.txt
mjmagee991 Dec 15, 2022
46d4e8a
Restructured Folders and Added an Example Main Target
mjmagee991 Dec 15, 2022
636195f
Updated Template Documentation
mjmagee991 Dec 15, 2022
599fbbd
Created Framework for Multiple Main Targets
mjmagee991 Dec 19, 2022
1611ff8
Added to Further Detail to README
mjmagee991 Dec 19, 2022
daf5a2e
Updated EVT-core submodule
mjmagee991 Jan 2, 2023
4260104
Merge pull request #5 from RIT-EVT/feature/mjmagee991/new-docs-22
mjmagee991 Jan 2, 2023
74febe2
Updated EVT-core and Top-Level CMake
mjmagee991 Jul 9, 2023
a55797f
Merged with Project Template
mjmagee991 Jul 9, 2023
0f54c65
Began Work on New Rampup
mjmagee991 Jul 10, 2023
dea1c0a
Phase 1 Cleanup
mjmagee991 Jul 22, 2023
88115c4
Added Phase 2
mjmagee991 Jul 22, 2023
d69c02b
Commented Out Errors to Allow Compilation
mjmagee991 Jul 23, 2023
0238cc6
Phase 2 Cleanup
mjmagee991 Jul 23, 2023
067bb90
Added Phase 3
mjmagee991 Jul 23, 2023
7e3baad
Added PVC Test to Phase 3
mjmagee991 Jul 23, 2023
4147d9b
Filled Out Most of Phase 4
mjmagee991 Jul 28, 2023
2ac4fc7
Completed README
mjmagee991 Jul 29, 2023
4c74331
Added Datasheets Markdown Files
mjmagee991 Aug 6, 2023
db33201
Start MAX22530 Section of Datasheet Writeup
mjmagee991 Aug 10, 2023
eb5284e
Finished MAX22530 Datasheet Info
mjmagee991 Aug 23, 2023
2dca9a7
Added detail to Phase 1 Main
mjmagee991 Aug 27, 2023
edc84ee
Added website links to README
mjmagee991 Aug 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: DontAlign
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: MultiLine
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 0
CompactNamespaces: false
ContinuationIndentWidth: 4
IndentCaseLabels: false
IndentPPDirectives: BeforeHash
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Left
ReflowComments: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
TabWidth: 4
UseTab: Never
60 changes: 60 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This file defines a GitHub Workflow which is used to test building EVT-Core and other EVT code.
# When a pull request is made to the main branch, this Workflow will be automatically run on the
# requested changes to ensure the repository still builds successfully and all files fit the team's
# formatting standard. This workflow is designed to work only on a linux server.
name: CMake

# Define the workflow's triggers
on:
pull_request:
branches: [ main ]

# Set necessary environment variables
env:
GCC_ARM_TOOLS_PATH: /usr/bin

jobs:
build:
# Select the server's operating system
runs-on: ubuntu-latest

steps:
# Checkout the repository, including all submodules
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
submodules: recursive

# Install the gcc-arm tools and clang-format, and ensure clang-format 12 is being used
- name: Install Compiler and Linter
run: |
sudo apt-get install gcc-arm-none-eabi
sudo apt-get install clang-format-12
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-12 10000

# Build the code for all supported chips
- name: F302 Build
run: |
cmake -DTARGET_DEV=STM32F302x8 -B ${{github.workspace}}/build
cmake --build ${{github.workspace}}/build

- name: F334 Build
run: |
cmake -DTARGET_DEV=STM32F334x8 -B ${{github.workspace}}/build
cmake --build ${{github.workspace}}/build

# Apply clang-format formatting to the branch and create a new commit if any files are changed
- name: Apply Formatting
run: |
cmake --build ${{github.workspace}}/build --target clang-format
if git diff-files --quiet; then
echo 'No formatting changes'
else
echo 'Formatting changes applied:'
git diff --raw
git config --global user.email "N/A"
git config --global user.name "GitHub Build"
git commit -a -m "Applied Formatting Changes During GitHub Build"
git push origin
fi
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Build files
build/
html/
latex/
compile_commands.json

# Virtual environments
venv/

# IDE Files
.idea/

# macOS files
.DS_Store
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "libs/EVT-core"]
path = libs/EVT-core
url = git@github.com:RIT-EVT/EVT-core.git
url = ../EVT-core.git
# Need to set the full url if not cloned into the EVT organization
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

# Build from the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py

build:
image: latest
apt_packages:
- doxygen

# Explicitly set the version of Python and its requirements
python:
version: 3.7
install:
- requirements: docs/requirements.txt
89 changes: 59 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,37 @@
###############################################################################
# Top level CMakeList for building the EVT APM source code
# Top level CMakeList for building the EVT phase1 project source code
###############################################################################
cmake_minimum_required(VERSION 3.15)

###############################################################################
# Convert CMake flags to compiler flags
###############################################################################
if(EVT_CORE_LOG_ENABLE)
add_compile_definitions(EVT_CORE_LOG_ENABLE)
endif()

# Handle selection of the target device
option(TARGET_DEV "Target device" "STM32F334x8")
if(NOT TARGET_DEV)
set(TARGET_DEV "STM32F334x8")
endif()

if(TARGET_DEV STREQUAL "STM32F302x8")
add_compile_definitions(STM32F302x8)
add_compile_definitions(STM32F3xx)
elseif(TARGET_DEV STREQUAL "STM32F334x8")
add_compile_definitions(STM32F334x8)
add_compile_definitions(STM32F3xx)
else()
message(FATAL_ERROR "The target device is not supported")
endif()

# Enable use of HAL Drivers
add_compile_definitions(USE_HAL_DRIVER)

###############################################################################
# Run EVT-core CMake files
###############################################################################
set(EVT_CORE_DIR ${CMAKE_SOURCE_DIR}/libs/EVT-core)

# Link to the EVT-core library
Expand All @@ -15,41 +44,41 @@ include(${EVT_CORE_DIR}/cmake/evt-core_install.cmake)
###############################################################################
# Project Setup
###############################################################################
project(rampup
VERSION 0.0.1
set(BOARD_LIB_NAME rampup)
if("${BOARD_LIB_NAME}" STREQUAL BOARD_NAME)
message(FATAL_ERROR
"You must set the template project name in the top-level CMakeLists.txt")
endif()

file(STRINGS version.txt BOARD_VERSION)

project(${BOARD_LIB_NAME}
VERSION ${BOARD_VERSION}
LANGUAGES CXX C
)
)

add_library(${PROJECT_NAME} STATIC)

# Add sources
target_sources(${PROJECT_NAME} PRIVATE
src/dev/TMP117.cpp
src/dev/MAX22530.cpp
src/RampupBoard.cpp
)

###############################################################################
# Handle dependencies
###############################################################################
target_link_libraries(${PROJECT_NAME}
PUBLIC EVT
)

# TODO: This should be set by the user of this library
add_compile_definitions(STM32F302x8)

add_definitions(-DUSE_HAL_LIBRARY)

add_executable(${PROJECT_NAME}
./src/main.cpp
)

# Make the main executable have an ".elf" suffix
set_target_properties(${PROJECT_NAME} PROPERTIES
OUTPUT_NAME "${PROJECT_NAME}"
SUFFIX ".elf"
)

# Generate a map file
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} \
-Wl,-Map=${PROJECT_NAME}.map")
set(HEX_FILE "${PROJECT_NAME}.hex")
set(BIN_FILE "${PROJECT_NAME}.bin")
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_OBJCOPY} -Oihex $<TARGET_FILE:${PROJECT_NAME}> ${HEX_FILE}
COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${PROJECT_NAME}> ${BIN_FILE}
COMMENT "Building ${HEX_FILE} \nBuilding ${BIN_FILE}")
###############################################################################
# Install and expose library
###############################################################################
install_and_expose(${PROJECT_NAME})

# Link the EVT-core library
target_link_libraries(${PROJECT_NAME} PUBLIC EVT)
###############################################################################
# Build Target Code
###############################################################################
add_subdirectory(targets)
13 changes: 13 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

Contains notable changes there were added, fixed, or removed in each release.

## 0.1.0

### Added

* Initial Template
* Build EVT-core as a library
* Build Board source as a library
* Template to build arbitrary number of targets
* Auto-generating documentation template
Loading
Loading