Skip to content

Commit

Permalink
Refactor/restructure directories (#150)
Browse files Browse the repository at this point in the history
* refactor: rename folder embedded -> src

* chore(git): merge src/.gitignore with root .gitignore

* refactor(vscode): move src/.vscode to .vscode

* chore(vscode): update include paths

* refactor: move .svd files to new /debug folder

* chore(vscode): hide .mxproject files from file explorer

* refactor: move Makefile to repo root

* build: update Makefile paths for new directory structure

* refactor: move src/Scripts to /scripts folder

* chore(vscode): update script paths

* chore(trunk): update source paths

* build: update paths in compile commands generation script
  • Loading branch information
t-bre committed Jul 9, 2022
1 parent 3ea148c commit b51ce8d
Show file tree
Hide file tree
Showing 1,415 changed files with 582 additions and 569 deletions.
180 changes: 112 additions & 68 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,90 +1,88 @@
################################################################################
# :
# File : .gitignore
# :
# Description : Files and folders ignored from version control
# :
# Note : Generated in part using gitignore.io
# :
###############################################################################

### specific files / folders ###
/scripts/*.h
/scripts/*.c
/.vscode/**
/.trunk/out
/.trunk/logs

### C ###
################################################################################
# C
################################################################################

/build

# build artefacts
*.d
*.o
*.ko
*.lst
*.obj
*.elf
*.ilk
*.map
*.exp
*.gch
*.pch
*.lib
*.a
*.la
*.lo
*.dll
*.so
*.so.*
*.dylib
*.exe
*.elf
*.out
*.hex

compile_commands.json

# executables / binaries
*.bin
*.exe
*.app
*.i*86
*.x86_64
*.hex

# libraries
*.a
*.dll
*.dylib
*.lib

# debug
*.dSYM/
*.su
*.idb
*.pdb
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf


### STM32 ###
Drivers/*
debug/*
!debug/*.svd

################################################################################
# STM32
################################################################################

Debug/
MDK-ARM/*
EWARM/*
*.settings
*.mxproject
*.cproject
*.project
*.metadata
*.launch
Debug/
*.ftl
*.scratch

################################################################################
# Python
################################################################################

### Python ###
__pycache__/
*.py[cod]
*$py.class
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

### macOS ###

################################################################################
# vscode
################################################################################

.vscode
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/c_cpp_properties.json

################################################################################
# macOS
################################################################################

.DS_Store
.AppleDouble
.LSOverride
Expand All @@ -101,4 +99,50 @@ Icon^M
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.apdisk

################################################################################
# Windows
################################################################################

# thumbnail cache
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# folder config
[Dd]esktop.ini

# shortcuts
*.lnk

# installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# other
*.stackdump
$RECYCLE.BIN/

################################################################################
# misc files and folders
################################################################################

# unnecessary embedded middleware and driver files
src/Drivers/CMSIS/DSP/DSP_Lib_TestSuite
src/Middlewares/ST/threadx/ports/cortex_m7/iar

# script outputs
/scripts/*.h
/scripts/*.c

# trunk
/.trunk/out
/.trunk/logs

# TraceX
*.trx
12 changes: 6 additions & 6 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ lint:
ignore:
- linters: [clang-format, gitleaks]
paths:
- embedded/AZURE_RTOS/**
- embedded/Core/**
- embedded/Drivers/**
- embedded/Middlewares/**
- embedded/Scripts/**
- embedded/SUFST/Inc/config.h
- src/AZURE_RTOS/**
- src/Core/**
- src/Drivers/**
- src/Middlewares/**
- src/SUFST/Inc/config.h
- scripts/*
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"name": "arm-none-eabi-gcc",
"compileCommands": "${workspaceFolder}/compile_commands.json",
"includePath": [
"${workspaceFolder}/SUFST/Inc",
"${workspaceFolder}/Core/Inc",
"${workspaceFolder}/Drivers/STM32H7xx_HAL_Driver/Inc",
"${workspaceFolder}/Drivers/CMSIS/Device/ST/STM32H7xx/Include",
"${workspaceFolder}/Drivers/CMSIS/Core/Include",
"${workspaceFolder}/Middlewares/ST/threadx/common/inc",
"${workspaceFolder}/Middlewares/ST/threadx/ports/cortex_m7/gnu/inc"
"${workspaceFolder}/src/SUFST/Inc",
"${workspaceFolder}/src/Core/Inc",
"${workspaceFolder}/src/Drivers/STM32H7xx_HAL_Driver/Inc",
"${workspaceFolder}/src/Drivers/CMSIS/Device/ST/STM32H7xx/Include",
"${workspaceFolder}/src/Drivers/CMSIS/Core/Include",
"${workspaceFolder}/src/Middlewares/ST/threadx/common/inc",
"${workspaceFolder}/src/Middlewares/ST/threadx/ports/cortex_m7/gnu/inc"
],
"defines": [
"TX_INCLUDE_USER_DEFINE_FILE",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion embedded/.vscode/launch.json → .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type": "cortex-debug",
"showDevDebugOutput": "none",
"servertype": "stutil",
"svdFile": "STM32H7x3.svd",
"svdFile": "debug/STM32H7x3.svd",
"osx": {
"armToolchainPath": "/Applications/ARM/bin",
"serverpath": "st-util",
Expand Down
2 changes: 1 addition & 1 deletion embedded/.vscode/settings.json → .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
".vscode/*.log": true,
"null.d": true,
"compile_commands.json": true,
"**.svd": true,
"**/.mxproject": true
},
"files.associations": {
"sensor_thread.h": "c",
Expand Down
2 changes: 1 addition & 1 deletion embedded/.vscode/tasks.json → .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
{
"label": "generate compile_commands.json",
"type": "shell",
"command": "./Scripts/compile-commands.sh",
"command": "./scripts/compile-commands.sh",
"group": "build",
},
// open STM32CubeMX
Expand Down
Loading

0 comments on commit b51ce8d

Please sign in to comment.