Jag håller på att fixa en bättre makefile för att få den hitta alla mina filer rekursivt.
Problemet är att den inte vill kompilera mina .s (assembler) filer, kan någon se varför?
Jag har krigat med detta hela dagen idag och börjar bli lite lätt less...
Allt körs på CodeBench för ARM under Ubuntu 11.10.
Tack på förhand!
Jag är kanske inte så bra makefile hacker som jag trodde.

Error:
Kod: Markera allt
korken@korken-laptop:~/Programming/KFly_STM32F4$ make all
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant --no-builtin-memset --no-builtin-memcpy -I./include -I./CMSIS -I./STMkorken@korken-laptop:~/Programming/KFly_STM32F4$ make all
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant --no-builtin-memset --no-builtin-memcpy -I./include -I./CMSIS -I./STM32F4xx_StdPeriph_Driver/inc -g -o CMSIS/startup_stm32f4xx.o CMSIS/startup_stm32f4xx.s > CMSIS/startup_stm32f4xx.lst
CMSIS/startup_stm32f4xx.s: Assembler messages:
CMSIS/startup_stm32f4xx.s: Warning: end of file not at end of a line; newline inserted
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x7f
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character is `('
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:1: Error: bad instruction `�'
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x5
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character is `('
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x8
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x5
CMSIS/startup_stm32f4xx.s:1: Error: bad instruction `a&'
CMSIS/startup_stm32f4xx.s:1: Error: bad instruction `aeabi'
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x5
CMSIS/startup_stm32f4xx.s:1: Error: junk at end of line, first unrecognized character valued 0x6
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x6
CMSIS/startup_stm32f4xx.s:2: Error: unknown pseudo-op: `.symtab'
CMSIS/startup_stm32f4xx.s:2: Error: unknown pseudo-op: `.strtab'
CMSIS/startup_stm32f4xx.s:2: Error: unknown pseudo-op: `.shstrtab'
CMSIS/startup_stm32f4xx.s:2: Error: unknown pseudo-op: `.arm.attributes'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1b
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x6
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `4'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x2
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `!'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `4'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `0'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x8
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `4'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `,'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: bad instruction `p'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `4'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `0'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x11
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `['
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `<'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x2
CMSIS/startup_stm32f4xx.s:2: Error: bad instruction `�'
CMSIS/startup_stm32f4xx.s:2: Error: bad instruction `p'
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x7
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x5
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x4
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x10
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character is `('
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x1
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x2
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x3
CMSIS/startup_stm32f4xx.s:2: Error: junk at end of line, first unrecognized character valued 0x4
make: *** [CMSIS/startup_stm32f4xx.o] Error 1
Kod: Markera allt
OBJECTS = $(CSRCS:.c=.o) $(ASRCS:.s=.o)
CSRCS = $(wildcard *.c) $(wildcard */*.c)
ASRCS = $(wildcard *.s) $(wildcard */*.s)
OPTIMIZATION = 1
COMMON = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant --no-builtin-memset --no-builtin-memcpy
CFLAGS = $(COMMON) -std=gnu99 -O$(OPTIMIZATION) -I./include -I./CMSIS -I./STM32F4xx_StdPeriph_Driver/inc -g
AFLAGS = $(COMMON) -I./include -I./CMSIS -I./STM32F4xx_StdPeriph_Driver/inc -g
LDFLAGS = $(COMMON) -nostdlib -Tstm32f4x_flash.ld -Wl,--build-id=none
GCC = arm-none-eabi-gcc
SIZE = arm-none-eabi-size
all: main.elf
@$(SIZE) *.elf
main.elf: $(OBJECTS)
$(GCC) $(LDFLAGS) $(OBJECTS) -o main.elf
clean:
rm -f $(OBJECTS)
.c.o :
$(GCC) $(CFLAGS) -c $< -o $(<:.c=.o)
.s.o :
$(GCC) -c -mthumb $(AFLAGS) -o $(<:.s=.o) $< > $(<:.s=.lst)