Skip to content

Commit

Permalink
cmake: fixed issue with invalid usage of APPLICATION_SOURCE_DIR
Browse files Browse the repository at this point in the history
Fixes: zephyrproject-rtos#24158

The shell/fs sample was using APPLICATION_SOURCE_DIR before it has been
defined.

This has now been fixed to use the proper way of overlaying board
specific settings using boards folder.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
  • Loading branch information
tejlmand authored and hakehuang committed Jun 20, 2020
1 parent d2df7a2 commit a6a4423
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
14 changes: 0 additions & 14 deletions samples/subsys/shell/fs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,8 @@

cmake_minimum_required(VERSION 3.13.1)

if((BOARD STREQUAL nrf52840dk_nrf52840) OR
(BOARD STREQUAL nrf52dk_nrf52832) OR
(BOARD STREQUAL nrf9160dk_nrf9160) OR
(BOARD STREQUAL reel_board)
)
if(EXISTS ${APPLICATION_SOURCE_DIR}/boards/${BOARD}.conf)
set(CONF_FILE "prj.conf mpu.conf boards/${BOARD}.conf")
else()
set(CONF_FILE "prj.conf mpu.conf")
endif()
endif()

find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
project(fs_shell)



FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
1 change: 1 addition & 0 deletions samples/subsys/shell/fs/boards/nrf52840dk_nrf52840.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_MPU_ALLOW_FLASH_WRITE=y
1 change: 1 addition & 0 deletions samples/subsys/shell/fs/boards/nrf52dk_nrf52832.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_MPU_ALLOW_FLASH_WRITE=y
1 change: 1 addition & 0 deletions samples/subsys/shell/fs/boards/nrf9160dk_nrf9160.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_MPU_ALLOW_FLASH_WRITE=y
1 change: 1 addition & 0 deletions samples/subsys/shell/fs/boards/reel_board.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_MPU_ALLOW_FLASH_WRITE=y

0 comments on commit a6a4423

Please sign in to comment.