Some checks failed
CC2530 Zigbee Firmware Build / build (push) Failing after 35s
- Updated Makefile settings with MSP430 compiler and optimization flags.
24 lines
830 B
Makefile
24 lines
830 B
Makefile
# Compiler settings
|
|
CC = msp430-elf-gcc # MSP430 compiler
|
|
CFLAGS = -Wall -Os # Enable all warnings, Optimize for size
|
|
LDFLAGS =
|
|
LIBS = -lZStack -lhal # ZStack for Zigbee communication, lhal for Hardware Abstraction Layer library
|
|
|
|
SRCS = main.c zigbee_comm.c sensors/bme280.c sensors/wind_vane.c sensors/rain_gauge.c sensors/anemometer.c
|
|
HEADERS = main.h zigbee_comm.h sensors/bme280.h sensors/wind_vane.h sensors/rain_gauge.h sensors/anemometer.h config.h
|
|
OBJS = $(SRCS:.c=.o) # create a list of object files from the source files
|
|
|
|
all: main.elf
|
|
|
|
main.elf: $(OBJS)
|
|
$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
|
|
|
|
%.o: %.c $(HEADERS)
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
clean:
|
|
rm -f main.elf $(OBJS)
|
|
|
|
# Optionally add a rule to flash your device (if applicable)
|
|
# flash: main.elf
|
|
# ./flash_tool main.elf # This is just a placeholder if needed
|