The CLI now supports flashing the FX3 and loading the FPGA from the command line and through the interactive console. To flash the firmware from the command line: ./bin/bladerf -b -f ./path/to/img -d /dev/bladerf1 To load the firmware from the command line: ./bin/bladerf -b -l ./path/to/rbf -d /dev/bladerf1 To flash/load interactively either run with -d /dev/bladerf1, or use the open command to attach to a device: bladeRF> open /dev/bladerf1 To flash the firmware interactively: bladeRF> load fx3 ./path/to/img To load the FPGA interactively: bladeRF> load fpga ./path/to/rbf Note that a power-on-reset is currently required in between flashing firmware and loading the FPGA. Various commands have been stubbed out for the time being. A TODO list has been created to keep track of desired functionality. The simple_load and upgrade_firmware programs have been removed, as they are no longer needed.
28 lines
451 B
Makefile
28 lines
451 B
Makefile
SRC := $(wildcard *.c) $(wildcard cmd/*.c)
|
|
OBJ = $(SRC:.c=.o)
|
|
|
|
BIN_DIR ?= .
|
|
CFLAGS_ := $(CFLAGS) -Icmd -Iinteractive -I.
|
|
LDFLAGS_ := $(LDFLAGS)
|
|
|
|
ifneq ($(INTERACTIVE),n)
|
|
CFLAGS_ += -DINTERACTIVE
|
|
LDFLAGS_ += -ltecla
|
|
SRC += $(wildcard interactive/*.c)
|
|
endif
|
|
|
|
TARGET = $(BIN_DIR)/bladeRF
|
|
|
|
all: $(TARGET)
|
|
|
|
%.o : %.c
|
|
$(CC) $< $(CFLAGS_) -c -o $@
|
|
|
|
$(TARGET): $(OBJ)
|
|
$(CC) $^ $(LDFLAGS_) -o $(TARGET)
|
|
|
|
clean:
|
|
rm -f bladeRF
|
|
rm -f $(OBJ)
|
|
|
|
.PHONY: clean
|