Skip to content

samples: ipc: ipc_service: Add support for Arduino Giga. #3

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

Open
wants to merge 1 commit into
base: arduino_core_merge_post_4.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion samples/subsys/ipc/ipc_service/icmsg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
if(NOT CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP AND
NOT CONFIG_BOARD_NRF5340BSIM_NRF5340_CPUAPP AND
NOT CONFIG_BOARD_STM32H747I_DISCO AND
NOT CONFIG_BOARD_NRF54L15DK_NRF54L15_CPUAPP)
NOT CONFIG_BOARD_NRF54L15DK_NRF54L15_CPUAPP AND
NOT CONFIG_BOARD_ARDUINO_GIGA_R1)
message(FATAL_ERROR "${BOARD} is not supported for this sample")
endif()

Expand Down
1 change: 1 addition & 0 deletions samples/subsys/ipc/ipc_service/icmsg/Kconfig.sysbuild
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ string
default "nrf5340bsim/nrf5340/cpunet" if $(BOARD) = "nrf5340bsim"
default "nrf54l15dk/nrf54l15/cpuflpr" if $(BOARD) = "nrf54l15dk"
default "stm32h747i_disco/stm32h747xx/m4" if $(BOARD) = "stm32h747i_disco"
default "arduino_giga_r1/stm32h747xx/m4" if $(BOARD) = "arduino_giga_r1"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_MBOX_STM32_HSEM=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (c) 2024 Celina Sophie Kalus <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
chosen {
/delete-property/ zephyr,ipc_shm;
};

/* Define new memory regions for TX and RX */
/delete-node/ memory@38000000;

sram_tx: memory@38000000 {
zephyr,memory-region = "SRAM_TX";
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x38000000 0x08000>;
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};

sram_rx: memory@38008000 {
zephyr,memory-region = "SRAM_RX";
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x38008000 0x08000>;
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};

ipc0: ipc0 {
compatible = "zephyr,ipc-icmsg";
tx-region = <&sram_tx>;
rx-region = <&sram_rx>;
mboxes = <&mailbox 11>, <&mailbox 10>;
mbox-names = "tx", "rx";
status = "okay";
};
};

&mailbox {
status = "okay";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_LOG_BACKEND_UART=y

CONFIG_MBOX_STM32_HSEM=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* Copyright (c) 2024 Celina Sophie Kalus <[email protected]>
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
chosen {
/delete-property/ zephyr,ipc_shm;

zephyr,console = &usart2;
zephyr,shell-uart = &usart2;
};

/* Define new memory regions for TX and RX */
/delete-node/ memory@38000000;

sram_rx: memory@38000000 {
zephyr,memory-region = "SRAM_RX";
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x38000000 0x08000>;
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};

sram_tx: memory@38008000 {
zephyr,memory-region = "SRAM_TX";
compatible = "zephyr,memory-region", "mmio-sram";
reg = <0x38008000 0x08000>;
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
};

ipc0: ipc0 {
compatible = "zephyr,ipc-icmsg";
tx-region = <&sram_tx>;
rx-region = <&sram_rx>;
mboxes = <&mailbox 10>, <&mailbox 11>;
mbox-names = "tx", "rx";
status = "okay";
};
};

&usart2 {
status = "okay";
};

&mailbox {
status = "okay";
};
Loading