cancel
Showing results for 
Search instead for 
Did you mean: 

NETXDUO lan8742 added twice to Makefile

stst9180
Associate III

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

 

5 REPLIES 5
STTwo-32
ST Employee

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.

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

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.

Here U R.

This is just a newly created STM32H563VIT6 with NetXDuo and ThreadX enabled and Makefile selected as output.

When generating code, the attached Makefile is the output where lines 46 && 47 show the malicous behaviour.

Best Regards

Pascal

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).

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.