Skip to main content
stst9180
Associate III
January 3, 2024
Solved

NETXDUO lan8742 added twice to Makefile

  • January 3, 2024
  • 8 replies
  • 2787 views

Dear community,

we're using a Makefile Project with STM32H5xx and NetX Duo using the LAN8742

When the code is generated, CubeMX is adding the line:

.../STM32Cube/Repository/STM32Cube_FW_H5_V1.1.1/Drivers/BSP/Components/lan8742/lan8742.c \

twice to the Makefile which leads to multiple definition errors in Compile.

The line has to be removed by Hand afterwards.

I think this is malicous behaviour here.

Best Regards

Pascal

 

Best answer by STTwo-32

Thanks for bringing this issue to our attention.

I confirm this issue and I've reported internally.

Internal ticket number: 170199 (This is an internal tracking number and is not accessible or usable by customers).

PS: Issue solved on the last release of the STM32CubeMX

Best Regards.

STTwo-32

 

8 replies

STTwo-32
ST Technical Moderator
January 3, 2024

Hello @stst9180 

I can't reproduce this problem. I'm using the last version of the STM32CubeIde (V 1.14.0). and CubeMX (V6.10.0). 

STTwo32_0-1704283644679.png

Can you give more details (screenshots, firmware versions,...) .

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
stst9180
stst9180Author
Associate III
January 3, 2024

I'm using CubeMX 6.1.0 and CubeIDE 1.13.2 but the version of IDE should not matter as bug is already in the cubemx-generated code. Below you see the cubemx configuration part of NETXDUO:

stst9180_0-1704284387419.png

In ProjectManager I selected:

stst9180_1-1704284533328.png

It seems that this one is only appearing in Makefile-Mode. Nevertheless this is needed for our project.
As I don't want to post the whole .ioc file here, I try to figure out the relevant parts:

MxCube.Version=6.10.0
MxDb.Version=DB.6.0.100
NETXDUO.ETH_ON=1
NETXDUO.IPParameters=ETH_ON,LAN_8742
NETXDUO.LAN_8742=1

 

NetXDuo.BSP.number=1
NetXDuo0.BSP.STBoard=false
NetXDuo0.BSP.api=BSP_COMPONENT_DRIVER
NetXDuo0.BSP.component=lan8742
NetXDuo0.BSP.condition=
NetXDuo0.BSP.instance=lan8742
NetXDuo0.BSP.ip=
NetXDuo0.BSP.mode=
NetXDuo0.BSP.name=LAN_Component
NetXDuo0.BSP.semaphore=SEMA_lan8742
NetXDuo0.BSP.solution=lan8742

 

ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false
ProjectManager.CompilerOptimize=6
ProjectManager.ComputerToolchain=false
ProjectManager.CoupleFile=true
ProjectManager.CustomerFirmwarePackage=
ProjectManager.DefaultFWLocation=true
ProjectManager.DeletePrevious=true
ProjectManager.DeviceId=STM32H563VITx
ProjectManager.FirmwarePackage=STM32Cube FW_H5 V1.1.1
ProjectManager.FreePins=false
ProjectManager.HalAssertFull=false
ProjectManager.HeapSize=0x200
ProjectManager.KeepUserCode=true
ProjectManager.LastFirmware=true
ProjectManager.LibraryCopy=1
ProjectManager.MainLocation=Core/Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=STM32CubeIDE
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=BK_SM.ioc
ProjectManager.ProjectName=BK_SM
ProjectManager.ProjectStructure=
ProjectManager.RegisterCallBack=I2C,SPI,TIM,UART,USART
ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=Makefile
ProjectManager.ToolChainLocation=
ProjectManager.UAScriptAfterPath=
ProjectManager.UAScriptBeforePath=
ProjectManager.UnderRoot=false

 

VP_NETXDUO_VS_Crypto.Mode=Crypto
VP_NETXDUO_VS_Crypto.Signal=NETXDUO_VS_Crypto
VP_NETXDUO_VS_EthernetOoPhyOoInterface.Mode=LAN8742_Phy_Interface
VP_NETXDUO_VS_EthernetOoPhyOoInterface.Signal=NETXDUO_VS_EthernetOoPhyOoInterface
VP_NETXDUO_VS_NXOoCore.Mode=NX_Core
VP_NETXDUO_VS_NXOoCore.Signal=NETXDUO_VS_NXOoCore
VP_NETXDUO_VS_NetworkOoInterface.Mode=Ethernet_Interface
VP_NETXDUO_VS_NetworkOoInterface.Signal=NETXDUO_VS_NetworkOoInterface
VP_NETXDUO_VS_TLS.Mode=TLS
VP_NETXDUO_VS_TLS.Signal=NETXDUO_VS_TLS

 

When I now "generate code" the produced Makefile has twice the source file of the network driver:

/home/pascal/STM32Cube/Repository/STM32Cube_FW_H5_V1.1.1/Drivers/BSP/Components/lan8742/lan8742.c \

/home/pascal/STM32Cube/Repository/STM32Cube_FW_H5_V1.1.1/Drivers/BSP/Components/lan8742/lan8742.c \

 

which leads to:

usr/lib/gcc/arm-none-eabi/10.3.1/../../../arm-none-eabi/bin/ld: ../../Build/Release/lan8742.o: in function `LAN8742_RegisterBusIO':

lan8742.c:(.text.LAN8742_RegisterBusIO+0x0): multiple definition of `LAN8742_RegisterBusIO'; ../../Build/Release/lan8742.o:lan8742.c:(.text.LAN8742_RegisterBusIO+0x0): first defined here

 

 

 

Please tell me If I can post more needfull information. If you can't still reproduce I would generate a new project where I can post the corresponding files.

Best Regards Pascal

STTwo-32
ST Technical Moderator
January 3, 2024

It will be better if you share a .ioc file that reproduce this behavior.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.