在线时间24 小时
UID3266726
ST金币84
蝴蝶豆3
注册时间2016-4-28
该用户从未签到
中级会员
- 最后登录
- 2020-5-30
|
楼主 |
发表于 2017-3-16 21:31:59
|
显示全部楼层
1年了。
当时项目开发时间紧,耗不起。最后采用了DP83848方案。
这两天同事又拿出来这个LAN8720A。结果……
不小心升级了软件到最新版:
STM32CubeMX Software V4.20.0 / 28 February 2017
STM32CubeF4 Firmware Package V1.15.0 / 17-February-2017
生成的芯片默认是LAN8720A了!如果选择外部中断,编译会出现提示:
- HandleTypeDef *heth)
- ^
- ../Src/ethernetif.c: In function 'low_level_output':
- ../Src/ethernetif.c:346:45: warning: unused parameter 'netif' [-Wunused-parameter]
- static err_t low_level_output(struct netif *netif, struct pbuf *p)
- ^
- ../Src/ethernetif.c: In function 'low_level_input':
- ../Src/ethernetif.c:430:52: warning: unused parameter 'netif' [-Wunused-parameter]
- static struct pbuf * low_level_input(struct netif *netif)
- ^
- ../Src/ethernetif.c: In function 'ethernetif_set_link':
- ../Src/ethernetif.c:665:38: error: 'PHY_MISR' undeclared (first use in this function)
- HAL_ETH_ReadPHYRegister(&heth, PHY_MISR, ®value);
- ^
- ../Src/ethernetif.c:665:38: note: each undeclared identifier is reported only once for each function it appears in
- ../Src/ethernetif.c:668:22: error: 'PHY_LINK_INTERRUPT' undeclared (first use in this function)
- if((regvalue & PHY_LINK_INTERRUPT) != (uint16_t)RESET)
- ^
- ../Src/ethernetif.c:674:24: error: 'PHY_LINK_STATUS' undeclared (first use in this function)
- if((regvalue & PHY_LINK_STATUS)!= (uint16_t)RESET)
- ^
- ../Src/ethernetif.c: In function 'ethernetif_notify_conn_changed':
- ../Src/ethernetif.c:788:58: warning: unused parameter 'netif' [-Wunused-parameter]
- __weak void ethernetif_notify_conn_changed(struct netif *netif)
- ^
- Src/subdir.mk:57: recipe for target 'Src/ethernetif.o' failed
- make: *** [Src/ethernetif.o] Error 1
复制代码
如果注释掉,仍然有问题:
- Building file: ../Src/main.c
- Invoking: Cross ARM GNU C Compiler
- arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra -g3 -DDEBUG -DUSE_FULL_ASSERT -DTRACE -DOS_USE_TRACE_SEMIHOSTING_DEBUG -DSTM32F407xx -DUSE_HAL_DRIVER -DHSE_VALUE=8000000 -I"../Inc" -I"../startup" -I"../system/Inc" -I"../Drivers/CMSIS/Include" -I"../Drivers/CMSIS/Device/ST/STM32F4xx/Include" -I"../Drivers/STM32F4xx_HAL_Driver/Inc" -I"../Middlewares/Third_Party/LwIP/system" -I"../Middlewares/Third_Party/FatFs/src" -I"../Middlewares/Third_Party/LwIP/src/include" -I"../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"../Middlewares/Third_Party/FreeRTOS/Source/include" -I"../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS" -I"../Middlewares/Third_Party/LwIP/system/arch" -I"../Middlewares/Third_Party/LwIP/src/include/lwip" -I"../Middlewares/Third_Party/LwIP/src/include/netif" -I"../Middlewares/Third_Party/LwIP/src/include/posix" -I"../Middlewares/Third_Party/LwIP/src/include/posix/sys" -I"../Middlewares/Third_Party/LwIP/src/netif/ppp" -std=gnu11 -MMD -MP -MF"Src/main.d" -MT"Src/main.o" -c -o "Src/main.o" "../Src/main.c"
- ../Src/main.c:204:36: error: unknown type name 'TIM_HandleTypeDef'
- void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
- ^
- ../Src/main.c: In function 'assert_failed':
复制代码
看来这个版本的软件系统秉承一贯的粗糙风格,太不稳定了。
无语——
直接选择的CPU 407,SYS选择Tim4 |
|