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
|
*.o
|
||||||
*.obj
|
*.obj
|
||||||
*.elf
|
*.elf
|
||||||
|
|
@ -6,5 +14,10 @@
|
||||||
*.gch
|
*.gch
|
||||||
*.pch
|
*.pch
|
||||||
|
|
||||||
# vim swap files
|
# Python
|
||||||
.*.swp
|
__pycache__
|
||||||
|
*.py[cod]
|
||||||
|
/venv
|
||||||
|
|
||||||
|
# Firmware
|
||||||
|
/firmware/build
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ AVRDUDE_PARTNO = m16
|
||||||
AVRDUDE_PROGRAMMER = usbtiny
|
AVRDUDE_PROGRAMMER = usbtiny
|
||||||
|
|
||||||
# Make target and object files
|
# Make target and object files
|
||||||
TARGET = eepprog
|
TARGET = build/eepprog
|
||||||
OBJECTS = main.o uart.o eeprom.o protocol.o
|
OBJECTS = build/main.o build/uart.o build/eeprom.o build/protocol.o
|
||||||
HEADERS = config.h BitIO.h uart.h eeprom.h protocol.h
|
HEADERS = src/config.h src/BitIO.h src/uart.h src/eeprom.h src/protocol.h
|
||||||
|
|
||||||
# Default target (build hex file)
|
# Default target (build hex file)
|
||||||
all: hex
|
all: hex
|
||||||
|
|
@ -41,7 +41,8 @@ $(TARGET).elf: $(OBJECTS)
|
||||||
$(CC) -mmcu=$(GCC_MCU) $(LDFLAGS) -o $(TARGET).elf $(OBJECTS)
|
$(CC) -mmcu=$(GCC_MCU) $(LDFLAGS) -o $(TARGET).elf $(OBJECTS)
|
||||||
|
|
||||||
# Object files
|
# Object files
|
||||||
%.o: %.c $(HEADERS)
|
build/%.o: src/%.c $(HEADERS)
|
||||||
|
@mkdir -p build/
|
||||||
$(CC) -mmcu=$(GCC_MCU) $(CFLAGS) -c -o $@ $<
|
$(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_ */
|
#endif /* BITIO_H_ */
|
||||||
|
|
||||||
|
|
@ -114,4 +114,3 @@ void eepromWriteByte(address_t address, uint8_t data) {
|
||||||
// Write pulse width high (50ns)
|
// Write pulse width high (50ns)
|
||||||
_NOP();
|
_NOP();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -21,4 +21,3 @@ int main(void) {
|
||||||
protocolMainLoop();
|
protocolMainLoop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,4 +139,3 @@ void protocolMainLoop() {
|
||||||
parseNextCommand();
|
parseNextCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -91,4 +91,3 @@ uint8_t uartGetLine(char* buffer, uint8_t maxLength) {
|
||||||
// Return number of read bytes (excluding the \0)
|
// Return number of read bytes (excluding the \0)
|
||||||
return readChars;
|
return readChars;
|
||||||
}
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue