2024-03-18 07:42 AM
Hello,
Using
I want to use the ETH port to communicate with other devices.The project was generated with TGFX. I configured ETH port in RM|| mode, configured LWIP with disabled DHCP and manual IP settings, platform settings set to LAN8742. In KeyOptions changed MEM_SIZE to 14x1024Bytes. In system core:cortex M7 section i have added 2 additional sections for SRAM2(16KB and 1KB) with base Adress 0x2007C000,
After code generation, i have modified ethernetif.c:
/* USER CODE BEGIN 2 */
extern u8_t __attribute__((section(".RxPool"))) memp_memory_RX_POOL_base[];
/* USER CODE END 2 */
Additionaly i have modified flash.ld:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K
QUADSPI (r) : ORIGIN = 0x90000000, LENGTH = 64M
SDRAM (xrw) : ORIGIN = 0xC0000000, LENGTH = 16M
RAM_D2 (xrw) : ORIGIN = 0x2007C000, LENGTH = 16K
}
and
.lwip_sec (NOLOAD) :
{
. = ABSOLUTE(0x2007C000);
*(.RxDecripSection)
. = ABSOLUTE(0x2007C0A0);
*(.TxDecripSection)
. = ABSOLUTE(0x2007C140);
*(.RxPool)
} >RAM_D2
Actualy the program get stuck on MX_LWIP_Init();
in udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
I assume there is still a problem with dynamical memory allocation?
Is there an actual working example for ETH/LWIP configuration on STM32F7? Older examples
are not compatible with actual ETH/LWIP libs from code generator.
Thanks in advance
Eduard
Solved! Go to Solution.
2024-03-18 08:12 AM
Hello,
Is there an actual working example for ETH/LWIP configuration on STM32F7? Older examples
are not compatible with actual ETH/LWIP libs from code generator.
Not sure what do you mean by "Older examples are not compatible with actual ETH/LWIP libs"
But the LWIP examples are located here for this board.
2024-03-18 08:12 AM
Hello,
Is there an actual working example for ETH/LWIP configuration on STM32F7? Older examples
are not compatible with actual ETH/LWIP libs from code generator.
Not sure what do you mean by "Older examples are not compatible with actual ETH/LWIP libs"
But the LWIP examples are located here for this board.
2024-03-19 07:13 AM
Thanks for the link with LWIP examples, it helped me to find a solution. But the generated from CubeIDE ethernetif.c data had many differences to ethernetif.c in example.
Kind Regards,
Eduard