From d44999a2927577c601420a58e41d8f970d6b94ab Mon Sep 17 00:00:00 2001 From: Jonathan Reichelt Gjertsen Date: Mon, 18 Sep 2023 17:53:56 +0200 Subject: [PATCH 1/2] Use GCC-compatible alignment specifier in TM4C NetworkInterface.c Replace the CCS-only pragma with GCC attribute. Fixing this along with #1206 will make this file build without warnings on the ARM GNU toolchain. The CCS compiler does support this attribute, see section 5.17.2 in: https://www.ti.com/lit/ug/spnu151w/spnu151w.pdf?ts=1695011722091 --- source/portable/NetworkInterface/TM4C/NetworkInterface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/portable/NetworkInterface/TM4C/NetworkInterface.c b/source/portable/NetworkInterface/TM4C/NetworkInterface.c index a3f37c3a3..72fc4b2b3 100644 --- a/source/portable/NetworkInterface/TM4C/NetworkInterface.c +++ b/source/portable/NetworkInterface/TM4C/NetworkInterface.c @@ -132,8 +132,7 @@ static tEMACDMADescriptor _rx_descriptors[ niEMAC_RX_DMA_DESC_COUNT ]; static tDescriptorList _tx_descriptor_list = { .number_descriptors = niEMAC_TX_DMA_DESC_COUNT, 0 }; static tDescriptorList _rx_descriptor_list = { .number_descriptors = niEMAC_RX_DMA_DESC_COUNT, 0 }; -static uint8_t _network_buffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ][ BUFFER_SIZE_ROUNDED_UP ]; -#pragma DATA_ALIGN(_network_buffers, 4) +static uint8_t _network_buffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ][ BUFFER_SIZE_ROUNDED_UP ] __attribute__((aligned(4))); static EthernetPhy_t xPhyObject; From 87b1359d21f151454799dbed300d0edf8fd7e80d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 18 Sep 2023 18:38:19 +0000 Subject: [PATCH 2/2] Uncrustify: triggered by comment. --- source/portable/NetworkInterface/TM4C/NetworkInterface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/portable/NetworkInterface/TM4C/NetworkInterface.c b/source/portable/NetworkInterface/TM4C/NetworkInterface.c index 72fc4b2b3..9289e8a9a 100644 --- a/source/portable/NetworkInterface/TM4C/NetworkInterface.c +++ b/source/portable/NetworkInterface/TM4C/NetworkInterface.c @@ -132,7 +132,7 @@ static tEMACDMADescriptor _rx_descriptors[ niEMAC_RX_DMA_DESC_COUNT ]; static tDescriptorList _tx_descriptor_list = { .number_descriptors = niEMAC_TX_DMA_DESC_COUNT, 0 }; static tDescriptorList _rx_descriptor_list = { .number_descriptors = niEMAC_RX_DMA_DESC_COUNT, 0 }; -static uint8_t _network_buffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ][ BUFFER_SIZE_ROUNDED_UP ] __attribute__((aligned(4))); +static uint8_t _network_buffers[ ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS ][ BUFFER_SIZE_ROUNDED_UP ] __attribute__( ( aligned( 4 ) ) ); static EthernetPhy_t xPhyObject;