Skip to content

Commit

Permalink
added vim LSP/linting support!!
Browse files Browse the repository at this point in the history
  • Loading branch information
markzakharyan committed Oct 14, 2024
1 parent ef62163 commit d49fe69
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 273 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
*.cache*
*.ccls*
*compile_commands*
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ This firmware is comprised of two individual PlatformIO projects, one for the M7

## Usage

Note: If you have any issues with linting/LSP with (neo)vim then try running `pio run -t compiledb` in both the /m7 and m4 directories.

[A full guide on the code structure is being developed and can currently be found here](https://share.note.sx/n340o95a#1ld68Rexy9NMUivdsulvSYpptsx1KMYcsj4a4mlvtj4). The location of these docs may change in the future, but a link to the newest docs will always be on this GitHub repository.


Expand Down
1 change: 1 addition & 0 deletions m4/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Checks: '-*, -misc-definitions-in-headers'
18 changes: 18 additions & 0 deletions m4/.clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CompileFlags:
Add:
[
# -mlong-calls,
-DSSIZE_MAX,
-DLWIP_NO_UNISTD_H=1,
-Dssize_t=long,
-D_SSIZE_T_DECLARED,
]
Remove:
[
-fno-tree-switch-conversion,
-mtext-section-literals,
-mlongcalls,
-fstrict-volatile-bitfields,
-free,
-fipa-pta,
]
227 changes: 0 additions & 227 deletions m4/.vscode/c_cpp_properties.json

This file was deleted.

44 changes: 0 additions & 44 deletions m4/.vscode/launch.json

This file was deleted.

21 changes: 21 additions & 0 deletions m4/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Uncomment lines below if you have problems with $PATH
SHELL := /bin/bash
PATH := /usr/local/bin:$(PATH)

all:
pio -f -c vim run

upload:
pio -f -c vim run --target upload

clean:
pio -f -c vim run --target clean

program:
pio -f -c vim run --target program

uploadfs:
pio -f -c vim run --target uploadfs

update:
pio -f -c vim update
4 changes: 3 additions & 1 deletion m4/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
[env:giga_r1_m4]
platform = ststm32
board = giga_r1_m4
framework = arduino
framework = arduino

extra_scripts = pre:gen_compile_commands.py
1 change: 1 addition & 0 deletions m7/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Checks: '-*, -misc-definitions-in-headers'
18 changes: 18 additions & 0 deletions m7/.clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CompileFlags:
Add:
[
# -mlong-calls,
-DSSIZE_MAX,
-DLWIP_NO_UNISTD_H=1,
-Dssize_t=long,
-D_SSIZE_T_DECLARED,
]
Remove:
[
-fno-tree-switch-conversion,
-mtext-section-literals,
-mlongcalls,
-fstrict-volatile-bitfields,
-free,
-fipa-pta,
]
21 changes: 21 additions & 0 deletions m7/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Uncomment lines below if you have problems with $PATH
SHELL := /bin/bash
PATH := /usr/local/bin:$(PATH)

all:
pio -f -c vim run

upload:
pio -f -c vim run --target upload

clean:
pio -f -c vim run --target clean

program:
pio -f -c vim run --target program

uploadfs:
pio -f -c vim run --target uploadfs

update:
pio -f -c vim update
4 changes: 3 additions & 1 deletion m7/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
[env:giga_r1_m7]
platform = ststm32
board = giga_r1_m7
framework = arduino
framework = arduino

extra_scripts = pre:gen_compile_commands.py

0 comments on commit d49fe69

Please sign in to comment.