Enable studio IDE to compile drv_eth.c (RT thread 4.0.3)

Created at 2021-10-06 16:53:53

Hey,

I've tried to follow the guide that is mentioned on the site:
https://www.rt-thread.io/document/site/rtthread-studio/drivers/eth/rtthread-studio-eth/#use-network

But I cannot simply get the studio environment(4.1.12) to acknowledge that it should start compiling/include drv_eth.c in the environment.
I am using a STM32H747-DISC0 board and if choosing "base on board" I am only given the choice to use the latest RT thread(i.e. 4.0.3), but the guide itself refers to 4.0.2 and with using this version and choosing the MCU itself then it is possible to get drv_eth to compile.

Is there a known issue between these two versions with regards to this?

更多

Follower
0
Views
509
3 Answers
Rekor
Rekor 2021-10-11

Solved the issue.
I needed to manually remove specific files from exclusion inside the ".cproject" file.
image.png

rcp
rcp 2021-10-09

try the latest version of RT-Thread Studio V2.1.2

Rekor
Rekor 2021-10-20

Additional update when trying to do it the proper way as it probably should be intended.

1)Add macro definitions in rtconfig.h
In my example:

#define HAL_ETH_MODULE_ENABLED
#define BSP_USING_ETH
#ifdef BSP_USING_ETH
#define PHY_USING_LAN8720A /* Same registers as 8742A */
#endif

2) Right click the entire project folder and click "Packages Update".
The drv_eth.c, stm32h7xx_hal_eth.c and stm32h7xx_hal_eth_ex.c should now also be compiled.

Write Your Answer

Log in to publish your answer,Click here to log in.

Create
Post

Share