still locks up

This commit is contained in:
sessionm21
2020-05-16 07:12:03 +01:00
parent a33b6c39eb
commit 47040057df
4 changed files with 181 additions and 103 deletions

View File

@@ -19,15 +19,13 @@ CFLAGS?=-Datmega328p\
-DARDUINO_ARCH_AVR\
-DARDUINO_LMIC_PROJECT_CONFIG_H=fenceless_lmic_config.h\
-Os\
-ffunction-sections\
-fdata-sections\
-MMD\
-flto\
-fno-fat-lto-objects\
-fuse-linker-plugin\
-Wall\
# -finline-functions\
# -fipa-sra\
-ffunction-sections\
@@ -42,15 +40,13 @@ CXXFLAGS?=-Datmega328p\
-DARDUINO_ARCH_AVR\
-DARDUINO_LMIC_PROJECT_CONFIG_H=fenceless_lmic_config.h\
-Os\
-ffunction-sections\
-fdata-sections\
-MMD\
-flto\
-fno-fat-lto-objects\
-fuse-linker-plugin\
-Wall\
# -finline-functions\
# -fipa-sra\
-ffunction-sections\
INC_DIRS?=-I./\
@@ -138,6 +134,7 @@ $(OUT)eep.hex: $(OUT)$(NAME).elf
$(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $(OUT)$(NAME).elf $(OUT)eep.hex
$(OUT)$(NAME).elf: protobufg bin $(OBJDIRS) $(OBJS)
$(CC) $(CXXFLAGS) -o $(OUT)$(NAME).elf collar.cpp $(INC_DIRS) $(OBJS)
avr-size --mcu=atmega328p --format=avr $(OUT)$(NAME).elf
test:
g++ -o $(OUT)test test.c $(INC_DIRS) $(SRC_FILES_COMMON)
@@ -156,6 +153,10 @@ flash: $(OUT)$(NAME)
run: flash
screen /dev/ttyUSB0
frun:
avrdude -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:$(OUT)$(NAME).hex:i
screen /dev/ttyUSB0
start: flash
systemctl start lora-gateway-bridge loraserver