From 076b8205f6afabef37f103a6706274fa26c535cd Mon Sep 17 00:00:00 2001 From: Johannes Stratmann Date: Tue, 21 Nov 2023 20:02:14 +0100 Subject: [PATCH 1/2] add section for emac data --- connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp b/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp index daddbf1167b..a79ede9dbba 100644 --- a/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp +++ b/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp @@ -80,22 +80,22 @@ using namespace std::chrono; #if defined (__ICCARM__) /*!< IAR Compiler */ #pragma data_alignment=4 #endif -__ALIGN_BEGIN ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __ALIGN_END; /* Ethernet Rx DMA Descriptor */ +ALIGN_32BYTES( ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __attribute__((section(".emac_section"))));/* Ethernet Rx DMA Descriptor */ #if defined (__ICCARM__) /*!< IAR Compiler */ #pragma data_alignment=4 #endif -__ALIGN_BEGIN ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __ALIGN_END; /* Ethernet Tx DMA Descriptor */ +ALIGN_32BYTES( ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __attribute__((section(".emac_section"))));/* Ethernet Tx DMA Descriptor */ #if defined (__ICCARM__) /*!< IAR Compiler */ #pragma data_alignment=4 #endif -__ALIGN_BEGIN uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __ALIGN_END; /* Ethernet Receive Buffer */ +ALIGN_32BYTES( uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __attribute__((section(".emac_section")))); /* Ethernet Receive Buffer */ #if defined (__ICCARM__) /*!< IAR Compiler */ #pragma data_alignment=4 #endif -__ALIGN_BEGIN uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __ALIGN_END; /* Ethernet Transmit Buffer */ +ALIGN_32BYTES( uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __attribute__((section(".emac_section")))); /* Ethernet Transmit Buffer */ #else // ETH_IP_VERSION_V2 From 6d224dce2a2eaa47ff1e1b6d8c7da33405ae363f Mon Sep 17 00:00:00 2001 From: Johannes Stratmann Date: Tue, 21 Nov 2023 20:02:14 +0100 Subject: [PATCH 2/2] add section for emac data --- connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp b/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp index daddbf1167b..a79ede9dbba 100644 --- a/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp +++ b/connectivity/drivers/emac/TARGET_STM/stm32xx_emac.cpp @@ -80,22 +80,22 @@ using namespace std::chrono; #if defined (__ICCARM__) /*!< IAR Compiler */ #pragma data_alignment=4 #endif -__ALIGN_BEGIN ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __ALIGN_END; /* Ethernet Rx DMA Descriptor */ +ALIGN_32BYTES( ETH_DMADescTypeDef DMARxDscrTab[ETH_RXBUFNB] __attribute__((section(".emac_section"))));/* Ethernet Rx DMA Descriptor */ #if defined (__ICCARM__) /*!< IAR Compiler */ #pragma data_alignment=4 #endif -__ALIGN_BEGIN ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __ALIGN_END; /* Ethernet Tx DMA Descriptor */ +ALIGN_32BYTES( ETH_DMADescTypeDef DMATxDscrTab[ETH_TXBUFNB] __attribute__((section(".emac_section"))));/* Ethernet Tx DMA Descriptor */ #if defined (__ICCARM__) /*!< IAR Compiler */ #pragma data_alignment=4 #endif -__ALIGN_BEGIN uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __ALIGN_END; /* Ethernet Receive Buffer */ +ALIGN_32BYTES( uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __attribute__((section(".emac_section")))); /* Ethernet Receive Buffer */ #if defined (__ICCARM__) /*!< IAR Compiler */ #pragma data_alignment=4 #endif -__ALIGN_BEGIN uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __ALIGN_END; /* Ethernet Transmit Buffer */ +ALIGN_32BYTES( uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __attribute__((section(".emac_section")))); /* Ethernet Transmit Buffer */ #else // ETH_IP_VERSION_V2