Skip to content

Commit cc8de79

Browse files
authored
Merge pull request #3927 from thread-liu/stm32mp157a-dk1
[add] openamp for stm32mp157-dk1
2 parents f98a0f8 + 30b3eea commit cc8de79

File tree

125 files changed

+14047
-1143
lines changed

Some content is hidden

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

125 files changed

+14047
-1143
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ CONFIG_BSP_USING_STLINK_TO_USART=y
426426
# CONFIG_BSP_USING_PMIC is not set
427427
# CONFIG_BSP_USING_PWR is not set
428428
# CONFIG_BSP_USING_RCC is not set
429+
# CONFIG_BSP_USING_OPENAMP is not set
429430

430431
#
431432
# On-chip Peripheral Drivers

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

Lines changed: 13 additions & 17 deletions
Large diffs are not rendered by default.

bsp/stm32/stm32mp157a-st-discovery/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,25 @@ For more details about this board, please refer to the ST official documentation
3737

3838
Each peripheral supporting condition for this BSP is as follows:
3939

40-
| On-board Peripheral | **Support** | **Remark** |
41-
| :----------------------------- | :---------: | :-----------------: |
42-
| USB TO UART | YES | |
43-
| PWR | YES | |
44-
| RCC | YES | |
45-
| SD Card (SDMMC) | NO | |
46-
| ETH | NO | |
47-
| AUDIO | NO | |
48-
| **On-chip Peripheral Drivers** | **Support** | **Remark** |
49-
| GPIO | YES | GPIOA-GPIOK, GPIOZ |
50-
| UART | YES | UART4 (ST-Link) |
51-
| EXTI | YES | |
52-
| SPI | YES | |
53-
| TIM | YES | |
54-
| LPTIM | YES | |
55-
| I2C | YES | Software & Hardware |
56-
| ADC | YES | |
57-
| DAC | YES | |
58-
| WWDG | YES | |
40+
| On-board Peripheral | **Support** | **Remark** |
41+
| :----------------------------- | :---------: | :----------------: |
42+
| USB TO UART | YES | |
43+
| PWR | YES | |
44+
| RCC | YES | |
45+
| SD Card (SDMMC) | NO | |
46+
| ETH | NO | |
47+
| AUDIO | NO | |
48+
| **On-chip Peripheral Drivers** | **Support** | **Remark** |
49+
| GPIO | YES | GPIOA-GPIOK, GPIOZ |
50+
| UART | YES | UART4 (ST-Link) |
51+
| EXTI | YES | |
52+
| SPI | YES | |
53+
| TIM | YES | |
54+
| LPTIM | YES | |
55+
| I2C | YES | Software |
56+
| ADC | YES | |
57+
| DAC | YES | |
58+
| WWDG | YES | |
5959

6060
## Execution Instruction
6161

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)