Forums - Problem linking WLAN binary file with new SDK

8 posts / 0 new
Last post
Problem linking WLAN binary file with new SDK
Foong
Join Date: 30 Aug 18
Posts: 15
Posted: Tue, 2018-09-11 00:56

Hi Raja,

I have downloaded the lastest SDK and have tried to create and build an application project using QCA402x_plugin.jar in Eclipse.

The compilation seems ok, however it has problem linking the WLAN binary file. Following is the log of the entire build process:

15:52:01 **** Build of configuration t_20_cdb_2p0 for project node_ble_firmware ****
build.bat t 4020 cdb 2p0 
****************************************************************************
Building Quartz Helloworld Demo for v2 Chipset
RTOS             threadx
CHIPSET VARIANT  qca4020
*****************************************************************************
Exporting Device config files....
GENERATING DEVCFG....
Building hello_world.c
Building pal\pal.c
Building export\platform_oem.c
Building export\platform_oem_som.c
Building export\platform_oem_mom.c
Building export\DALConfig_devcfg.c
Building export\DALConfig_fom.c
Building export\devcfg_devcfg_data.c
Building export\devcfg_fom_data.c
Building export\UsrEDL.c
Attempting to convert windows paths: output\LinkerLibs.txt
Generating Linker Scripts...
Linking...
../../../../../lib/cortex-m4IPT/threadx/WLAN_QAPI.lib(qapi_wlan_base.o): In function `qapi_WLAN_Enable':
/local/mnt/workspace/CRMBuilds/CNSS_W.QZ.2.0-00048-QZHW-1_20180618_144528/b/ioesw_proc/wlan_host/qapi/common/qapi_wlan_base.c:(.text+0x10ca): undefined reference to `cust_wlan_lib_attach'
/local/mnt/workspace/CRMBuilds/CNSS_W.QZ.2.0-00048-QZHW-1_20180618_144528/b/ioesw_proc/wlan_host/qapi/common/qapi_wlan_base.c:(.text+0x10dc): undefined reference to `cust_wlan_lib_detach'
arm-none-eabi-ld: output\Quartz_nocompact.elf: hidden symbol `cust_wlan_lib_detach' isn't defined
arm-none-eabi-ld: final link failed: Bad value
Usage: python diagMsgCompact.py <Output ELF> <Output string database File> <Input ELF> <input pickle file> <CompactType: Intermediate or Final>
 
diagMsgCompact.py: error: Specified ELF file does not exist.
Hashing...
Traceback (most recent call last):
  File "..\..\..\..\..\build\scripts\createxbl.py", line 708, in <module>
    main()
  File "..\..\..\..\..\build\scripts\createxbl.py", line 234, in main
    zi_oob_enabled)
  File "..\..\..\..\..\build\scripts\createxbl.py", line 296, in merge_elfs
    mbn_tools.preprocess_elf_file(elf_in_file_name1) 
  File "D:\Projects\Sources\QCA402x\QCA4020.OR.2.0_00048\target\build\scripts\mbn_tools.py", line 1995, in preprocess_elf_file
    elf_fp = OPEN(elf_file_name, 'rb')
  File "D:\Projects\Sources\QCA402x\QCA4020.OR.2.0_00048\target\build\scripts\mbn_tools.py", line 2197, in OPEN
    raise RuntimeError, "The file could not be opened: " + file_name
RuntimeError: The file could not be opened: output\Quartz.elf
 
15:54:42 Build Failed. 2 errors, 0 warnings. (took 2m:40s.658ms)

Is there any settings needs to be configured? Please advice if I have missed out anything.

Look forward to your reply! Thank you.

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Tue, 2018-09-11 12:16

I tried locally and didn't see any issue.

Please restart the Eclipse and try building the demo again.
Kindly confirm you have followed the instructions listed in 80-YA121-140 QCA402x Development Kit User Guide.
Also, confirm the issue is seen with any other demos.

  • Up0
  • Down0
Foong
Join Date: 30 Aug 18
Posts: 15
Posted: Wed, 2018-09-12 02:47

Hi Raja,

Thanks for your prompt response.

I have followed the Development Kit Guide, and still have the same error. But for other example projects in the SDK, such as Helloworld_demo, Onboard_demo, etc, I have no problem building them. Only the new project that I have created using QCA402x_plugins.jar has the WLAN linking problem.

There's one thing I have noticed from the log is that the "local/mnt/..." directory.

15:52:01 **** Build of configuration t_20_cdb_2p0 for project node_ble_firmware ****
build.bat t 4020 cdb 2p0 
****************************************************************************
Building Quartz Helloworld Demo for v2 Chipset
RTOS             threadx
CHIPSET VARIANT  qca4020
*****************************************************************************
Exporting Device config files....
GENERATING DEVCFG....
Building hello_world.c
Building pal\pal.c
Building export\platform_oem.c
Building export\platform_oem_som.c
Building export\platform_oem_mom.c
Building export\DALConfig_devcfg.c
Building export\DALConfig_fom.c
Building export\devcfg_devcfg_data.c
Building export\devcfg_fom_data.c
Building export\UsrEDL.c
Attempting to convert windows paths: output\LinkerLibs.txt
Generating Linker Scripts...
Linking...
../../../../../lib/cortex-m4IPT/threadx/WLAN_QAPI.lib(qapi_wlan_base.o): In function `qapi_WLAN_Enable':
/local/mnt/workspace/CRMBuilds/CNSS_W.QZ.2.0-00048-QZHW-1_20180618_144528/b/ioesw_proc/wlan_host/qapi/common/qapi_wlan_base.c:(.text+0x10ca): undefined reference to `cust_wlan_lib_attach'
/local/mnt/workspace/CRMBuilds/CNSS_W.QZ.2.0-00048-QZHW-1_20180618_144528/b/ioesw_proc/wlan_host/qapi/common/qapi_wlan_base.c:(.text+0x10dc): undefined reference to `cust_wlan_lib_detach'
arm-none-eabi-ld: output\Quartz_nocompact.elf: hidden symbol `cust_wlan_lib_detach' isn't defined
arm-none-eabi-ld: final link failed: Bad value
Usage: python diagMsgCompact.py <Output ELF> <Output string database File> <Input ELF> <input pickle file> <CompactType: Intermediate or Final>
 
diagMsgCompact.py: error: Specified ELF file does not exist.
Hashing...
Traceback (most recent call last):
  File "..\..\..\..\..\build\scripts\createxbl.py", line 708, in <module>
    main()
  File "..\..\..\..\..\build\scripts\createxbl.py", line 234, in main
    zi_oob_enabled)
  File "..\..\..\..\..\build\scripts\createxbl.py", line 296, in merge_elfs
    mbn_tools.preprocess_elf_file(elf_in_file_name1) 
  File "D:\Projects\Sources\QCA402x\QCA4020.OR.2.0_00048\target\build\scripts\mbn_tools.py", line 1995, in preprocess_elf_file
    elf_fp = OPEN(elf_file_name, 'rb')
  File "D:\Projects\Sources\QCA402x\QCA4020.OR.2.0_00048\target\build\scripts\mbn_tools.py", line 2197, in OPEN
    raise RuntimeError, "The file could not be opened: " + file_name
RuntimeError: The file could not be opened: output\Quartz.elf
 
15:54:42 Build Failed. 2 errors, 0 warnings. (took 2m:40s.658ms)

Please advise me anything that I can look on. Thank you very much in adcance!

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Wed, 2018-09-12 13:52

But for other example projects in the SDK, such as Helloworld_demo, Onboard_demo, etc, I have no problem building them.
> I assume you are able to build other project using the latest SDK with plugin from QDN.

Only the new project that I have created using QCA402x_plugins.jar has the WLAN linking problem.
> Is this user defined project or created a new project and imported the helloworld demo.

If seems strange why you are still observing the linking issue. You can skip those libraries and build the HelloWorld Demo.
Kindly edit the build.bat and comment below libraries.

SET Libs=!Libs! "%LibDir%\wlan_lib_common_xip.lib"
SET Libs=!Libs! "%LibDir%\cust_wlan_lib.lib"

Delete all the existing projects, restart the eclipse IDE.
Download latest SDK from QDN and run the eclipse support batch scipt.
Open a new project and import the HelloWorld Demo and build the project.
Check if linking error is seen using QCLI_demo and Onboard_demo with latest SDK.

  • Up0
  • Down0
Foong
Join Date: 30 Aug 18
Posts: 15
Posted: Thu, 2018-09-13 23:48

Hi Raja,

Both the projects are using the latest SDK from QDN. The first project, let's call it Firmware_Demo is created through Eclipse (File > New > Other > QCA Chipset > QCA402x Project > ...), and the second project, i.e. Helloworld_Demo is the example project included in the same SDK.

I found out that the build.bat in Firmware_Demo does not have the following two lines:

SET Libs=!Libs! "%LibDir%\wlan_lib_common_xip.lib"
SET Libs=!Libs! "%LibDir%\cust_wlan_lib.lib"

But for the Helloworld_Demo, the above two lines can be found.

So i tried to copy over the build.bat file in Helloworld_Demo to replace that in Firmware_Demo, the compilation has no error. So now I have another concern, is the build.bat file in Helloworld_Demo compatible with Firmware_Demo?

Look forward to your reply!

 

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Fri, 2018-09-14 11:08

The default project created through Eclipse Firmware_Demo should be same as HelloWorld Demo, hence both the build.bat files should be identical and compatible. 
If you find some linking issues while building the default project, you can copy the build script from the Helloworld_Demo .
However, we will work on it and provide an update soon by resolving default project linking issue.

  • Up0
  • Down0
Foong
Join Date: 30 Aug 18
Posts: 15
Posted: Tue, 2018-09-18 22:42

Hi Raja,

Thanks a lot for the update.

Also, I noticed that the default project is missing some of the required files to perform flashing or debugging, e.g. flash_opencd.bat, qca402x_openocd.cfg, etc.

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Thu, 2018-09-20 12:20

The Sample project created will be an example of how to configure  the structure.
Export the list of demos to verify the full functionality of the SDK.
 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.