I downloaded the SDK and Onboard demo failed to compile.
Here is my environment flags.
user@ubuntu:/home/user/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc$ export CHIPSET_VARIANT=qca4020
user@ubuntu:/home/user/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc$ export RTOS=threadx
user@ubuntu:/home/user/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc$ export BOARD_VARIANT=cdb
user@ubuntu:/home/user/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc$ export ECOSYSTEM=offline
user@ubuntu:/home/user/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc$ make prepare
##############################################################################
Starting build for Quartz Onboard Application
##############################################################################
Build Parameters:
RTOS = threadx
Variant = qca4020
Board = cdb
Revision = 2p0
##############################################################################
cp -u -v ../../../../../quartz/platform/export/platform_oem.h ../../src/export
cp -u -v ../../../../../quartz/platform/export/platform_oem.c ../../src/export
cp -u -v ../../../../../quartz/platform/export/platform_oem_mom.c ../../src/export
cp -u -v ../../../../../quartz/platform/export/platform_oem_som.c ../../src/export
cp -u -v ../../../../../build/tools/devcfg/threadx/DevCfg_master_devcfg_out.xml ../../src/export
cp -u -v ../../../../../build/tools/devcfg/threadx/DevCfg_master_devcfg_out_cdb.xml ../../src/export
cp -u -v ../../../../../build/tools/devcfg/threadx/DevCfg_master_fom_out.xml ../../src/export
cp -u -v ../../../../../build/tools/devcfg/threadx/DevCfg_master_fom_out_cdb.xml ../../src/export
user@ubuntu$:/home/user/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Onboard_demo/build/gcc$ sh build.sh 1 1
Selected Onboarding mode is BLE
Selected Radio is ZIGBEE
offline Demo Building started
rm -rf output
##############################################################################
Starting build for Quartz Onboard Application
##############################################################################
Build Parameters:
RTOS = threadx
Variant = qca4020
Board = cdb
Revision = 2p0
...
..
....
....
....
...
...
...
...
Compiling ../../src/sensors/sensor_json.c output/objs/sensors/sensor_json.o
arm-none-eabi-gcc -c -g -mcpu=cortex-m4 -mthumb -fno-short-enums -O2 -Os -ffunction-sections -Wall -D WLAN_DEBUG -D ENABLE_P2P_MODE -D ONBOARD_VIA_WIFI -D ZIGBEE -D SUPPORTED_MODE=1 "-D CHIPSET_VARIANT=\"qca4020\"" "-D RTOS=\"threadx\"" "-D BOARD_SUPPORTS_WIFI=1" "-D V2" "-D qurt_mutex_init(x)=qurt_mutex_create(x)" "-D qurt_mutex_destroy(x)=qurt_mutex_delete(x)" "-D qurt_signal_init(x)=qurt_signal_create(x)" "-D qurt_signal_destroy(x)=qurt_signal_delete(x)" "-D FEATURE_QUARTZ_V2" "-D CONFIG_CDB_PLATFORM" "-D JSMN_PARENT_LINKS=1" "-D OFFLINE" "-D ENABLE_DIMMER=1" -I"../../../../../include" -I"../../../../../thirdparty/aws/awsiot/include" -I"../../../../../quartz/ecosystem/aws/port/include" -I"../../../../../include/qapi" -I"../../../../../include/bsp" -I"../../src/qcli" -I"../../src/include" -I"../../src/ecosystem/aws" -I"../../src/zigbee/clusters" -I"../../src/sensors" -I"../../../../../thirdparty/jsmn/include" -I"../../../../../core/v2" -D_WANT_IO_C99_FORMATS -D __FILENAME__=\"../../src/sensors/sensor_json.c\" ../../src/sensors/sensor_json.c -o output/objs/sensor_json.o
../../src/sensors/sensor_json.c:25:18: fatal error: jsmn.h: No such file or directory
#include "jsmn.h"
^
compilation terminated.
make: *** [output/objs/sensors/sensor_json.o] Error 1
What is missing? Why am I having such a problem? Please help.
Can you please try with steps listed in section 2.3 (Prerequisites to build in standalone/without cloud mode) in 80-YA121-140 (QCA402x (CDB2x) Development Kit User Guide) document.
Now I am getting the following error.
Can you please confirm if you downloaded GNU embedded toolchain on your PC and set the path appropriately? Please take a look at section 6.2 in 80-YA121-140 document.
Yes, It is on correct path and I did download it from arm website: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
Here is the path and is correctly set:
We are not able to replicate this issue. Tried on both Ubuntu16.04 and 14.04. Can you please give us details about your PC?
Can you please also try with toolchain version 6.x (gcc-arm-none-eabi-6-2017-q2-update) .
I am also facing similar problems. During the linking stage, the following error appeared:
arm-none-eabi-ld: cannot find -lc_nano
arm-none-eabi-ld: cannot find -lnosys
arm-none-eabi-ld: cannot find -lgcc
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 "C:\Users\User\Desktop\QCA4020.OR.3.0_00011.1\target\build\scripts\mbn_tools.py", line 1995, in preprocess_elf_file
elf_fp = OPEN(elf_file_name, 'rb')
File "C:\Users\User\Desktop\QCA4020.OR.3.0_00011.1\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
What seems to be the problem?
and yes I am using 6 2017-q2-update toolchain. The Path is as follows:
C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin
Should i include
C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\arm-none-eabi\bin
?
The issue is due to PATH not able to find the arm-none-eabi-ld tool chain.
Kindly include the below LIBPATHS along with existing PATH and try again:
Example:
If ARM GNU toolchain is installed under C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\
set path as follows.
TOOLLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\lib\gcc\arm-none-eabi\6.3.1\thumb\v7e-m NEWLIBPATH=C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\arm-none-eabi\lib\thumb\v7e-m
The original problem of jsmn.h not found in this thread occures due to incorrect include path provided in SDK by Qualcomm. Qualcomm SDK tries to find jsmn.h file in target/thirdparty/external_libs/jsmn directory but actually its located at /target/thirdparty/aws/awsiot/external_libs/jsmn.
To solve the problem, create external_libs directory in thirdparty directory and copy jsmn directory there from awsiot/external_libs. That should resolve your problem.