mongoose/examples/ti/ek-tm4c1294xl-baremetal/Makefile

25 lines
1.0 KiB
Makefile
Raw Normal View History

2022-11-11 05:44:53 +08:00
TARGET = firmware
ROOT ?= $(realpath $(CURDIR)/../../..)
CFLAGS ?= -W -Wall -Wextra -Werror -Wundef -Wshadow -Wdouble-promotion \
-Wformat-truncation -fno-common -Wconversion \
-g3 -Os -ffunction-sections -fdata-sections -I. -I$(ROOT) \
-DMG_ARCH=MG_ARCH_NEWLIB -DMIP_DEBUG=1 -DMG_ENABLE_PACKED_FS=1 \
-DMG_ENABLE_CUSTOM_MILLIS=1 -DxMG_ENABLE_LINES=1 -DMG_ENABLE_TCPIP=1 -DMG_ENABLE_DRIVER_TM4C=1\
2022-11-11 05:44:53 +08:00
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 $(EXTRA_CFLAGS)
LDFLAGS ?= -Tlink.ld -nostartfiles -nostdlib --specs nano.specs -lc -lgcc -Wl,--gc-sections -Wl,-Map=$@.map
SOURCES = boot.c main.c syscalls.c \
$(ROOT)/mongoose.c \
$(ROOT)/examples/device-dashboard/packed_fs.c \
$(ROOT)/examples/device-dashboard/net.c
all build example: $(TARGET).bin
$(TARGET).bin: $(TARGET).elf
2023-01-21 02:06:03 +08:00
arm-none-eabi-objcopy -O binary $< $@
2022-11-11 05:44:53 +08:00
$(TARGET).elf: $(SOURCES) mcu.h
2023-01-21 02:06:03 +08:00
arm-none-eabi-gcc $(SOURCES) $(CFLAGS) $(LDFLAGS) -o $@
2022-11-11 05:44:53 +08:00
clean:
@rm -rf $(TARGET).* *.su