Restructure files

This commit is contained in:
Lexi / Zoe 2021-04-03 17:40:17 +02:00
parent 8c7b62dc2d
commit b5f86d5972
Signed by: binaryDiv
GPG Key ID: F8D4956E224DA232
13 changed files with 29 additions and 20 deletions

19
.gitignore vendored
View File

@ -1,4 +1,12 @@
# C code: object files etc.
# IDE / editor files
.idea/
.vscode/
.*.swp
# General
/tmp
# C code
*.o
*.obj
*.elf
@ -6,5 +14,10 @@
*.gch
*.pch
# vim swap files
.*.swp
# Python
__pycache__
*.py[cod]
/venv
# Firmware
/firmware/build

View File

@ -16,9 +16,9 @@ AVRDUDE_PARTNO = m16
AVRDUDE_PROGRAMMER = usbtiny
# Make target and object files
TARGET = eepprog
OBJECTS = main.o uart.o eeprom.o protocol.o
HEADERS = config.h BitIO.h uart.h eeprom.h protocol.h
TARGET = build/eepprog
OBJECTS = build/main.o build/uart.o build/eeprom.o build/protocol.o
HEADERS = src/config.h src/BitIO.h src/uart.h src/eeprom.h src/protocol.h
# Default target (build hex file)
all: hex
@ -41,7 +41,8 @@ $(TARGET).elf: $(OBJECTS)
$(CC) -mmcu=$(GCC_MCU) $(LDFLAGS) -o $(TARGET).elf $(OBJECTS)
# Object files
%.o: %.c $(HEADERS)
build/%.o: src/%.c $(HEADERS)
@mkdir -p build/
$(CC) -mmcu=$(GCC_MCU) $(CFLAGS) -c -o $@ $<

View File

@ -41,4 +41,3 @@ static inline void BIT_BOOL_SET(volatile uint8_t *target, uint8_t bit, bool enab
};
#endif /* BITIO_H_ */

View File

@ -114,4 +114,3 @@ void eepromWriteByte(address_t address, uint8_t data) {
// Write pulse width high (50ns)
_NOP();
}

View File

@ -21,4 +21,3 @@ int main(void) {
protocolMainLoop();
}
}

View File

@ -139,4 +139,3 @@ void protocolMainLoop() {
parseNextCommand();
}
}

View File

@ -91,4 +91,3 @@ uint8_t uartGetLine(char* buffer, uint8_t maxLength) {
// Return number of read bytes (excluding the \0)
return readChars;
}