Skip to main content
jumman_JHINGA
Senior III
January 23, 2026
Solved

STM32MP257 OpenAMP RPMsg – Endpoint not getting created

  • January 23, 2026
  • 1 reply
  • 252 views

Hi,

I’m working on STM32MP257F-DK (A35 + M33) using OpenAMP + RPMsg over IPCC and facing an issue with RPMsg endpoint creation on the M33 side.


Goal

Simple use case:

  • Linux (A35) sends "START" / "STOP"

  • M33 receives the message via RPMsg

  • M33 toggles an LED


What is working

  • M33 firmware builds and boots correctly using remoteproc

  • Resource table is detected

  • Virtio RPMsg is created on Linux

 

From Linux dmesg:

virtio_rpmsg_bus virtio0: rpmsg host is online
remoteproc remoteproc0: remote processor m33 is now up

So remoteproc and OpenAMP transport are working.


Problem

With the following M33 code, RPMsg endpoint is not getting created on Linux side:

int rpmsg_recv_callback(struct rpmsg_endpoint *ept,
 void *data,
 size_t len,
 uint32_t src,
 void *priv)
{
 if (len >= 5 && strncmp((char *)data, "START", 5) == 0)
 {
 led_run = 1;
 }
 else if (len >= 4 && strncmp((char *)data, "STOP", 4) == 0)
 {
 led_run = 0;
 HAL_GPIO_WritePin(GPIOZ, GPIO_PIN_0, GPIO_PIN_RESET);
 }

 return 0;
}

 struct rpmsg_device *rpmsg_dev;
// extern struct rpmsg_device *rpmsg_dev;
void OPENAMP_CreateEndpoint(void)
{
// if (!rpmsg_dev)
// {
// /* OpenAMP not ready yet */
// 	loc_printf("OpenAMP not ready yet.\r\n");
// return;
// }
	int status;
	status = rpmsg_create_ept(&rp_endpoint,
 rpmsg_dev,
 "rpmsg-led",
 RPMSG_ADDR_ANY,
 RPMSG_ADDR_ANY,
 rpmsg_recv_callback,
 NULL);
	if(status < 0){
		printf("End Point not created.\r\n");

		while(1){
			HAL_GPIO_TogglePin(GPIOZ, GPIO_PIN_0);
			 HAL_Delay(100);
		}
	}
}


/* USER CODE END 0 */

/**
 * @brief The application entry point.
 * @retval int
 */
int main(void)
{

 /* USER CODE BEGIN 1 */

 /* USER CODE END 1 */

 /* MCU Configuration--------------------------------------------------------*/

 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
 HAL_Init();

 /* USER CODE BEGIN Init */

 /* USER CODE END Init */

 /* Configure the system clock */
 SystemClock_Config();

 /* IPCC initialisation */
 MX_IPCC1_Init();

 if(!IS_DEVELOPER_BOOT_MODE())
 {
 /*Corpo Sync Initialization*/
	 CoproSync_Init();
 }
 /* OpenAmp initialisation ---------------------------------*/
 MX_OPENAMP_Init(RPMSG_REMOTE, NULL);

 /* USER CODE BEGIN SysInit */

 /* USER CODE END SysInit */

 /* Initialize all configured peripherals */
 MX_GPIO_Init();
 /* USER CODE BEGIN 2 */
 OPENAMP_CreateEndpoint();
 /* USER CODE END 2 */

 /* Infinite loop */
 /* USER CODE BEGIN WHILE */
 while (1)
 {
 /* USER CODE END WHILE */

 /* USER CODE BEGIN 3 */
 OPENAMP_check_for_message();

 if (led_run)
 {
 HAL_GPIO_TogglePin(GPIOZ, GPIO_PIN_0);
 HAL_Delay(500);
 }
 else
 {
 HAL_Delay(10);
 }
 }
 /* USER CODE END 3 */
}

But:

rpmsg_create_ept() returns -1

Because of this:

  • Endpoint is not created on M33

  • Linux never sees or binds to the endpoint

  • No userspace RPMsg channel is available

  • M33 callback is never triggered


Linux side observation

/sys/class/rpmsg → only rpmsg_ctrl0
/dev → rpmsg0, rpmsg_ctrl0

 

  • No RPMsg data endpoint appears

  • /sys/class/rpmsg/rpmsg_ctrl0/new_endpoint → permission denied

  • /dev/ttyRPMSG* does not exist

Any guidance or reference example for STM32MP257 RPMsg endpoint creation on M33 would be very helpful.

Thanks.

 

Best answer by Bernard PUEL

Hello,

you can have a look here to better trace what happens = https://wiki.st.com/stm32mpu/wiki/Cortex-M_remote_processor_management_troubleshooting_grid

 

To get better understanding of the architecture = https://wiki.st.com/stm32mpu/wiki/Interprocessor_communication_%E2%80%93_exchanging_buffers

 

This article will give you all the details of current example based on openAMP, you can get as reference = https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP2_boards/STM32MP257x-DK/Develop_on_Arm_Cortex-M33/Modify,_rebuild_and_reload_the_firmware

 

Hope it will help !!

 

 

1 reply

Bernard PUEL
Bernard PUELBest answer
Technical Moderator
February 2, 2026

Hello,

you can have a look here to better trace what happens = https://wiki.st.com/stm32mpu/wiki/Cortex-M_remote_processor_management_troubleshooting_grid

 

To get better understanding of the architecture = https://wiki.st.com/stm32mpu/wiki/Interprocessor_communication_%E2%80%93_exchanging_buffers

 

This article will give you all the details of current example based on openAMP, you can get as reference = https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP2_boards/STM32MP257x-DK/Develop_on_Arm_Cortex-M33/Modify,_rebuild_and_reload_the_firmware

 

Hope it will help !!