Skip to content

Commit 034d3d3

Browse files
bjarki-andreasenfabiobaltieri
authored andcommitted
nordic: nrf54h: bicr: allow for custom bicr.json in application
Allow placing a custom bicr.json file in the application source folder which will be used instead of the default one in the boards folder. Also allows setting a custom name to use for the file so multiple files can be placed in either boards or app dirs and selected with Kconfig (prj.conf or <board>.conf) The following will take precedence over the bicr.json file in the board folder: - <app>/bicr.json - <app>/bicr_foo.json + CONFIG_SOC_NRF54H20_BICR_NAME="bicr_foo.json" Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 5421bfc commit 034d3d3

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

soc/nordic/nrf54h/bicr/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
if(CONFIG_SOC_NRF54H20_GENERATE_BICR)
2-
set(bicr_json_file ${BOARD_DIR}/bicr.json)
2+
set(bicr_json_file ${BOARD_DIR}/${CONFIG_SOC_NRF54H20_BICR_NAME})
33
set(bicr_hex_file ${PROJECT_BINARY_DIR}/bicr.hex)
44
set(svd_file ${ZEPHYR_HAL_NORDIC_MODULE_DIR}/nrfx/mdk/nrf54h20_application.svd)
55

6+
set(app_bicr_json_file ${APPLICATION_SOURCE_DIR}/${CONFIG_SOC_NRF54H20_BICR_NAME})
7+
if(EXISTS ${app_bicr_json_file})
8+
set(bicr_json_file ${app_bicr_json_file})
9+
endif()
10+
11+
message(STATUS "Found BICR: ${bicr_json_file}")
612
if(EXISTS ${bicr_json_file})
713
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${bicr_json_file})
814

soc/nordic/nrf54h/bicr/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ config SOC_NRF54H20_GENERATE_BICR
88
help
99
This option generates a BICR file for the board being used. Board
1010
directory must contain a "bicr.json" file for this option to work.
11+
12+
config SOC_NRF54H20_BICR_NAME
13+
string "Name of nRF54H20 BICR file to use"
14+
depends on SOC_NRF54H20_GENERATE_BICR
15+
default "bicr.json"
16+
help
17+
The file will be searched for in application folder first, then
18+
board folder if not found. The application can select a bicr by
19+
setting CONFIG_SOC_NRF54H20_BICR_NAME="some_bicr.json"

0 commit comments

Comments
 (0)