Skip to content

Commit cf2112c

Browse files
committed
soc: st: stm32: stm32n6x: Add linker section for Ethernet configuration
- Added a new section in the linker script for Ethernet configuration. - Configured Rx and Tx descriptor sections and Ethernet buffer sections. - Used DT_NODE_HAS_STATUS to check the status of axisram2 and axisram1 nodes. - Ensured proper memory allocation for Ethernet descriptors and buffers. Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <[email protected]>
1 parent c1914c8 commit cf2112c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

soc/st/stm32/stm32n6x/section.ld

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay)
8+
SECTION_DATA_PROLOGUE(eth_stm32, (NOLOAD),)
9+
{
10+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(axisram2), okay)
11+
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(axisram2)));
12+
*(.RxDecripSection)
13+
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(axisram2)) + 0xC0);
14+
*(.TxDecripSection)
15+
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(axisram2)) + 0x4000);
16+
*(.eth_stm32_buf)
17+
} GROUP_DATA_LINK_IN(LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(axisram2)), LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(axisram2)))
18+
19+
#else
20+
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(axisram1)));
21+
*(.RxDecripSection)
22+
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(axisram1)) + 0xC0);
23+
*(.TxDecripSection)
24+
. = ABSOLUTE(DT_REG_ADDR(DT_NODELABEL(axisram1)) + 0x4000);
25+
*(.eth_stm32_buf)
26+
} GROUP_DATA_LINK_IN(LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(axisram1)), LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(axisram1)))
27+
#endif
28+
#endif

0 commit comments

Comments
 (0)