Skip to content

Commit f98a0f8

Browse files
authored
Merge pull request #3928 from thread-liu/stm32mp157a-ev1
[add] openamp for stm32mp157a-ev1
2 parents d92fbba + 7cfb691 commit f98a0f8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+13630
-85
lines changed

bsp/stm32/stm32mp157a-st-ev1/.config

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,24 +422,25 @@ CONFIG_SOC_STM32MP157A=y
422422
# Onboard Peripheral Drivers
423423
#
424424
CONFIG_BSP_USING_STLINK_TO_USART=y
425+
# CONFIG_BSP_USING_PMIC is not set
426+
# CONFIG_BSP_USING_NAND is not set
427+
# CONFIG_BSP_USING_OPENAMP is not set
425428

426429
#
427430
# On-chip Peripheral Drivers
428431
#
429432
CONFIG_BSP_USING_GPIO=y
430-
# CONFIG_BSP_USING_WWDG is not set
431433
CONFIG_BSP_USING_UART=y
432434
# CONFIG_BSP_USING_UART3 is not set
433435
# CONFIG_BSP_UART3_RX_USING_DMA is not set
434436
CONFIG_BSP_USING_UART4=y
435437
# CONFIG_BSP_UART4_RX_USING_DMA is not set
436438
# CONFIG_BSP_UART4_TX_USING_DMA is not set
437439
# CONFIG_BSP_USING_TIM is not set
438-
# CONFIG_BSP_USING_LPTIM is not set
439440
# CONFIG_BSP_USING_PWM is not set
440441
# CONFIG_BSP_USING_ADC is not set
441442
# CONFIG_BSP_USING_DAC is not set
442-
# CONFIG_BSP_USING_I2C1 is not set
443+
# CONFIG_BSP_USING_I2C is not set
443444
# CONFIG_BSP_USING_SPI is not set
444445
# CONFIG_BSP_USING_CRC is not set
445446
# CONFIG_BSP_USING_RNG is not set

bsp/stm32/stm32mp157a-st-ev1/.cproject

Lines changed: 13 additions & 15 deletions
Large diffs are not rendered by default.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
******************************************************************************
3+
* File Name : IPCC.h
4+
* Description : This file provides code for the configuration
5+
* of the IPCC instances.
6+
******************************************************************************
7+
* @attention
8+
*
9+
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
10+
* All rights reserved.</center></h2>
11+
*
12+
* This software component is licensed by ST under Ultimate Liberty license
13+
* SLA0044, the "License"; You may not use this file except in compliance with
14+
* the License. You may obtain a copy of the License at:
15+
* www.st.com/SLA0044
16+
*
17+
******************************************************************************
18+
*/
19+
/* Define to prevent recursive inclusion -------------------------------------*/
20+
#ifndef __ipcc_H
21+
#define __ipcc_H
22+
#ifdef __cplusplus
23+
extern "C" {
24+
#endif
25+
26+
/* Includes ------------------------------------------------------------------*/
27+
#include "main.h"
28+
29+
/* USER CODE BEGIN Includes */
30+
31+
/* USER CODE END Includes */
32+
33+
extern IPCC_HandleTypeDef hipcc;
34+
35+
/* USER CODE BEGIN Private defines */
36+
37+
/* USER CODE END Private defines */
38+
39+
void MX_IPCC_Init(void);
40+
41+
/* USER CODE BEGIN Prototypes */
42+
43+
/* USER CODE END Prototypes */
44+
45+
#ifdef __cplusplus
46+
}
47+
#endif
48+
#endif /*__ ipcc_H */
49+
50+
/**
51+
* @}
52+
*/
53+
54+
/**
55+
* @}
56+
*/
57+
58+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
******************************************************************************
3+
* @file mbox_ipcc.h
4+
* @author MCD Application Team
5+
* @brief Header for mbox_ipcc.c module
6+
******************************************************************************
7+
* @attention
8+
*
9+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10+
* All rights reserved.</center></h2>
11+
*
12+
* This software component is licensed by ST under BSD 3-Clause license,
13+
* the "License"; You may not use this file except in compliance with the
14+
* License. You may obtain a copy of the License at:
15+
* opensource.org/licenses/BSD-3-Clause
16+
*
17+
******************************************************************************
18+
*/
19+
20+
#ifndef MBOX_IPCC_H_
21+
#define MBOX_IPCC_H_
22+
23+
/* USER CODE BEGIN firstSection */
24+
/* can be used to modify / undefine following code or add new definitions */
25+
/* USER CODE END firstSection */
26+
27+
/* Includes ------------------------------------------------------------------*/
28+
/* Exported types ------------------------------------------------------------*/
29+
/* Exported constants --------------------------------------------------------*/
30+
/* Exported functions ------------------------------------------------------- */
31+
int MAILBOX_Notify(void *priv, uint32_t id);
32+
int MAILBOX_Init(void);
33+
int MAILBOX_Poll(struct virtio_device *vdev);
34+
35+
/* USER CODE BEGIN lastSection */
36+
/* can be used to modify / undefine previous code or add new definitions */
37+
/* USER CODE END lastSection */
38+
39+
#endif /* MBOX_IPCC_H_ */
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
******************************************************************************
3+
* @file openamp.h
4+
* @brief Header for openamp applications
5+
* @author MCD Application Team
6+
******************************************************************************
7+
* @attention
8+
*
9+
* <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
10+
* All rights reserved.</center></h2>
11+
*
12+
* This software component is licensed by ST under BSD 3-Clause license,
13+
* the "License"; You may not use this file except in compliance with the
14+
* License. You may obtain a copy of the License at:
15+
* opensource.org/licenses/BSD-3-Clause
16+
*
17+
******************************************************************************
18+
*/
19+
20+
/* Define to prevent recursive inclusion -------------------------------------*/
21+
#ifndef __openamp_H
22+
#define __openamp_H
23+
#ifdef __cplusplus
24+
extern "C" {
25+
#endif
26+
27+
#include "openamp/open_amp.h"
28+
#include "openamp_conf.h"
29+
30+
#define OPENAMP_send rpmsg_send
31+
#define OPENAMP_destroy_ept rpmsg_destroy_ept
32+
33+
/* Initialize the openamp framework*/
34+
int MX_OPENAMP_Init(int RPMsgRole, rpmsg_ns_bind_cb ns_bind_cb);
35+
36+
/* Deinitialize the openamp framework*/
37+
void OPENAMP_DeInit(void);
38+
39+
/* Initialize the endpoint struct*/
40+
void OPENAMP_init_ept(struct rpmsg_endpoint *ept);
41+
42+
/* Create and register the endpoint */
43+
int OPENAMP_create_endpoint(struct rpmsg_endpoint *ept, const char *name,
44+
uint32_t dest, rpmsg_ept_cb cb,
45+
rpmsg_ns_unbind_cb unbind_cb);
46+
47+
/* Check for new rpmsg reception */
48+
void OPENAMP_check_for_message(void);
49+
50+
/* Wait loop on endpoint ready ( message dest address is know)*/
51+
void OPENAMP_Wait_EndPointready(struct rpmsg_endpoint *rp_ept);
52+
53+
#ifdef __cplusplus
54+
}
55+
#endif
56+
#endif /*__openamp_H */
57+
58+
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

0 commit comments

Comments
 (0)