cancel
Showing results for 
Search instead for 
Did you mean: 

[SOLVED] LwIF + TouchGFX compile and link ok

I have started now to add the Ethernet source stm32f7xx_hal_eth.c to my TouchGFX project.

I can compile and link but how to add some code to give an answer to a ping or to a specific port ?

I don't find an example about this.

void BSP_ETH_Init()
{
#define PHY_USER_NAME_PHY_ADDRESS (0)
 
    ETH_HandleTypeDef heth;
    uint8_t MACAddr[6] ;
 
    heth.Instance = ETH;
    heth.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE;
    heth.Init.Speed = ETH_SPEED_100M;
    heth.Init.DuplexMode = ETH_MODE_FULLDUPLEX;
    heth.Init.PhyAddress = PHY_USER_NAME_PHY_ADDRESS;
    MACAddr[0] = 0x02;
    MACAddr[1] = 0x80;
    MACAddr[2] = 0xE1;
    MACAddr[3] = 0x12;
    MACAddr[4] = 0x65;
    MACAddr[5] = 0x98;
    heth.Init.MACAddr = &MACAddr[0];
    heth.Init.RxMode = ETH_RXINTERRUPT_MODE;
    heth.Init.ChecksumMode = ETH_CHECKSUM_BY_HARDWARE;
    heth.Init.MediaInterface = ETH_MEDIA_INTERFACE_MII;
 
    HAL_ETH_Init(&heth);
 
    delayUs(100);
}
 
 
...

5 REPLIES 5

I have add LwIP module after copy directory from Cube and I have add this following entry to the Makefile but how to modify include path ?

components := TouchGFX/gui target TouchGFX/generated/gui_generated LwIP

0690X00000DYoP1QAL.jpg

After some changes on include location I am here, LwIP has been compiled but ...

0690X00000DYoYhQAL.jpg

why ?

Sorry but don't find info about

I can compile and link but what to insert before the udp_new(); to start dhcp client ?