Skip to content

Commit

Permalink
fix(build): set SPI_DEV_DIR and SPI_SPEED macros
Browse files Browse the repository at this point in the history
Also improved logging.
  • Loading branch information
marvinmarnold committed Oct 18, 2021
1 parent ad32b84 commit 9bcb2b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions compile_libloragw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ compile_libloragw_for_spi_bus() {
cd "$ROOT_DIR"
cp -r "$ROOT_DIR/libloragw/" "$OUTPUT_DIR/$spi_bus"

echo "Finished building libloragw for sx1301 on $spi_bus in $ROOT_DIR"
echo "Finished building libloragw for sx1301 on $spi_bus in $OUTPUT_DIR"
}

compile_libloragw() {
echo "Compiling libloragw for sx1301 concentrator on all the necessary SPI buses in $ROOT_DIR"
echo "Compiling libloragw for sx1301 concentrator on all the necessary SPI buses in $OUTPUT_DIR"

# Built outputs will be copied to this directory
mkdir -p "$OUTPUT_DIR"
Expand Down
3 changes: 2 additions & 1 deletion libloragw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ CROSS_COMPILE ?=
CC := $(CROSS_COMPILE)gcc
AR := $(CROSS_COMPILE)ar

CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I.
# Modified to include SPI_DEV_PATH and SPI_SPEED macros
CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. -D'SPI_DEV_PATH="${SPI_DEV_DIR}"' -D'SPI_SPEED=${SPI_SPEED}'

OBJDIR = obj
INCLUDES = $(wildcard inc/*.h)
Expand Down

0 comments on commit 9bcb2b2

Please sign in to comment.