|
2 | 2 | #ifndef MICRO_ROS_ARDUINO
|
3 | 3 | #define MICRO_ROS_ARDUINO
|
4 | 4 |
|
5 |
| -// ---- Build fixes ----- |
6 |
| -//Removing __attribute__ not supported by gcc-arm-none-eabi-5_4 |
7 |
| -#define __attribute__(x) |
8 |
| - |
9 | 5 | #ifdef ARDUINO_SAMD_ZERO
|
10 | 6 | // Avoid macro usage in https://github.com/eProsima/Micro-XRCE-DDS-Client/blob/66df0a6df20063d246dd638ac3d33eb2e652fab2/include/uxr/client/core/session/session.h#L97
|
11 | 7 | // beacuse of https://github.com/arduino/ArduinoCore-samd/blob/0b60a79c4b194ed2e76fead95caf1bbce8960049/cores/arduino/sync.h#L28
|
|
14 | 10 | // ----------------------
|
15 | 11 |
|
16 | 12 | #include <uxr/client/transport.h>
|
| 13 | + |
| 14 | +// In GNU C < 6.0.0 __attribute__((deprecated(msg))) is not supported for enums, used in rmw/types.h |
| 15 | +#if __GNUC__ < 6 |
| 16 | +#define aux__attribute__(x) __attribute__(x) |
| 17 | +#define __attribute__(x) |
| 18 | +#endif |
| 19 | + |
17 | 20 | #include <rmw_microros/rmw_microros.h>
|
18 | 21 |
|
| 22 | +#if __GNUC__ < 6 |
| 23 | +#undef __attribute__ |
| 24 | +#define __attribute__(x) aux__attribute__(x) |
| 25 | +#endif |
| 26 | + |
19 | 27 | extern "C" bool arduino_transport_open(struct uxrCustomTransport * transport);
|
20 | 28 | extern "C" bool arduino_transport_close(struct uxrCustomTransport * transport);
|
21 | 29 | extern "C" size_t arduino_transport_write(struct uxrCustomTransport* transport, const uint8_t * buf, size_t len, uint8_t * err);
|
@@ -48,7 +56,7 @@ static inline void set_microros_transports(){
|
48 | 56 | #include <NativeEthernet.h>
|
49 | 57 | #endif
|
50 | 58 |
|
51 |
| -#if defined(TARGET_PORTENTA_H7_M7) |
| 59 | +#if defined(TARGET_PORTENTA_H7_M7) |
52 | 60 | #include <PortentaEthernet.h>
|
53 | 61 | #endif
|
54 | 62 |
|
|
0 commit comments