Closed nopnop2002 closed 4 years ago
Hi @nopnop2002
the issue is that the HAL_ETH_MODULE_ENABLED
is not defined by default for this board (I guess you use the DIYMROE_F407VGT.
You can enable it by adding a hal_conf_extra.h
file at sketch level with:
#define HAL_ETH_MODULE_ENABLED
Yes. I'm using DIYMROE_F407VGT.
I added hal_conf_extra.h file in sketch folder.
But these error occure:
Warning: Board atmega644_1284:avr:avrmega644p doesn't define a 'build.board' preference. Auto-set to: AVR_AVRMEGA644P
Warning: Board atmega644_1284:avr:avrmega644p16 doesn't define a 'build.board' preference. Auto-set to: AVR_AVRMEGA644P16
Warning: Board atmega644_1284:avr:avrmega1284p doesn't define a 'build.board' preference. Auto-set to: AVR_AVRMEGA1284P
Warning: Board atmega644_1284:avr:avrmega1284p16 doesn't define a 'build.board' preference. Auto-set to: AVR_AVRMEGA1284P16
Warning: Board atmega64:avr:memduino64_8MHz doesn't define a 'build.board' preference. Auto-set to: AVR_MEMDUINO64_8MHZ
�T�u�f�B���N�g���܂��̓t�@�C�� sketch �͊��ɑ��݂��܂��B
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\STM32Ethernet-master\utility\ethernetif.c.o: in function `low_level_output':
ethernetif.c:(.text.low_level_output+0x1e): undefined reference to `HAL_ETH_TransmitFrame'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\STM32Ethernet-master\utility\ethernetif.c.o: in function `ethernetif_input':
ethernetif.c:(.text.ethernetif_input+0xa): undefined reference to `HAL_ETH_GetReceivedFrame_IT'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\STM32Ethernet-master\utility\ethernetif.c.o: in function `ethernetif_init':
ethernetif.c:(.text.ethernetif_init+0x3a): undefined reference to `HAL_ETH_Init'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_init+0x54): undefined reference to `HAL_ETH_DMATxDescListInit'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_init+0x60): undefined reference to `HAL_ETH_DMARxDescListInit'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_init+0xa2): undefined reference to `HAL_ETH_Start'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_init+0xac): undefined reference to `HAL_ETH_ReadPHYRegister'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_init+0xbc): undefined reference to `HAL_ETH_WritePHYRegister'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\STM32Ethernet-master\utility\ethernetif.c.o: in function `ethernetif_set_link':
ethernetif.c:(.text.ethernetif_set_link+0xe): undefined reference to `HAL_ETH_ReadPHYRegister'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_set_link+0x24): undefined reference to `HAL_ETH_ReadPHYRegister'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: libraries\STM32Ethernet-master\utility\ethernetif.c.o: in function `ethernetif_update_config':
ethernetif.c:(.text.ethernetif_update_config+0x20): undefined reference to `HAL_ETH_WritePHYRegister'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_update_config+0x32): undefined reference to `HAL_ETH_ReadPHYRegister'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_update_config+0x50): undefined reference to `HAL_ETH_ReadPHYRegister'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_update_config+0x74): undefined reference to `HAL_ETH_ConfigMAC'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_update_config+0x7a): undefined reference to `HAL_ETH_Start'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_update_config+0x98): undefined reference to `HAL_ETH_WritePHYRegister'
c:/users/user/documents/arduinodata/packages/stm32/tools/arm-none-eabi-gcc/8.2.1-1.7/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe: ethernetif.c:(.text.ethernetif_update_config+0xa0): undefined reference to `HAL_ETH_Stop'
collect2.exe: error: ld returned 1 exit status
exit status 1
So i re-start Arduino-ide. There is no compile error.
I wrote a sketch on DIYMROE_F407VGT.
I will review my connection.
Right you have to restart because arduino does not see change.... So this is ok now?
I'm using DIYMROE_F407VGT + LAN8720, I referred this page.
https://os.mbed.com/users/hudakz/code/STM32F407VET6_Hello/shortlog/
In Ethernet.begin, it repeat Link Up. And finally become failed.
Well hard to tell what's going wrong. I never test with this module, will try to find one but don't know when. You will have to try to debug on your side.
Hello.
The problem has not been solved yet, but I will close this issue. What do you think? ?
Original issue is solved. Currently this Library support LAN8742A so mabe some update required to support the LAN8720. You can try to see if the PHY configuration section is aligned with this: https://github.com/stm32duino/Arduino_Core_STM32/blob/85fd492c15a87048086e7e82318c555fb6410a41/system/STM32F4xx/stm32f4xx_hal_conf_default.h#L233-L273
I changed stm32f4xx_hal_conf_default.h to this: It work fine!!.
/* Section 2: PHY configuration section */
/* LAN8742A PHY Address*/
//#define LAN8742A_PHY_ADDRESS 0x00U
#define LAN8742A_PHY_ADDRESS 0x01U
Eventually I changed to this:
at Documents\ArduinoData\packages\STM32\hardware\stm32\1.6.1\system\STM32F4xx
/* Section 2: PHY configuration section */
#if !defined (LAN8742A_PHY_ADDRESS)
/* LAN8742A PHY Address*/
#define LAN8742A_PHY_ADDRESS 0x00U
#endif
at sketch level
#define HAL_ETH_MODULE_ENABLED
#define LAN8742A_PHY_ADDRESS 0x01U
I did PR. Please see here https://github.com/stm32duino/Arduino_Core_STM32/pull/581
Thank you for your help.
Track in #34
I'm try to compile this on Generic STM32F4 Series.
I installed these.
https://github.com/stm32duino/STM32Ethernet
https://github.com/stm32duino/LwIP
But compile error occure. This is compile options.
Do you have any advice.