Skip to content

Commit

Permalink
Major overhaul including serial debug and working charge counter
Browse files Browse the repository at this point in the history
Serial debug now available using the spare SERCOM0 pins on the debug header.
Charge counter now working and storing pack state in EEPROM emulation layer.
  • Loading branch information
davidmpye committed Aug 29, 2023
1 parent b9cbfea commit a09edd3
Show file tree
Hide file tree
Showing 14 changed files with 566 additions and 259 deletions.
12 changes: 12 additions & 0 deletions V10_BMS/Debug/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ SUBDIRS := \

# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../src/serial_debug.c \
../src/ASF/sam0/drivers/extint/extint_callback.c \
../src/ASF/sam0/drivers/extint/extint_sam_d_r_h/extint.c \
../src/ASF/sam0/drivers/nvm/nvm.c \
Expand Down Expand Up @@ -144,6 +145,7 @@ ASM_SRCS +=


OBJS += \
src/serial_debug.o \
src/ASF/sam0/drivers/extint/extint_callback.o \
src/ASF/sam0/drivers/extint/extint_sam_d_r_h/extint.o \
src/ASF/sam0/drivers/nvm/nvm.o \
Expand Down Expand Up @@ -172,6 +174,7 @@ src/ASF/sam0/utils/syscalls/gcc/syscalls.o \
src/main.o

OBJS_AS_ARGS += \
src/serial_debug.o \
src/ASF/sam0/drivers/extint/extint_callback.o \
src/ASF/sam0/drivers/extint/extint_sam_d_r_h/extint.o \
src/ASF/sam0/drivers/nvm/nvm.o \
Expand Down Expand Up @@ -200,6 +203,7 @@ src/ASF/sam0/utils/syscalls/gcc/syscalls.o \
src/main.o

C_DEPS += \
src/serial_debug.d \
src/ASF/sam0/drivers/extint/extint_callback.d \
src/ASF/sam0/drivers/extint/extint_sam_d_r_h/extint.d \
src/ASF/sam0/drivers/nvm/nvm.d \
Expand Down Expand Up @@ -228,6 +232,7 @@ src/ASF/sam0/utils/syscalls/gcc/syscalls.d \
src/main.d

C_DEPS_AS_ARGS += \
src/serial_debug.d \
src/ASF/sam0/drivers/extint/extint_callback.d \
src/ASF/sam0/drivers/extint/extint_sam_d_r_h/extint.d \
src/ASF/sam0/drivers/nvm/nvm.d \
Expand Down Expand Up @@ -270,6 +275,13 @@ LINKER_SCRIPT_DEP+= \


# AVR32/GNU C Compiler
src/serial_debug.o: ../src/serial_debug.c
@echo Building file: $<
@echo Invoking: ARM/GNU C Compiler : 6.3.1
$(QUOTE)F:\AtmelStudio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe$(QUOTE) -x c -mthumb -D__SAMD20E15__ -DDEBUG -DBOARD=USER_BOARD -DARM_MATH_CM0PLUS=true -DI2C_MASTER_CALLBACK_MODE=false -DSYSTICK_MODE -DADC_CALLBACK_MODE=false -DUSART_CALLBACK_MODE=false -DEXTINT_CALLBACK_MODE=true -I"../src/ASF/common/boards" -I"../src/ASF/sam0/utils" -I"../src/ASF/sam0/utils/header_files" -I"../src/ASF/sam0/utils/preprocessor" -I"../src/ASF/thirdparty/CMSIS/Include" -I"../src/ASF/thirdparty/CMSIS/Lib/GCC" -I"../src/ASF/common/utils" -I"../src/ASF/sam0/utils/cmsis/samd20/include" -I"../src/ASF/sam0/utils/cmsis/samd20/source" -I"../src/ASF/sam0/drivers/system" -I"../src/ASF/sam0/drivers/system/clock/clock_samd20" -I"../src/ASF/sam0/drivers/system/clock" -I"../src/ASF/sam0/drivers/system/interrupt" -I"../src/ASF/sam0/drivers/system/interrupt/system_interrupt_samd20" -I"../src/ASF/sam0/drivers/system/pinmux" -I"../src/ASF/sam0/drivers/system/power" -I"../src/ASF/sam0/drivers/system/power/power_sam_d_r_h" -I"../src/ASF/sam0/drivers/system/reset" -I"../src/ASF/sam0/drivers/system/reset/reset_sam_d_r_h" -I"../src/ASF/common2/boards/user_board" -I"../src" -I"../src/config" -I"../src/ASF/sam0/drivers/port" -I"../src/ASF/common/services/ioport" -I"../src/ASF/sam0/drivers/sercom" -I"../src/ASF/sam0/drivers/sercom/i2c" -I"../src/ASF/sam0/drivers/sercom/i2c/i2c_samd20" -I"../src/ASF/common2/services/delay" -I"../src/ASF/common2/services/delay/sam0" -I"../src/ASF/sam0/drivers/adc" -I"../src/ASF/sam0/drivers/adc/adc_sam_d_r_h" -I"../src/ASF/sam0/drivers/sercom/usart" -I"../src/ASF/sam0/drivers/extint" -I"../src/ASF/sam0/drivers/extint/extint_sam_d_r_h" -I"../src/ASF/sam0/drivers/nvm" -I"../src/ASF/sam0/services/eeprom/emulator/main_array" -O1 -fdata-sections -ffunction-sections -mlong-calls -g3 -Wall -mcpu=cortex-m0plus -c -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror-implicit-function-declaration -Wpointer-arith -std=gnu99 -ffunction-sections -fdata-sections -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int -Wmain -Wparentheses -Wsequence-point -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas -Wfloat-equal -Wundef -Wshadow -Wbad-function-cast -Wwrite-strings -Wsign-compare -Waggregate-return -Wmissing-declarations -Wformat -Wmissing-format-attribute -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs -Wlong-long -Wunreachable-code -Wcast-align --param max-inline-insns-single=500 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "$@" "$<"
@echo Finished building: $<


src/ASF/sam0/drivers/extint/extint_callback.o: ../src/ASF/sam0/drivers/extint/extint_callback.c
@echo Building file: $<
@echo Invoking: ARM/GNU C Compiler : 6.3.1
Expand Down
2 changes: 2 additions & 0 deletions V10_BMS/Debug/makedep.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Automatically-generated file. Do not edit or delete the file
################################################################################

src\serial_debug.c

src\ASF\sam0\drivers\extint\extint_callback.c

src\ASF\sam0\drivers\extint\extint_sam_d_r_h\extint.c
Expand Down
Loading

0 comments on commit a09edd3

Please sign in to comment.