Skip to content

Commit 5eec7ac

Browse files
committed
Support latest nrfx HAL v4.0.0
**Note:** This change is backwards incompatible with the previous HAL verisons. The latest nrfx HAL v4.0.0 has moved some folders around. This changes align the HW models with this new folder structure. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
1 parent 64a9e1d commit 5eec7ac

File tree

8 files changed

+15
-8
lines changed

8 files changed

+15
-8
lines changed

52833.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ INCLUDES:=-I${NATIVE_SIM_PATH}/common/src/include/ \
2626
-Isrc/nrfx_config \
2727
-Isrc/nrfx/nrfx_replacements \
2828
-I${NRFX_BASE} \
29-
-I${NRFX_BASE}/mdk
29+
-I${NRFX_BASE}/bsp/stable/ \
30+
-I${NRFX_BASE}/bsp/stable/mdk
3031

3132
NRF_HW_MODELS_LIB_SUFFIX?=
3233
LIB_NAME=libnRF_hw_models.${VARIANT}.32${NRF_HW_MODELS_LIB_SUFFIX}

5340.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ INCLUDES:=-I${NATIVE_SIM_PATH}/common/src/include/ \
4242
-Isrc/nrfx_config \
4343
-Isrc/nrfx/nrfx_replacements \
4444
-I${NRFX_BASE} \
45-
-I${NRFX_BASE}/mdk
45+
-I${NRFX_BASE}/bsp/stable/ \
46+
-I${NRFX_BASE}/bsp/stable/mdk
4647

4748
NRF_HW_MODELS_LIB_SUFFIX?=
4849
LIB_NAME=libnRF_hw_models.${VARIANT}.32${NRF_HW_MODELS_LIB_SUFFIX}

54L15.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ INCLUDES:=-I${NATIVE_SIM_PATH}/common/src/include/ \
4242
-Isrc/nrfx_config \
4343
-Isrc/nrfx/nrfx_replacements \
4444
-I${NRFX_BASE} \
45-
-I${NRFX_BASE}/mdk \
45+
-I${NRFX_BASE}/bsp/stable/ \
46+
-I${NRFX_BASE}/bsp/stable/mdk \
4647
-I${NRFX_BASE}/drivers/include
4748

4849
NRF_HW_MODELS_LIB_SUFFIX?=

54LM20.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ INCLUDES:=-I${NATIVE_SIM_PATH}/common/src/include/ \
4242
-Isrc/nrfx_config \
4343
-Isrc/nrfx/nrfx_replacements \
4444
-I${NRFX_BASE} \
45-
-I${NRFX_BASE}/mdk \
45+
-I${NRFX_BASE}/bsp/stable/ \
46+
-I${NRFX_BASE}/bsp/stable/mdk \
4647
-I${NRFX_BASE}/drivers/include
4748

4849
NRF_HW_MODELS_LIB_SUFFIX?=

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ if(CONFIG_SOC_SERIES_BSIM_NRFXX)
9797
-I${CMAKE_CURRENT_SOURCE_DIR}/src/nrfx/mdk_replacements
9898
-I${CMAKE_CURRENT_SOURCE_DIR}/src/nrfx/nrfx_replacements
9999
-I${NRFX_DIR}
100-
-I${NRFX_DIR}/mdk
100+
-I${NRFX_DIR}/bsp/stable/
101+
-I${NRFX_DIR}/bsp/stable/mdk/
101102
${VARIANT_FLAGS}
102103
-std=gnu11 #The nrfx hal uses non standard features which will cause warnings otherwise
103104
)

src/HW_models/NHW_peri_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#if NHW_USE_MDK_TYPES
1717
#define __I /* They cannot be const from the HW models POV */
1818
#define __IM
19-
#include "nrf.h"
19+
#include "mdk/nrf.h"
2020
#else
2121

2222
#if defined(NRF5340)

src/nrfx/mdk_replacements/nrf.h renamed to src/nrfx/mdk_replacements/mdk/nrf.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
#ifndef NRF_BSIM_H__
1313
#define NRF_BSIM_H__
1414

15-
/* Include the real nrf.h */
16-
#include <mdk/nrf.h>
15+
#ifdef __GNUC__
16+
__extension__
17+
#endif
18+
#include_next <mdk/nrf.h>
1719

1820
#if !defined(NRF_H_NO_BSIM_REDEFS)
1921
/* In the HW models, peripherals registers are not mapped in the same addresses as in

0 commit comments

Comments
 (0)