Browse Source

Add Makefile and do general cleanup

master
Stephan Brunner 6 years ago
parent
commit
651b61a854
No known key found for this signature in database
GPG Key ID: D3CD7237AFB7EF6B
  1. 4
      .gitignore
  2. 26
      Makefile
  3. 1
      os.c
  4. 0
      os.h
  5. 0
      os_asm.S

4
.gitignore vendored

@ -0,0 +1,4 @@
*.o
*.elf
*.hex
*.bin

26
Makefile

@ -0,0 +1,26 @@
CC = avr-gcc
CFLAGS = -Wall -Os -mmcu=atmega328p
OBJCOPY = avr-objcopy
OBJ = main.o os.o os_asm.o
all: image.hex image.bin
%.o: %.c
$(CC) $(CFLAGS) -c $<
os_asm.o: os_asm.S
$(CC) $(CFLAGS) -c $<
image.elf: $(OBJ)
$(CC) $(CFLAGS) -o image.elf $(OBJ)
image.hex: image.elf
$(OBJCOPY) image.elf -O ihex image.hex
image.bin: image.elf
$(OBJCOPY) image.elf -O binary image.bin
clean:
rm -f *.o *.elf *.hex

1
os.c

@ -120,7 +120,6 @@ void* os_current_task_get_data(void) {
} }
void os_current_task_kill(void) { void os_current_task_kill(void) {
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
tasks[task_current_idx].valid = 0; tasks[task_current_idx].valid = 0;
} }

0
os_asm.s → os_asm.S

Loading…
Cancel
Save