mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 12:53:59 +02:00
26 lines
1 KiB
Makefile
26 lines
1 KiB
Makefile
CFLAGS = -Wall -Werror -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv1p30_LPC13xx -Iinc -O0 -g3 -Wall -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb
|
|
LDFLAGS = -nostdlib -Xlinker -Map=obj/edubrm.map --gc-sections -mcpu=cortex-m3 -mthumb -T obj/debug.ld
|
|
LIST = $(shell cd src/ ; ls *.c)
|
|
OBJS = $(addprefix obj/,$(LIST:.c=.o))
|
|
SRCS = $(addprefix src/,$(LIST))
|
|
|
|
obj/%.o: src/%.c
|
|
arm-none-eabi-gcc $(CFLAGS) -c $< -o $@
|
|
|
|
obj/edubrm.axf: $(OBJS)
|
|
arm-none-eabi-gcc $(LDFLAGS) -o obj/edubrm.axf $(OBJS)
|
|
|
|
obj/edubrm.bin: obj/edubrm.axf
|
|
arm-none-eabi-size obj/edubrm.axf
|
|
arm-none-eabi-objcopy -O binary obj/edubrm.axf obj/edubrm.bin
|
|
checksum -v obj/edubrm.bin
|
|
|
|
clean:
|
|
rm -f obj/*.o obj/edubrm.{axf,bin,map}
|
|
|
|
deploy:
|
|
dfu-util -d 0471:df55 -c 0 -t 2048 -R -D /opt/LPCXpresso/bin/LPCXpressoWIN.enc || :
|
|
sleep 1
|
|
crt_emu_lpc11_13_nxp -g -2 -pLPC1343 -wire=winusb -info-target
|
|
crt_emu_lpc11_13_nxp -g -2 -pLPC1343 -wire=winusb -flash-erase
|
|
crt_emu_lpc11_13_nxp -g -2 -pLPC1343 -wire=winusb -flash-load=obj/edubrm.axf
|