Skip to content
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

app: update demo to support discovery kit #2

Open
wants to merge 1 commit into
base: next
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
2 changes: 1 addition & 1 deletion mpfs-rpmsg-bm/src/application/hart0/e51.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
volatile uint32_t count_sw_ints_h0 = 0U;

const uint8_t g_info_string[] =
"\r\n\r\n\r\n **** PolarFire SoC Icicle Kit AMP FreeRTOS example ****\r\n\r\n\r\n\
"\r\n\r\n\r\n **** PolarFire SoC AMP FreeRTOS example ****\r\n\r\n\r\n\
This program should be run from an application core (U54) in an AMP build.\r\n\r\n\
For more information refer to the project's README\r\n\
\r\n";
Expand Down
16 changes: 14 additions & 2 deletions mpfs-rpmsg-bm/src/application/inc/demo_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ void start_demo()

#ifdef RPMSG_MASTER
const uint8_t g_message[] =
"\r\n\r\n\r\n **** PolarFire SoC Icicle Kit AMP RPMsg Master Bare Metal Example ****\r\n\r\n\r\n";
"\r\n\r\n\r\n **** PolarFire SoC AMP RPMsg Master Bare Metal Example ****\r\n\r\n\r\n";
#else
const uint8_t g_message[] =
"\r\n\r\n\r\n **** PolarFire SoC Icicle Kit AMP RPMsg Remote Bare Metal Example ****\r\n\r\n\r\n";
"\r\n\r\n\r\n **** PolarFire SoC AMP RPMsg Remote Bare Metal Example ****\r\n\r\n\r\n";
#endif

const uint8_t g_menu[] =
Expand All @@ -85,9 +85,21 @@ void start_demo()
#endif

#ifdef RPMSG_MASTER
# if defined(BOARD_MPFS_DISCO_KIT_AMP)
# define UART_APP &g_mss_uart4_lo
(void)mss_config_clk_rst(MSS_PERIPH_MMUART4, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);
# else
(void)mss_config_clk_rst(MSS_PERIPH_MMUART1, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);
# define UART_APP &g_mss_uart1_lo
# endif
#else
# if defined(BOARD_MPFS_DISCO_KIT_AMP)
(void)mss_config_clk_rst(MSS_PERIPH_MMUART0, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);
# define UART_APP &g_mss_uart0_lo
# else
(void)mss_config_clk_rst(MSS_PERIPH_MMUART3, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);
# define UART_APP &g_mss_uart3_lo
# endif
#endif

PLIC_init();
Expand Down
12 changes: 10 additions & 2 deletions mpfs-rpmsg-bm/src/application/inc/demo_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
#define printf_to(...) ee_printf_to(__VA_ARGS__)

#ifdef RPMSG_MASTER
#define UART_APP &g_mss_uart1_lo
# if defined(BOARD_MPFS_DISCO_KIT_AMP)
# define UART_APP &g_mss_uart4_lo
# else
# define UART_APP &g_mss_uart1_lo
# endif
#else
#define UART_APP &g_mss_uart3_lo
# if defined(BOARD_MPFS_DISCO_KIT_AMP)
# define UART_APP &g_mss_uart0_lo
# else
# define UART_APP &g_mss_uart3_lo
# endif
#endif

typedef void *rpmsg_comm_stack_handle_t;
Expand Down
2 changes: 1 addition & 1 deletion mpfs-rpmsg-freertos/src/application/hart0/e51.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
volatile uint32_t count_sw_ints_h0 = 0U;

const uint8_t g_info_string[] =
"\r\n\r\n\r\n **** PolarFire SoC Icicle Kit AMP FreeRTOS example ****\r\n\r\n\r\n\
"\r\n\r\n\r\n **** PolarFire SoC AMP FreeRTOS example ****\r\n\r\n\r\n\
This program should be run from an application core (U54) in an AMP build.\r\n\r\n\
For more information refer to the project's README\r\n\
\r\n";
Expand Down
16 changes: 14 additions & 2 deletions mpfs-rpmsg-freertos/src/application/inc/demo_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,21 @@ void start_demo()
#endif

#ifdef RPMSG_MASTER
# if defined(BOARD_MPFS_DISCO_KIT_AMP)
# define UART_APP &g_mss_uart4_lo
(void)mss_config_clk_rst(MSS_PERIPH_MMUART4, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);
# else
(void)mss_config_clk_rst(MSS_PERIPH_MMUART1, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);
# define UART_APP &g_mss_uart1_lo
# endif
#else
# if defined(BOARD_MPFS_DISCO_KIT_AMP)
(void)mss_config_clk_rst(MSS_PERIPH_MMUART0, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);
# define UART_APP &g_mss_uart0_lo
# else
(void)mss_config_clk_rst(MSS_PERIPH_MMUART3, (uint8_t) MPFS_HAL_FIRST_HART, PERIPHERAL_ON);
# define UART_APP &g_mss_uart3_lo
# endif
#endif

PLIC_init();
Expand Down Expand Up @@ -124,10 +136,10 @@ void freertos_task_one( void *pvParameters )

#ifdef RPMSG_MASTER
const uint8_t g_message[] =
"\r\n\r\n\r\n **** PolarFire SoC Icicle Kit AMP RPMsg Master FreeRTOS example ****\r\n\r\n\r\n";
"\r\n\r\n\r\n **** PolarFire SoC AMP RPMsg Master FreeRTOS example ****\r\n\r\n\r\n";
#else
const uint8_t g_message[] =
"\r\n\r\n\r\n **** PolarFire SoC Icicle Kit AMP RPMsg Remote FreeRTOS example ****\r\n\r\n\r\n";
"\r\n\r\n\r\n **** PolarFire SoC AMP RPMsg Remote FreeRTOS example ****\r\n\r\n\r\n";
#endif

const uint8_t g_menu[] =
Expand Down
12 changes: 10 additions & 2 deletions mpfs-rpmsg-freertos/src/application/inc/demo_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@
#define printf_to(...) ee_printf_to(__VA_ARGS__)

#ifdef RPMSG_MASTER
#define UART_APP &g_mss_uart1_lo
# if defined(BOARD_MPFS_DISCO_KIT_AMP)
# define UART_APP &g_mss_uart4_lo
# else
# define UART_APP &g_mss_uart1_lo
# endif
#else
#define UART_APP &g_mss_uart3_lo
# if defined(BOARD_MPFS_DISCO_KIT_AMP)
# define UART_APP &g_mss_uart0_lo
# else
# define UART_APP &g_mss_uart3_lo
# endif
#endif

typedef void *rpmsg_comm_stack_handle_t;
Expand Down