Guten Abend,
diese toolchain habe ich auf ein Windows 11 Notebook geladen und
ausgepackt:
https://blog.zakkemble.net/avr-gcc-builds/
Verzeichnisstruktur:
1 | 17/05/2023 19:03 <DIR> .
|
2 | 17/05/2023 06:10 <DIR> ..
|
3 | 17/05/2023 19:03 <DIR> avr
|
4 | 17/05/2023 19:03 <DIR> bin
|
5 | 17/05/2023 19:03 <DIR> include
|
6 | 17/05/2023 19:03 <DIR> lib
|
7 | 17/05/2023 19:03 <DIR> libexec
|
8 | 17/05/2023 06:08 253 README.txt
|
9 | 17/05/2023 19:03 <DIR> share
|
10 | 1 File(s) 253 bytes
|
11 | 8 Dir(s) 84,776,759,296 bytes free
|
Ein (fehlgeschlagener) Aufruf von make:
1 | avr-gcc -O -g -Wall -ffreestanding -mmcu=atmega128 -c -o twitest.o twitest.c
|
2 | avr-gcc: fatal error: cannot read spec file 'device-specs/specs-atmega128': No such file or directory
|
3 | compilation terminated.
|
4 | make: *** [<builtin>: twitest.o] Error 1
|
Makefile:
1 | #
|
2 | # $Id$
|
3 | #
|
4 | CC= avr-gcc
|
5 | #MCU=atmega8
|
6 | #MCU=atmega16
|
7 | #MCU=atmega32
|
8 | #MCU=atmega163
|
9 | #MCU=atmega323
|
10 | MCU=atmega128
|
11 |
|
12 | CFLAGS= -O -g -Wall -ffreestanding -mmcu=$(MCU)
|
13 | .SUFFIXES: .s .bin .out .hex .srec
|
14 | .c.s:
|
15 | $(CC) $(CFLAGS) -S $<
|
16 | .S.o:
|
17 | $(CC) $(ASFLAGS) -c $<
|
18 | .o.out:
|
19 | $(CC) $(CFLAGS) -o $@ $<
|
20 | .out.bin:
|
21 | avr-objcopy -O binary $< $@
|
22 | .out.hex:
|
23 | avr-objcopy -O ihex $< $@
|
24 | .out.srec:
|
25 | avr-objcopy -O srec $< $@
|
26 | all: twitest.bin
|
27 | OBJS=twitest.o
|
28 | twitest.out: $(OBJS)
|
29 | $(CC) -o twitest.out $(CFLAGS) $(LDFLAGS) $(OBJS) $(LDLIBS)
|
30 | clean:
|
31 | rm -f *~ *.out *.bin *.hex *.srec *.s *.o *.pdf *core
|
Wie und wo müssen die Pfade eingerichtet werden, damit make alles
findet, was zum Compilieren und Linken gehört?
Mit freundlichen Grüßen
Markus