Skip to content

Commit 76310a2

Browse files
committed
nrf_modem: add binaries for nRF9230
Add nrf_modem library binaries for nRF9230 application CPU. These are for internal development. Signed-off-by: Andreas Moltumyr <[email protected]>
1 parent 22f46b6 commit 76310a2

File tree

9 files changed

+261
-3
lines changed

9 files changed

+261
-3
lines changed

nrf_modem/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ if(CONFIG_NRF_MODEM_LINK_BINARY)
2121
cmake_path(APPEND lib_path nrf9160)
2222
elseif(CONFIG_SOC_NRF9120)
2323
cmake_path(APPEND lib_path nrf9120)
24+
elseif(CONFIG_SOC_NRF9230_ENGB_CPUAPP)
25+
cmake_path(APPEND lib_path nrf9230)
2426
else()
2527
assert(0 "Unsupported SOC. Got '${CONFIG_SOC}'")
2628
endif()
@@ -54,6 +56,8 @@ if(CONFIG_NRF_MODEM_LINK_BINARY)
5456

5557
zephyr_include_directories(include)
5658

57-
target_sources(app PRIVATE shmem.c)
59+
if(CONFIG_SOC_NRF9160 OR CONFIG_SOC_NRF9120)
60+
target_sources(app PRIVATE shmem.c)
61+
endif()
5862

5963
endif()

nrf_modem/Kconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ menu "nrf_modem (Modem library)"
88
# Selected by NRF_MODEM_LIB in sdk-nrf
99
config NRF_MODEM
1010
bool
11-
select NRFX_IPC if (SOC_SERIES_NRF91X || ZTEST)
11+
select NRFX_IPC if SOC_SERIES_NRF91X
1212
select REQUIRES_FULL_LIBC
1313

1414
if NRF_MODEM
@@ -45,7 +45,8 @@ endif # NRF_MODEM
4545

4646
config NRF_MODEM_SHMEM_CTRL_SIZE
4747
hex
48-
default 0x728 if NRF_MODEM_LINK_BINARY_DECT_PHY
48+
default 0xCE0 if (SOC_SERIES_NRF92X && NRF_MODEM_LINK_BINARY_CELLULAR)
49+
default 0x728 if (SOC_SERIES_NRF91X && NRF_MODEM_LINK_BINARY_DECT_PHY)
4950
default 0x4e8
5051

5152
endmenu # nrf_modem

nrf_modem/doc/CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Core library
1818
* Added:
1919

2020
* A header file :file:`nrf_modem_toolchain.h` for compiler attributes used in other header files.
21+
* Binaries for the nRF9230 SoC for internal development.
22+
* A header file :file:`nrf_modem_os_rpc.h` for the nRF9230 SoC RPC OS glue.
2123

2224
AT interface
2325
============

nrf_modem/doc/api.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,8 @@ OS specific definitions
262262
***********************
263263

264264
.. doxygengroup:: nrf_modem_os
265+
266+
OS RPC transport definitions for the nRF9230 SoC
267+
************************************************
268+
269+
.. doxygengroup:: nrf_modem_os_rpc
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/**
8+
* @file nrf_modem_os_rpc.h
9+
*
10+
* @brief RPC transport glue.
11+
*
12+
* @defgroup nrf_modem_os_rpc Modem Library RPC transport glue
13+
* @{
14+
*/
15+
#ifndef NRF_MODEM_OS_RPC_H__
16+
#define NRF_MODEM_OS_RPC_H__
17+
18+
#include <stdbool.h>
19+
#include <stddef.h>
20+
#include <stdint.h>
21+
22+
#ifdef __cplusplus
23+
extern "C" {
24+
#endif
25+
26+
typedef void (*nrf_modem_os_rpc_signal_cb_t)(uint32_t ch, void *priv);
27+
28+
/**
29+
* @brief Parameters for configuring an nrf_modem rpc instance.
30+
*
31+
* Passed when invoking @c nrf_modem_os_rpc_open.
32+
*/
33+
struct nrf_modem_os_rpc_config {
34+
struct {
35+
/** Remote signal device. */
36+
uintptr_t sigdev;
37+
/** TX channel number. */
38+
uint32_t ch;
39+
/** TX shared memory start address. */
40+
uintptr_t addr;
41+
/** TX shared memory size. */
42+
size_t size;
43+
} tx;
44+
struct {
45+
/** Local signal device. */
46+
uintptr_t sigdev;
47+
/** RX channel number. */
48+
uint32_t ch;
49+
/** RX shared memory start address. */
50+
uintptr_t addr;
51+
/** RX shared memory size. */
52+
size_t size;
53+
} rx;
54+
struct {
55+
/** Pointer to private context passed as an argument to callbacks. */
56+
void *priv;
57+
/**
58+
* @brief Bind was successful.
59+
*
60+
* Invoked when the local and remote rpc endpoints
61+
* have bound successfully.
62+
*
63+
* @param priv Private user data.
64+
*/
65+
void (*bound)(void *priv);
66+
/**
67+
* @brief New message has arrived.
68+
*
69+
* Invoked when new data is received.
70+
*
71+
* @param data Pointer to data buffer.
72+
* @param len Length of @a data.
73+
* @param priv Private user data.
74+
*/
75+
void (*received)(const void *data, size_t len, void *priv);
76+
} cb;
77+
};
78+
79+
/**
80+
* @brief Parameters for configuring an nrf_modem signaling instance.
81+
*
82+
* Passed when invoking @c nrf_modem_os_rpc_signal_init.
83+
*/
84+
struct nrf_modem_os_rpc_signal_config {
85+
/** Signal device. */
86+
uintptr_t sigdev;
87+
/** Channel number. */
88+
uint32_t ch;
89+
/** Pointer to private context passed as an argument to callbacks. */
90+
void *priv;
91+
/** Invoked when signal with channel num @a ch is raised.
92+
* See @c nrf_modem_os_rpc_signal_cb_t.
93+
*/
94+
nrf_modem_os_rpc_signal_cb_t recv;
95+
};
96+
97+
/**
98+
* @brief RPC instance declaration used internally in nrf_modem.
99+
*
100+
* This structure must be defined in the glue.
101+
*/
102+
struct nrf_modem_os_rpc;
103+
104+
/**
105+
* @brief Signaling instance declaration used internally in nrf_modem.
106+
*
107+
* This structure must be defined in the glue.
108+
*/
109+
struct nrf_modem_os_rpc_signal;
110+
111+
/**
112+
* @brief RPC instances used by nrf_modem and defined externally.
113+
*/
114+
extern struct nrf_modem_os_rpc inst_ctrl;
115+
extern struct nrf_modem_os_rpc inst_data;
116+
117+
/**
118+
* @brief Signaling instances used by nrf_modem and defined externally.
119+
*/
120+
extern struct nrf_modem_os_rpc_signal inst_app_fault;
121+
extern struct nrf_modem_os_rpc_signal inst_modem_fault;
122+
extern struct nrf_modem_os_rpc_signal inst_modem_sysoff;
123+
124+
/**
125+
* @brief Get address of the application signal device.
126+
*
127+
* @return Address of application signal device.
128+
*/
129+
uintptr_t nrf_modem_os_rpc_sigdev_app_get(void);
130+
131+
/**
132+
* @brief Get address of the modem signal device.
133+
*
134+
* @return Address of modem signal device.
135+
*/
136+
uintptr_t nrf_modem_os_rpc_sigdev_modem_get(void);
137+
138+
/**
139+
* @brief Open an RPC instance.
140+
*
141+
* @param instance Pointer to RPC instance.
142+
* @param conf Parameters for configuring the instance before it is opened.
143+
*
144+
* @return 0 on success, a negative errno otherwise.
145+
*/
146+
int nrf_modem_os_rpc_open(struct nrf_modem_os_rpc *instance,
147+
const struct nrf_modem_os_rpc_config *conf);
148+
149+
/**
150+
* @brief Send a message with the RPC instance.
151+
*
152+
* @param instance Pointer to RPC instance.
153+
* @param msg Pointer to a buffer containing data to send.
154+
* @param len Size of data in the @p msg buffer.
155+
*
156+
* @retval 0 on success.
157+
* @retval -NRF_EBUSY when the instance is closed or handshaking.
158+
* @retval -NRF_ENOMEM when there are not enough memory in circular buffer.
159+
* @retval other errno codes from dependent modules.
160+
*/
161+
int nrf_modem_os_rpc_send(struct nrf_modem_os_rpc *instance, const void *msg, size_t len);
162+
163+
/**
164+
* @brief Close an RPC instance.
165+
*
166+
* @param instance pointer to RPC instance.
167+
*
168+
* @return 0 on success, a negative errno otherwise.
169+
*/
170+
int nrf_modem_os_rpc_close(struct nrf_modem_os_rpc *instance);
171+
172+
/**
173+
* @brief Suspend processing of incoming messages on the RPC instance.
174+
*
175+
* @param instance Pointer to RPC instance.
176+
*
177+
* @return 0 on success, a negative errno otherwise.
178+
*/
179+
int nrf_modem_os_rpc_rx_suspend(struct nrf_modem_os_rpc *instance);
180+
181+
/**
182+
* @brief Resume processing of incoming messages on the RPC instance.
183+
*
184+
* @param instance Pointer to RPC instance.
185+
*
186+
* @return 0 on success, a negative errno otherwise.
187+
*/
188+
int nrf_modem_os_rpc_rx_resume(struct nrf_modem_os_rpc *instance);
189+
190+
/**
191+
* @brief Configure and enable the signaling instance.
192+
*
193+
* @param instance Signaling instance.
194+
* @param conf Parameters for configuring the instance before it is enabled.
195+
*
196+
* @return 0 on success, a negative errno otherwise.
197+
*/
198+
int nrf_modem_os_rpc_signal_init(struct nrf_modem_os_rpc_signal *instance,
199+
struct nrf_modem_os_rpc_signal_config *conf);
200+
201+
/**
202+
* @brief Signal with the signaling instance.
203+
*
204+
* @param instance Signaling instance.
205+
*
206+
* @return 0 on success, a negative errno otherwise.
207+
*/
208+
int nrf_modem_os_rpc_signal_send(struct nrf_modem_os_rpc_signal *instance);
209+
210+
/**
211+
* @brief Disable the signaling instance.
212+
*
213+
* @param instance Signaling instance.
214+
*
215+
* @return 0 on success, a negative errno otherwise.
216+
*/
217+
int nrf_modem_os_rpc_signal_deinit(struct nrf_modem_os_rpc_signal *instance);
218+
219+
/**
220+
* @brief Flush address range in cache.
221+
*
222+
* @param addr Starting address to flush.
223+
* @param size Range size.
224+
*
225+
* @return 0 on success, a negative errno otherwise.
226+
*/
227+
int nrf_modem_os_rpc_cache_data_flush(void *addr, size_t size);
228+
229+
/**
230+
* @brief Invalidate address range in cache.
231+
*
232+
* @param addr Starting address to invalidate.
233+
* @param size Range size.
234+
*
235+
* @return 0 on success, a negative errno otherwise.
236+
*/
237+
int nrf_modem_os_rpc_cache_data_invalidate(void *addr, size_t size);
238+
239+
240+
241+
#ifdef __cplusplus
242+
}
243+
#endif
244+
245+
#endif /* NRF_MODEM_OS_RPC_H__ */
246+
/** @} */
104 KB
Binary file not shown.
125 KB
Binary file not shown.
104 KB
Binary file not shown.
125 KB
Binary file not shown.

0 commit comments

Comments
 (0)