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

Feature/add editorconfig file #537

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EditorConfig auto-configures your text editor to
# use repository-enforced formatting settings.
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending for
# some non-code files
[{CHANGELOG.md,README.md,examples/README.md}]
charset = utf-8
end_of_line = lf
insert_final_newline = true

# Unix-style newlines with a newline ending
# and 4 space indentation on C / C++ files in
# - tests (non-recursively)
# - src (recursively)
# - examples (recursively)
[{tests/*,src/**,examples/**}.{c,cpp,c++,h,hpp,h++,ipp,i++}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
9 changes: 5 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"recommendations": [
"ms-vscode.cpptools",
"xaver.clang-format",
"xaver.clang-format",
"davidschuldenfrei.gtest-adapter",
"vadimcn.vscode-lldb"
]
}
"vadimcn.vscode-lldb",
"EditorConfig.EditorConfig"
]
}
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* bootloader: Working with the bootloader has been simplified. See [the new guide for updates on usage](https://electro-smith.github.io/libDaisy/md_doc_md__a7__getting__started__daisy__bootloader.html)
* usb: `USBHost` class has added support for user callbacks on device connection, disconnection, and when the MSC class becomes active.
* uart: Adds DMA RX and TX modes, similar to how they work on the I2C and SPI.
* uart: Update function names to be more in line with the new DMA / Blocking scheme.
* uart: Update function names to be more in line with the new DMA / Blocking scheme.
* The old methods are wrappers for the new ones to preserve backwards compatibility, but **will be removed in a future version**.
* Affected functions: `PollReceive`, `PollTx`, `StartRx`, `RxActive`, `FlushRx`, `PopRx`, `Readable`

Expand Down Expand Up @@ -59,7 +59,7 @@
* testing: debugging configuration now uses `lldb` debugging extension to support unit test debugging on macOS with Apple Silicon
* driver: oled_ssd130x.h - Add the SpiHandle:Config struct to SSD130x4WireTransport:Config to allow full access to the SPI peripheral configuration.
* hid: fixed issue in `AnalogControl` where computed coeff could be out of range with certain block sizes
* driver: added missing alternate function pin mappings for SPI2, and UART for pins available on the patch_sm hardware
* driver: added missing alternate function pin mappings for SPI2, and UART for pins available on the patch_sm hardware
* usb: fixed issue with MIDI output from USB
* driver: fixed off-by-one error in qspi erase function.

Expand Down Expand Up @@ -208,7 +208,7 @@ max11300driver.ConfigurePinAsAnalogWrite(daisy::MAX11300::PIN_1, daisy::MAX11300

### Other

* switch: Use `System::GetNow()` rather than the update rate to calculate `TimeHeldMs()`.
* switch: Use `System::GetNow()` rather than the update rate to calculate `TimeHeldMs()`.
* This has also been applied to the `Encoder` class (since it uses `Switch` internally).
* usb host: ST Middleware for USB Host support has been added to the Middlewares folder
* fatfs: changed default `FS_LOCK` to 0, allowing for more simultaneously open FIL objects.
Expand Down Expand Up @@ -402,7 +402,7 @@ sdram.Init();

### Other

* test: add unit testing for midi parser.
* test: add unit testing for midi parser.
* tests: add tests for `FIFO`
* docs: Update TODO comment in `uart.h` to reflect most recent uart update.
* ci: add filters to the workflows
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ BUILD_DIR = build

# manually adding necessary HAL files
# generated by dump_filepath.py
C_SOURCES =
C_SOURCES =
C_SOURCES += \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.c \
Expand Down Expand Up @@ -197,7 +197,7 @@ Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_swpmi.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_tim.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usart.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_usb.c \
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_utils.c
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_ll_utils.c

# Middleware sources
C_SOURCES += \
Expand Down Expand Up @@ -271,7 +271,7 @@ MCU = -mthumb $(FLOAT-ABI) $(FPU) $(CPU)

# macros for gcc
# AS defines
AS_DEFS =
AS_DEFS =

# C defines
C_DEFS = \
Expand All @@ -283,7 +283,7 @@ C_DEFS = \
-DHSE_VALUE=16000000 \
-DUSE_HAL_DRIVER \
-DUSE_FULL_LL_DRIVER \
-DDATA_IN_D2_SRAM
-DDATA_IN_D2_SRAM
# ^ added for easy startup access


Expand All @@ -302,7 +302,7 @@ C_INCLUDES = \
-IMiddlewares/ST/STM32_USB_Host_Library/Class/MSC/Inc \
-IMiddlewares/Third_Party/FatFs/src \
-I$(MODULE_DIR) \
-I.
-I.

# suppressions for warnings introduced by HAL/FatFS
WARNINGS += -Wall -Wno-attributes -Wno-strict-aliasing -Wno-maybe-uninitialized -Wno-missing-attributes -Wno-stringop-overflow #-Werror
Expand All @@ -328,7 +328,7 @@ CFLAGS += \
CPPFLAGS = $(CFLAGS) $(CPP_WARNINGS)
CPPFLAGS += \
-fno-exceptions \
-fno-rtti
-fno-rtti

C_STANDARD = -std=gnu11
CPP_STANDARD += -std=gnu++14
Expand Down Expand Up @@ -369,7 +369,7 @@ $(BUILD_DIR)/$(TARGET).a: $(SORTED_OBJECTS) Makefile
$(AR) -r $@ $(SORTED_OBJECTS)

$(BUILD_DIR):
mkdir $@
mkdir $@

#######################################
# clean up
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int main(void)
midi.StartReceive();
hw.StartAdc();
hw.StartAudio(AudioCallback);

for(;;)
{
midi.Listen();
Expand Down
8 changes: 4 additions & 4 deletions core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ SYSTEM_FILES_DIR ?= \
# source
######################################

CPP_SOURCES ?=
CPP_SOURCES ?=

C_SOURCES += \
$(SYSTEM_FILES_DIR)/startup_stm32h750xx.c
Expand All @@ -68,13 +68,13 @@ PREFIX = arm-none-eabi-
ifdef GCC_PATH
CC = $(GCC_PATH)/$(PREFIX)gcc
AS = $(GCC_PATH)/$(PREFIX)gcc -x assembler-with-cpp
CXX = $(GCC_PATH)/$(PREFIX)g++
CXX = $(GCC_PATH)/$(PREFIX)g++
GDB = $(GCC_PATH)/$(PREFIX)gdb
CP = $(GCC_PATH)/$(PREFIX)objcopy
SZ = $(GCC_PATH)/$(PREFIX)size
else
CC = $(PREFIX)gcc
CXX = $(PREFIX)g++
CXX = $(PREFIX)g++
GDB = $(PREFIX)gdb
AS = $(PREFIX)gcc -x assembler-with-cpp
CP = $(PREFIX)objcopy
Expand Down Expand Up @@ -124,7 +124,7 @@ endif
# AS includes
AS_INCLUDES =

C_INCLUDES ?=
C_INCLUDES ?=

C_INCLUDES += \
-I$(LIBDAISY_DIR) \
Expand Down
2 changes: 1 addition & 1 deletion core/STM32H750IB_flash.lds
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ SECTIONS
PROVIDE(__bss_end__ = _ebss);
} > SRAM

PROVIDE(end = .);
PROVIDE(end = .);

.dtcmram_bss (NOLOAD) :
{
Expand Down
2 changes: 1 addition & 1 deletion core/STM32H750IB_qspi.lds
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ SECTIONS
_ebss = .;

PROVIDE(__bss_end__ = _ebss);
} > SRAM
} > SRAM

.dtcmram_bss (NOLOAD) :
{
Expand Down
2 changes: 1 addition & 1 deletion core/STM32H750IB_sram.lds
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ SECTIONS
_ebss = .;

PROVIDE(__bss_end__ = _ebss);
} > DTCMRAM
} > DTCMRAM

.dtcmram_bss (NOLOAD) :
{
Expand Down
Loading