-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.project
More file actions
executable file
·52 lines (38 loc) · 4.29 KB
/
Makefile.project
File metadata and controls
executable file
·52 lines (38 loc) · 4.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
export PATH:=/opt/Freescale/KDS_3.0.0/toolchain/bin:${PATH}
SRC=$(wildcard ./Generated_Source/PSoC4/*.[cs])
# OBJ=$(SRC:"Generated_Source\\/PSoC4"="CortexM0/ARM_GCC_484/Debug)
OBJ=$(patsubst %.s,%.o,$(patsubst %.c,%.o,$(addprefix CortexM0/ARM_GCC_484/Debug/,$(notdir main.c ${SRC}))))
AR_OBJS=./CortexM0/ARM_GCC_484/Debug/cyfitter_cfg.o ./CortexM0/ARM_GCC_484/Debug/Bootloadable_1.o ./CortexM0/ARM_GCC_484/Debug/SW1.o ./CortexM0/ARM_GCC_484/Debug/LED.o ./CortexM0/ARM_GCC_484/Debug/CyBootAsmGnu.o ./CortexM0/ARM_GCC_484/Debug/CyFlash.o ./CortexM0/ARM_GCC_484/Debug/CyLib.o ./CortexM0/ARM_GCC_484/Debug/cyPm.o ./CortexM0/ARM_GCC_484/Debug/cyutils.o
MAIN_OBJS=./CortexM0/ARM_GCC_484/Debug/main.o ./CortexM0/ARM_GCC_484/Debug/cybootloader.o ./CortexM0/ARM_GCC_484/Debug/cymetadata.o ./CortexM0/ARM_GCC_484/Debug/Cm0Start.o
all: elf
elf: ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf
./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf: ${OBJ}
arm-none-eabi-gcc -Wl,--start-group -o ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf $+ -mcpu=cortex-m0 -mthumb -g -ffunction-sections -O0 -Wl,-Map,./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.map -T Generated_Source/PSoC4/cm0gcc.ld -specs=nano.specs -Wl,--gc-sections -Wl,--end-group
elf1: ${MAIN_OBJS} ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.a
arm-none-eabi-gcc -Wl,--start-group -o ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf $+ -mcpu=cortex-m0 -mthumb -g -ffunction-sections -O0 -Wl,-Map,./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.map -T Generated_Source/PSoC4/cm0gcc.ld -specs=nano.specs -Wl,--gc-sections -Wl,--end-group
hex: ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf
arm-none-eabi-objcopy --gap-fill 0x00 -O ihex ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.hex
# ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.a: ${AR_OBJS}
# arm-none-eabi-ar -rs ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.a $+
CortexM0/ARM_GCC_484/Debug/main.o: main.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -Wno-main -I. -IGenerated_Source/PSoC4 -Wa,-alh=./CortexM0/ARM_GCC_484/Debug/cyfitter_cfg.lst -g -D DEBUG -Wall -ffunction-sections -O0 -c $< -o $@
./CortexM0/ARM_GCC_484/Debug/%.o: ./Generated_Source/PSoC4/%.c
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -Wno-main -I. -IGenerated_Source/PSoC4 -Wa,-alh=./CortexM0/ARM_GCC_484/Debug/cyfitter_cfg.lst -g -D DEBUG -Wall -ffunction-sections -O0 -c $< -o $@
./CortexM0/ARM_GCC_484/Debug/%.o: ./Generated_Source/PSoC4/%.s
arm-none-eabi-as -mcpu=cortex-m0 -mthumb -I. -IGenerated_Source/PSoC4 -alh=./CortexM0/ARM_GCC_484/Debug/CyBootAsmGnu.lst -g -o ./CortexM0/ARM_GCC_484/Debug/CyBootAsmGnu.o ./Generated_Source/PSoC4/CyBootAsmGnu.s
#arm-none-eabi-as -mcpu=cortex-m0 -mthumb -I. -IGenerated_Source/PSoC4 -alh=./CortexM0/ARM_GCC_484/Debug/CyBootAsmGnu.lst -g -o $@ $<
# cyelftool.exe -B C:/Users/susy/Desktop/gv/CY8CKIT-049-41XX_GPIO_Example/CY8CKIT-049-41XX_GPIO_Example.cydsn/CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf --flash_row_size 128 --flash_size 32768 --flash_array_size 32768
# cyelftool.exe -S C:/Users/susy/Desktop/gv/CY8CKIT-049-41XX_GPIO_Example/CY8CKIT-049-41XX_GPIO_Example.cydsn/CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf
# hex:
# arm-none-eabi-objcopy --gap-fill 0x00 -O ihex ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.elf ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.hex
BOOTLOADER=../Bootloader_Dependencies/UART_Bootloader.elf
TSIZE=$(shell arm-none-eabi-size $(BOOTLOADER) | grep $(notdir $(BOOTLOADER)) | awk '{ print $$1 }')
cyacd:
perl ~/CY8CKIT-049-41XX/hex2cyacd/ihex2cyacd.pl $(TSIZE) 128 ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.hex ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.cyacd
flash:
todos < ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.cyacd > ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.1.cyacd
~/CY8CKIT-049-41XX/cybootload_linux/cybootload_linux ./CortexM0/ARM_GCC_484/Debug/CY8CKIT-049-41XX_GPIO_Example.1.cyacd
flash.org:
~/CY8CKIT-049-41XX/cybootload_linux/cybootload_linux ./CortexM0/ARM_GCC_484/Debug.org/CY8CKIT-049-41XX_GPIO_Example.cyacd
clean:
-rm -f ./CortexM0/ARM_GCC_484/Debug/*