# Building TCP/IP stack for STM32H745I-DISCO board - NetworkInterface.c Compilation issue

**URL:** <https://forums.freertos.org/t/building-tcp-ip-stack-for-stm32h745i-disco-board-networkinterface-c-compilation-issue/16677>\
**Category:** ST\
**Created:** [February 2, 2023, 10:23pm UTC](https://forums.freertos.org/t/building-tcp-ip-stack-for-stm32h745i-disco-board-networkinterface-c-compilation-issue/16677 "2023-02-02T22:23:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![murali.karicheri](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@murali.karicheri](https://forums.freertos.org/u/murali.karicheri)\
**Post date:** [February 2, 2023, 10:23pm UTC](https://forums.freertos.org/t/building-tcp-ip-stack-for-stm32h745i-disco-board-networkinterface-c-compilation-issue/16677/1 "2023-02-02T22:23:17Z")

</div>

Hello,  
I want to test the TCP/IP echo server demo available in FreeRTOS-Plus library on my STM32H745I-DISCO. So as a first step, I ran the demo as described in STM32H7\_Dual\_Core\_AMP\_RTOS\_demo.html

Next I converted that to a LED blinky demo using LED1 and LED2 to blink. Worked so far fine.  
Now I want to convert this to a TCP Echo server project. So I followed the steps described in TCP\_Networking\_Tutorial\_Adding\_Source\_Files.html

I have also added the NetworkInterface.c and eth.c driver from the demo directory. I have also updated the include paths to see the new include files. However NetworkInterface.c throws following compilation error:-

ETH\_RX\_BUF\_SIZE, ETH\_TX\_BUF\_SIZE not defined and protype for ETH\_IRQHandler couldn’t be found

Could someone help me understand why the NetworkInterface.c can’t see the above defines and prototype? I have tried to solve first two by adding the defines in STM\*hal\_conf.h, however can’t figure out why ETH\_IRQHandler is not seen. Also seeing several build warnings.

Thanks  
Murali Karicheri

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [February 3, 2023, 7:10am UTC](https://forums.freertos.org/t/building-tcp-ip-stack-for-stm32h745i-disco-board-networkinterface-c-compilation-issue/16677/2 "2023-02-03T07:10:54Z")

</div>

Hey @murali.karicheri,

Welcome to the FreeRTOS Forum!

The config flags `ETH_RX_BUF_SIZE` and `ETH_TX_BUF_SIZE` are not provided by default for STM32Hxx as they should be configured in the application layer to fit the application needs [[FreeRTOS-Plus-TCP Configuration](https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html)]. You could refer to the [STM32Hxx readme](https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/source/portable/NetworkInterface/STM32Hxx/readme.md) and [STM32Fxx readme](https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/source/portable/NetworkInterface/STM32Fxx/readme.md) for more details.

> ETH\_IRQHandler is not seen

If you are using STM32CubeIDE for code generation there can be a chance that you might have `ETH_IRQHandler` defined (auto generated) in `stm32*_it.c` as well, you might have to check if those definitions are conflicting each other (maybe disable the auto generated version and use the one in the `NetworkInterface.c`). If that’s not the case then I don’t see any reason for having a prototype as its an ISR registered among the external interrupt section of your startup file. Also, please check if `ETH_IRQHandler` is called explicitly somewhere in your project (ideally it shouldn’t be).

> I have also added the NetworkInterface.c and eth.c driver from the demo directory.

Can you share which demo directory is that

---

<div class="post-metadata">

**Author:** ![murali.karicheri](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@murali.karicheri](https://forums.freertos.org/u/murali.karicheri)\
**Post date:** [February 3, 2023, 2:40pm UTC](https://forums.freertos.org/t/building-tcp-ip-stack-for-stm32h745i-disco-board-networkinterface-c-compilation-issue/16677/3 "2023-02-03T14:40:02Z")

</div>

Hi,

Thank you for the quick response!

For `ETH_RX_BUF_SIZE` and `ETH_TX_BUF_SIZE`, I will define them in application layer as per your suggestion.

For ‘ETH\_IRQHandler is not seen’, I am using IAR IDE, not STM32CubeIDE as the demo for STM32H745I-DISCO is using the IAR project. And the driver files are copied from following path in the FreeRTOS zip file that is same as the STM32Hxx readme file you have referenced in your reply. The files are added to the IAR project as per port guide, TCP\_Networking\_Tutorial\_Adding\_Source\_Files.html at the FreeRTOS web page. Fyi, as per forum guideline, I am not allowed to use link in this response as I am a new user.  
Thanks.

---

<div class="post-metadata">

**Author:** ![tony-josi-aws](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@tony-josi-aws](https://forums.freertos.org/u/tony-josi-aws)\
**Post date:** [February 5, 2023, 8:14am UTC](https://forums.freertos.org/t/building-tcp-ip-stack-for-stm32h745i-disco-board-networkinterface-c-compilation-issue/16677/4 "2023-02-05T08:14:44Z")

</div>

Hey @murali.karicheri,

`ETH_IRQHandler` should be visible if your `NetworkInterface.c` is getting compiled, can you make sure if that’s happening (I hope you are using this [NetworkInterface.c](https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/source/portable/NetworkInterface/STM32Hxx/NetworkInterface.c) which has the `ETH_IRQHandler` defined in line 739)

Can you post the error log that you are getting on the IAR here?

Regards,  
Tony
