eth190\eth190.axf: Error: L6218E: Undefined symbol HAL_ETH_BuildRxDescriptors (referred from ethernetif.o).
eth190\eth190.axf: Error: L6218E: Undefined symbol HAL_ETH_DescAssignMemory (referred from ethernetif.o).
eth190\eth190.axf: Error: L6218E: Undefined symbol HAL_ETH_GetRxDataBuffer (referred from ethernetif.o).
eth190\eth190.axf: Error: L6218E: Undefined symbol HAL_ETH_GetRxDataLength (referred from ethernetif.o).
eth190\eth190.axf: Error: L6218E: Undefined symbol HAL_ETH_IsRxDataAvailable (referred from ethernetif.o).
和警告:
../LWIP/Target/ethernetif.c(308): warning: #223-D: function "HAL_ETH_DescAssignMemory" declared implicitly
HAL_ETH_DescAssignMemory(&heth, idx, Rx_Buff[idx], NULL);
../LWIP/Target/ethernetif.c(412): warning: #223-D: function "HAL_ETH_IsRxDataAvailable" declared implicitly
if (HAL_ETH_IsRxDataAvailable(&heth))
../LWIP/Target/ethernetif.c(414): warning: #223-D: function "HAL_ETH_GetRxDataBuffer" declared implicitly
HAL_ETH_GetRxDataBuffer(&heth, RxBuff);
../LWIP/Target/ethernetif.c(415): warning: #223-D: function "HAL_ETH_GetRxDataLength" declared implicitly
HAL_ETH_GetRxDataLength(&heth, &framelength);
../LWIP/Target/ethernetif.c(418): warning: #223-D: function "HAL_ETH_BuildRxDescriptors" declared implicitly
HAL_ETH_BuildRxDescriptors(&heth);
../LWIP/Target/ethernetif.c: 5 warnings, 0 errors
在生成的代码中,有一些编译器不知道的函数,告诉我我需要自己获取定义这些函数的 HAL 库的版本/还有一些其他的解决方案代码参考:
if (HAL_ETH_IsRxDataAvailable(&heth))
{
HAL_ETH_GetRxDataBuffer(&heth, RxBuff);
HAL_ETH_GetRxDataLength(&heth, &framelength);
/* Build Rx descriptor to be ready for next data reception */
HAL_ETH_BuildRxDescriptors(&heth);