-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
sm_ipt: Provide zephyr porting layer #5191
Conversation
You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds. Note: This comment is automatically posted by the Documentation Publishing GitHub Action. |
e313402
to
f4d0e13
Compare
subsys/CMakeLists.txt
Outdated
@@ -49,3 +49,4 @@ add_subdirectory(debug) | |||
add_subdirectory(partition_manager) | |||
|
|||
add_subdirectory_ifdef(CONFIG_NRF_RPC nrf_rpc) | |||
add_subdirectory(sm_ipt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be added always ?
subsys/sm_ipt/CMakeLists.txt
Outdated
|
||
zephyr_library() | ||
|
||
zephyr_library_sources_ifdef(CONFIG_SM_IPT sm_ipt_os.c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just:
zephyr_library_sources_ifdef(CONFIG_SM_IPT sm_ipt_os.c) | |
zephyr_library_sources(sm_ipt_os.c) |
Add conditionally add sm_ipt directory CONFIG_SM_IPT
typedef struct k_mutex sm_ipt_os_mutex_t; | ||
#define sm_ipt_os_mutex_init k_mutex_init | ||
#define sm_ipt_os_unlock k_mutex_unlock | ||
static inline void sm_ipt_os_lock(sm_ipt_os_mutex_t *mutex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add blank line above
|
||
typedef struct k_sem sm_ipt_os_sem_t; | ||
#define sm_ipt_os_give k_sem_give | ||
static inline void sm_ipt_os_sem_init(sm_ipt_os_sem_t *sem) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add blank line above
subsys/sm_ipt/sm_ipt_os.c
Outdated
static void ipm_callback(const struct device *ipmdev, void *user_data, uint32_t id, | ||
volatile void *data) | ||
{ | ||
struct sm_ipt_os_ctx *os_ctx; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct sm_ipt_os_ctx *os_ctx; | |
struct sm_ipt_os_ctx *os_ctx = (struct sm_ipt_os_ctx *) user_data; |
Add you can remove next line
subsys/sm_ipt/sm_ipt_os.c
Outdated
struct sm_ipt_os_ctx *os_ctx; | ||
os_ctx = (struct sm_ipt_os_ctx *) user_data; | ||
|
||
if (os_ctx->signal_handler != NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (os_ctx->signal_handler != NULL) | |
if (os_ctx->signal_handler) |
subsys/sm_ipt/sm_ipt_os.c
Outdated
int sm_ipt_os_init(struct sm_ipt_os_ctx *os_ctx) | ||
{ | ||
const struct device *ipm_rx_handle; | ||
uint32_t size = (SHM_SIZE / 8) * 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use solution from Zephyr
@@ -15,7 +15,17 @@ | |||
#define _NRF_RPC_LOG_REGISTER1(module) \ | |||
_NRF_RPC_LOG_REGISTER2(module) | |||
|
|||
#define _NRF_RPC_LOG_DECLARE2(module) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need those two levels of macro ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I were to use only level 2, then "CONFIG_ ## module ## _LOG_LEVEL", would result in appending name of module macro, not its value. Level 1 makes sure to pass only value of level 1s define.
f4d0e13
to
edb523b
Compare
The following west manifest projects have been modified in this Pull Request:
Note: This message is automatically posted and updated by the Manifest GitHub Action. |
edb523b
to
f4bb9c6
Compare
subsys/nrf_rpc/include/nrf_rpc_os.h
Outdated
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright (c) 2020 Nordic Semiconductor ASA | |||
* Copyright (c) 2020-2021 Nordic Semiconductor ASA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't update date, if the file was not changed.
west.yml
Outdated
@@ -104,7 +104,7 @@ manifest: | |||
- name: nrfxlib | |||
repo-path: sdk-nrfxlib | |||
path: nrfxlib | |||
revision: 59179ff80cee01c4feb8b747e0ff9caecb55c92d | |||
revision: d74c71a0362baa906031c24275a6bab110ef31fc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More convenient is following syntax. If you use it, you don't need to update this line each time dependent PR changes:
revision: pull/524/head
When dependent PR goes into master, you can remove this change.
f4bb9c6
to
6e04a98
Compare
6e04a98
to
ec0964e
Compare
Updated zephyr porting layer for nrf_rpc. Added zephyr layer for sm_ipt (shared memory inter-processor transport). Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no> Co-authored-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
ec0964e
to
a952c57
Compare
With the new Integration Test Specification process we don't need the github labels. Right now this PR runs all Integration tests because it changes sdk-nrfxlib in west.yml and there is no test-spec.yml in that repo yet. To get the test spec feature working correctly on this PR, you need to rebase it to the latest main to get the .github/test-spec.yml file Then run CI here to update the test spec. |
Updated zephyr porting layer for
nrf_rpc.
Added zephyr layer for sm_ipt (shared memory
inter-processor transport).
Depends on:
nrfconnect/sdk-nrfxlib#524
nrfconnect/sdk-nrfxlib#525
Signed-off-by: Dominik Chat dominik.chat@nordicsemi.no