Skip to content

build: make board directory configurable #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions board/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
INCLUDES += -Iboard/
INCLUDES += -I$(BOARDS_PATH)

SRCS += board/board_init.c
SRCS += $(BOARDS_PATH)board_init.c

# Include custom board makefile, where board specific source files can be added
# Does nothing, if file does not exist
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ need_board:
A default value can be set in main config.mk file))

# Check if board really exist
@test -s board/$(target_board)/config.mk || \
@test -s $(BOARD_CONFIG) || \
{ echo "Specified target board $(target_board) doesn't exist. Available boards are: $(AVAILABLE_BOARDS)"; exit 1; }

initial_setup: $(LICENSE_ACCEPTED) $(KEY_FILE)
Expand Down
2 changes: 1 addition & 1 deletion makefile_app.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CFLAGS += -DNET_AUTHEN_KEY=$(default_network_authen_key)
endif

# Include board init part
-include board/makefile
-include $(BOARDS_PATH)makefile

# Include app specific makefile
-include $(APP_SRCS_PATH)makefile
Expand Down
2 changes: 1 addition & 1 deletion makefile_bootloader.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ BOOTLOADER_ELF := $(BL_BUILDPREFIX)bootloader.elf
-include bootloader/makefile

# Include board part (for BOARD_HW_xx defines)
-include board/makefile
-include $(BOARDS_PATH)makefile

# Include HAL drivers code (needed to build power.c (DCDC))
-include $(HAL_API_PATH)makefile
Expand Down
4 changes: 2 additions & 2 deletions makefile_common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ FIRMWARE_NAME := wpc_stack


# Board config file
BOARD_CONFIG := board/$(target_board)/config.mk
BOARD_CONFIG := $(BOARDS_PATH)$(target_board)/config.mk

# Include board specific config
-include $(BOARD_CONFIG)
Expand All @@ -126,7 +126,7 @@ CFLAGS += -D$(MCU_UPPER)

CFLAGS += -march=$(ARCH)

INCLUDES += -Imcu/$(MCU) -Imcu/$(MCU)/hal -Imcu/$(MCU)/vendor -Imcu/$(MCU)/cmsis -Iboard/$(target_board)
INCLUDES += -Imcu/$(MCU) -Imcu/$(MCU)/hal -Imcu/$(MCU)/vendor -Imcu/$(MCU)/cmsis -I$(BOARDS_PATH)/$(target_board)

# Folder where the application sources are located (and config file)
# Can be in different folders, try them one by one
Expand Down