Project

General

Profile

Revision b99ee462

IDb99ee462d8d3f590e7d1fdc8dc06e99d5adb7bd5
Parent d88f80e5
Child 48418a96

Added by Thomas Mullins about 10 years ago

Changed strt_pgrm() to be a function instead of macro

The linker flags now define its location, so it's an rcall instead of icall.
Also, the BOM code is built as C now, not C++.

View differences:

scout_avr/bom/Makefile
12 12
SRC=bom.c tiny-twi.c
13 13
HDR=
14 14
FLAGS=-mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -funsigned-char -Os -fpack-struct -Wall
15
BOOT_FLAGS=$(FLAGS) -Wl,-Ttext=0xA00
15
BOOT_FLAGS=$(FLAGS) -Wl,-Ttext=0xA00,--defsym=strt_pgrm=0x1E
16 16
VECT_FLAGS=$(FLAGS) -nostartfiles
17 17

  
18 18
default: bom.hex bootloader.hex bootvectors.hex
......
24 24
	avr-objcopy -j .text -j .data -O binary $< $@
25 25

  
26 26
bom.elf: $(SRC) $(HDR)
27
	avr-g++ $(FLAGS) $(SRC) -o $@
27
	avr-gcc $(FLAGS) $(SRC) -o $@
28 28

  
29 29
%.s: %.c
30 30
	avr-gcc $(FLAGS) -S $< -o $@
......
33 33
	avrdude -p $(PART) -c $(PROG) -P usb -B 5 -U flash:w:$(TARGET)
34 34

  
35 35
blinky.elf: blinky.c
36
	avr-g++ $(FLAGS) blinky.c -o $@
36
	avr-gcc $(FLAGS) blinky.c -o $@
37 37

  
38 38
bootloader.elf: bootloader.c tiny-twi-sync.c tiny-twi-sync.h
39
	avr-g++ $(BOOT_FLAGS) bootloader.c tiny-twi-sync.c -o $@
39
	avr-gcc $(BOOT_FLAGS) bootloader.c tiny-twi-sync.c -o $@
40 40

  
41 41
bootvectors.elf: bootvectors.S
42
	avr-g++ $(VECT_FLAGS) bootvectors.S -o $@
42
	avr-gcc $(VECT_FLAGS) bootvectors.S -o $@
43 43

  
44 44
burn: bootloader.hex bootvectors.hex
45 45
	avrdude -p $(PART) -c $(PROG) -P usb -B 5 -U flash:w:bootloader.hex \

Also available in: Unified diff