cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F756 Ethernet and lwIP Rx and Tx Descriptor

avinash_elec
Associate III

Hello,

I am creating a new project using STM32CubeIDE to use lwIP with internal MAC for a Nucleo F756 Board. When I enable the Eth peripheral, I can configure the Rx and Tx descriptors. They are placed at the start of SRAM2 (0x2004C000).

descriptors.png

Since the CubeIDE uses the gcc compiler which cannot place objects at requested address using only C code. The generated code uses sections created using linker scripts to place objects at those locations. descriptors.png

But the problem here is that CubeIDE is not modifying the linker script file (STM32F756ZGTX_FLASH.ld) to create these sections! So these objects are NOT kept at SRAM2 as expected.

I have manually done the following in the file STM32F756ZGTX_FLASH.ld

new_region_sram2.png

new_region_sram2.png

1 REPLY 1
lavanya
Associate III

 

Hi @avinash_elec, You can Edit STM32F756ZGTX_FLASH.ld file.

 

/* Specify the memory areas */
MEMORY
{
FLASH (rx)       : ORIGIN = 0x8000000, LENGTH = 1024K
RAM (xrw)        : ORIGIN = 0x20000000, LENGTH = 307K
Memory_B1(xrw)   : ORIGIN = 0x2004C000, LENGTH = 0xA0
Memory_B2(xrw)   : ORIGIN = 0x2004C0A0, LENGTH = 0xA0
}

 

   .ARM.attributes 0 : { *(.ARM.attributes) }
  .RxDecripSection (NOLOAD) : { *(.RxDescripSection) } >Memory_B1
  .TxDescripSection (NOLOAD) : { *(.TxDescripSection) } >Memory_B2

check examples in repository.

which firmware version you are using?

firmware version STM32Cube_FW_F7_V1.17.0 working with CMSIS1.