Skip to content

Commit 82b8028

Browse files
authored
Initialize test_socket_and_server_socket
0 parents  commit 82b8028

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+106216
-0
lines changed

.cproject

Lines changed: 406 additions & 0 deletions
Large diffs are not rendered by default.

.devcontainer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ubuntu:24.04
2+
3+
ENV PATH="$PATH:/opt/st/stm32cubeclt_1.16.0/GNU-tools-for-STM32/bin:/opt/st/stm32cubeclt_1.16.0/CMake/bin:/opt/st/stm32cubeclt_1.16.0/Ninja/bin"
4+
5+
# Install git, git-lfs, colorama and build tools
6+
RUN echo "deb http://security.ubuntu.com/ubuntu focal-security main universe" > /etc/apt/sources.list.d/ubuntu-focal-sources.list && \
7+
apt-get update && apt-get -y install git git-lfs python3-colorama cmake g++ build-essential libncurses5 libusb-1.0-0 gdb && \
8+
git lfs install
9+
10+
# Install cubeclt
11+
RUN mkdir /temp && cd /temp && git clone https://github.com/HyperloopUPV-H8/cubeclt.git && \
12+
cd cubeclt && git lfs pull && chmod +x cubeclt_1.16.0_installer.sh && \
13+
echo | LICENSE_ALREADY_ACCEPTED=1 ./cubeclt_1.16.0_installer.sh

.devcontainer/devcontainer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "Dev Container for Template Project",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"options": [
6+
"--platform=linux/amd64"
7+
]
8+
},
9+
"runArgs": [
10+
"--cap-add=SYS_PTRACE",
11+
"--security-opt=seccomp=unconfined"
12+
],
13+
"remoteUser": "root",
14+
"customizations": {
15+
"vscode": {
16+
"extensions": [
17+
"ms-vscode.cpptools-extension-pack",
18+
"ms-python.python",
19+
"mcu-debug.debug-tracker-vscode",
20+
"marus25.cortex-debug"
21+
]
22+
}
23+
}
24+
}

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build Project
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
preset:
7+
description: |
8+
'CMake preset to build the project, run `cmake --build --list-presets' to see a complete list of options'
9+
required: true
10+
type: string
11+
default: 'nucleo-debug'
12+
outputs:
13+
build-artifact:
14+
description: 'Build result artifact id for later use'
15+
value: ${{ jobs.build.outputs.build-artifact }}
16+
workflow_dispatch:
17+
inputs:
18+
preset:
19+
description: |
20+
'CMake preset to build the project, run `cmake --build --list-presets' to see a complete list of options'
21+
required: true
22+
type: string
23+
default: 'nucleo-debug'
24+
25+
jobs:
26+
build:
27+
name: Build Project
28+
runs-on: ubuntu-24.04
29+
outputs:
30+
build-artifact: ${{ steps.upload-build-artifact.outputs.artifact-id }}
31+
container:
32+
image: jmaralo/hyperloop-upv-firmware:0.3.0
33+
steps:
34+
- name: Clone Project
35+
uses: actions/checkout@v3
36+
with:
37+
submodules: recursive
38+
- name: Build
39+
run: |
40+
cmake --preset ${{ inputs.preset }} .
41+
cmake --build --preset ${{ inputs.preset }}
42+
- name: Upload Build
43+
id: upload-build-artifact
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: ${{ inputs.preset }}
47+
path: out/build/latest.elf
48+
retention-days: 7
49+
compression-level: 0
50+
if-no-files-found: error
51+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Compile Checks
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.cpp'
7+
- '**.hpp'
8+
- '**.c'
9+
- '**.h'
10+
- '**.py'
11+
12+
jobs:
13+
compile-checks:
14+
name: Check project compiles
15+
strategy:
16+
matrix:
17+
preset:
18+
- nucleo-debug
19+
- nucleo-release
20+
- nucleo-relwithdebinfo
21+
- nucleo-debug-eth
22+
- nucleo-release-eth
23+
- nucleo-relwithdebinfo-eth
24+
- board-debug
25+
- board-release
26+
- board-relwithdebinfo
27+
- board-debug-eth
28+
- board-release-eth
29+
- board-relwithdebinfo-eth
30+
- simulator
31+
fail-fast: false
32+
uses: ./.github/workflows/build.yml
33+
with:
34+
preset: ${{ matrix.preset }}

.gitignore

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# *-----------------------*
2+
# | General |
3+
# *-----------------------*
4+
5+
# Python
6+
__pycache__/
7+
8+
# Build
9+
Debug/
10+
Release/
11+
build/
12+
out/
13+
14+
# IDE
15+
*.launch
16+
.metadata
17+
.settings/
18+
compile_commands.json
19+
20+
# *-----------------------*
21+
# | CMake |
22+
# *-----------------------*
23+
24+
CMakeLists.txt.user
25+
CMakeCache.txt
26+
CMakeFiles
27+
CMakeScripts
28+
Testing
29+
Makefile
30+
cmake_install.cmake
31+
install_manifest.txt
32+
compile_commands.json
33+
CTestTestfile.cmake
34+
_deps
35+
CMakeUserPresets.json
36+
.cache
37+
38+
# *-----------------------*
39+
# | C/C++ |
40+
# *-----------------------*
41+
42+
# Prerequisites
43+
*.d
44+
45+
# Compiled Object files
46+
*.slo
47+
*.lo
48+
*.o
49+
*.obj
50+
*.ko
51+
*.elf
52+
53+
# Precompiled Headers
54+
*.gch
55+
*.pch
56+
57+
# Compiled Dynamic libraries
58+
*.so
59+
*.dylib
60+
*.dll
61+
*.so.*
62+
63+
# Compiled Static libraries
64+
*.lai
65+
*.la
66+
*.a
67+
*.lib
68+
*.lo
69+
70+
# Executables
71+
*.exe
72+
*.out
73+
*.app
74+
*.i*86
75+
*.x86_64
76+
*.hex
77+
78+
# Linker output
79+
*.ilk
80+
*.map
81+
*.exp
82+
83+
# Precompiled Headers
84+
*.gch
85+
*.pch
86+
87+
# Debug files
88+
*.dSYM/
89+
*.su
90+
*.idb
91+
*.pdb
92+
93+
# Log files
94+
*.log

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[submodule "deps/ST-LIB"]
2+
path = deps/ST-LIB
3+
url = https://github.com/HyperloopUPV-H8/ST-LIB
4+
[submodule "Core/Inc/Communications/JSON_ADE"]
5+
path= Core/Inc/Communications/JSON_ADE
6+
url = https://github.com/HyperloopUPV-H8/JSON_ADE
7+
[submodule "Tests/VirtualMCU"]
8+
path = Tests/VirtualMCU
9+
url = https://github.com/HyperloopUPV-H8/VirtualMCU

.mxproject

Lines changed: 34 additions & 0 deletions
Large diffs are not rendered by default.

.project

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>template-project</name>
4+
<comment></comment>
5+
<projects>
6+
<project>ST-LIB</project>
7+
</projects>
8+
<buildSpec>
9+
<buildCommand>
10+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
11+
<triggers>clean,full,incremental,</triggers>
12+
<arguments>
13+
</arguments>
14+
</buildCommand>
15+
<buildCommand>
16+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
17+
<triggers>full,incremental,</triggers>
18+
<arguments>
19+
</arguments>
20+
</buildCommand>
21+
</buildSpec>
22+
<natures>
23+
<nature>com.st.stm32cube.ide.mcu.MCUProjectNature</nature>
24+
<nature>com.st.stm32cube.ide.mcu.MCUCubeProjectNature</nature>
25+
<nature>org.eclipse.cdt.core.cnature</nature>
26+
<nature>org.eclipse.cdt.core.ccnature</nature>
27+
<nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature</nature>
28+
<nature>com.st.stm32cube.ide.mcu.MCUAdvancedStructureProjectNature</nature>
29+
<nature>com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature</nature>
30+
<nature>com.st.stm32cube.ide.mcu.MCURootProjectNature</nature>
31+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
32+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
33+
</natures>
34+
</projectDescription>

.vscode/c_cpp_properties.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "CMake",
5+
"cStandard": "c17",
6+
"cppStandard": "c++20",
7+
"configurationProvider": "ms-vscode.cmake-tools",
8+
"compileCommands": "compile_commands.json"
9+
}
10+
],
11+
"version": 4
12+
}

0 commit comments

Comments
 (0)