Skip to content

Commit 1ce679b

Browse files
committed
[VirtIO] Add virtio_config.h to avoid #define RPMSG_XX_XX location problem
1 parent b5438ad commit 1ce679b

File tree

13 files changed

+22
-12
lines changed

13 files changed

+22
-12
lines changed

cores/arduino/stm32/virtio/mbox_ipcc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
*/
3333

3434
/* Includes ------------------------------------------------------------------*/
35+
#include "virtio_config.h"
3536
#include "openamp/open_amp.h"
3637
#include "stm32_def.h"
3738
#include "openamp_conf.h"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#ifdef VIRTIOCON
22

3+
#include "virtio_config.h"
34
#include "open-amp/lib/remoteproc/remoteproc_virtio.c"
45

56
#endif /* VIRTIOCON */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#ifdef VIRTIOCON
22

3+
#include "virtio_config.h"
34
#include "open-amp/lib/rpmsg/rpmsg.c"
45

56
#endif /* VIRTIOCON */
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#ifdef VIRTIOCON
22

3+
#include "virtio_config.h"
34
#include "open-amp/lib/rpmsg/rpmsg_virtio.c"
45

56
#endif /* VIRTIOCON */

cores/arduino/stm32/virtio/openamp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
#ifdef VIRTIOCON
2020

21+
#include "virtio_config.h"
2122
#include "openamp/open_amp.h"
2223
#include "openamp.h"
2324
#include "rsc_table.h"

cores/arduino/stm32/virtio/openamp_conf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
#ifdef VIRTIOCON
2525

26+
#include "virtio_config.h"
27+
2628
#ifdef __cplusplus
2729
extern "C" {
2830
#endif

cores/arduino/stm32/virtio/ringbuffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*/
2323
#ifdef VIRTIOCON
2424

25+
#include "virtio_config.h"
2526
#include "ringbuffer.h"
2627
#include <string.h>
2728
#include "wiring.h"

cores/arduino/stm32/virtio/ringbuffer.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@
3030
extern "C" {
3131
#endif
3232

33-
#ifndef RPMSG_BUFFER_SIZE
34-
#error "Define RPMSG_BUFFER_SIZE, or include relevant headers."
35-
#endif
36-
3733
#define VIRTIO_RINGBUFFER_SIZE (RPMSG_BUFFER_SIZE * 2)
3834

3935
typedef struct {

cores/arduino/stm32/virtio/rsc_table.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
#ifdef VIRTIOCON
1919

20+
#include "virtio_config.h"
2021
#include "openamp/open_amp.h"
2122
#include "openamp_conf.h"
2223

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
#ifdef VIRTIOCON
22

3-
4-
// #include "openamp/open_amp.h"
5-
6-
/* Configurable parameters */
7-
#ifndef RPMSG_BUFFER_SIZE
8-
#define RPMSG_BUFFER_SIZE (512)
9-
#endif
10-
3+
#include "virtio_config.h"
114
#include "virtual_driver/virt_uart.c"
125

136
#endif /* VIRTIOCON */

0 commit comments

Comments
 (0)