Restructure files
This commit is contained in:
parent
8c7b62dc2d
commit
b5f86d5972
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 $@ $<
|
||||
|
||||
|
||||
|
|
@ -41,4 +41,3 @@ static inline void BIT_BOOL_SET(volatile uint8_t *target, uint8_t bit, bool enab
|
|||
};
|
||||
|
||||
#endif /* BITIO_H_ */
|
||||
|
||||
|
|
@ -114,4 +114,3 @@ void eepromWriteByte(address_t address, uint8_t data) {
|
|||
// Write pulse width high (50ns)
|
||||
_NOP();
|
||||
}
|
||||
|
||||
|
|
@ -21,4 +21,3 @@ int main(void) {
|
|||
protocolMainLoop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -139,4 +139,3 @@ void protocolMainLoop() {
|
|||
parseNextCommand();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -91,4 +91,3 @@ uint8_t uartGetLine(char* buffer, uint8_t maxLength) {
|
|||
// Return number of read bytes (excluding the \0)
|
||||
return readChars;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue