Forums - QCA4020 HelloWorld Demo Not starting up!

12 posts / 0 new
Last post
QCA4020 HelloWorld Demo Not starting up!
kartik.gupta.dce
Join Date: 19 Jun 18
Posts: 5
Posted: Tue, 2018-06-19 23:09
On Linux ubuntu 14.04: Once I compiled Helloworld demo and flashed it on qca4020 board(flash_openocd.sh) I see no output on /dev/ttyUSB1. 
 
Here is what I am doing: 
Step 1:
I set my enivornment by export the following variables:
 
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
 
Step 2: make prepare
 
Step3: make
 
 
I see a file generated Quartz_HASHED.elf
and if I run:
 
user@ubuntu:/home/user/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc/output$ file Quartz_HASHED.elf 
Quartz_HASHED.elf: ELF 32-bit LSB  executable, ARM, version 1 (SYSV), statically linked, corrupted section header size
 
user@ubuntu:/home/user/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc/output$ arm-none-eabi-readelf -h Quartz_HASHED.elf 
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x100a0021
  Start of program headers:          52 (bytes into file)
  Start of section headers:          0 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         24
  Size of section headers:           0 (bytes)
  Number of section headers:         0
  Section header string table index: 0
 
 
Is this file generated correctly? Why do I see a corrupted section header size?
 
With flashing I was able to install version openocd-0.10.0 and modify flash_openocd.sh to have correct paths and the flashing succeeded. 
 
Why my hello world demo is not running once I remove the jumper for flashing from JTAG?(I should see something on the console?)
 
 
 
 
 
  • Up0
  • Down0
manjulak Moderator
Join Date: 5 Dec 14
Posts: 33
Posted: Wed, 2018-06-20 00:55

Can you please double check jumper positions on your board or attach a picture for us to review?

  • Up0
  • Down0
kartik.gupta.dce
Join Date: 19 Jun 18
Posts: 5
Posted: Wed, 2018-06-20 14:55

Here are the images of the jumpers: 

https://drive.google.com/drive/folders/1nPYIpPweUj8TOxPXkKsM1yKsz-5lQtZO

[ 4 images] 

 

I connect J31 to Pin 1 and Pin 2 : - For Flashing

I disconnect J31 jumper for Console.

  • Up0
  • Down0
manjulak Moderator
Join Date: 5 Dec 14
Posts: 33
Posted: Thu, 2018-06-21 12:03

Jumper positions look good. Can you please try compiling with gcc-arm-none-eabi-6-2017-q2-update and see if you get console output?

  • Up0
  • Down0
mistry Moderator
Join Date: 18 Apr 18
Posts: 56
Posted: Mon, 2018-07-02 15:51
I am trying to compile the Hello world demo and getting the following error: Can you please advise what the issue is? C:\xxxxxxxxxxx\qca4020.or_.1.1_postcs\QCA4020.OR.1.1_PostCS1\target\quartz\demo\Helloworld_demo\build\gcc>build.bat t 4020 cdb **************************************************************************** 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... Traceback (most recent call last): File "..\..\..\..\..\build\scripts\diagMsgCompact.py", line 34, in import elfManipulator.include.elfFileClass as elfFileClass # this is the main ELF manipulator class used in this script File "C:\Users\mistry\Documents\GitHub\Workspace\Demo's\QCA4020\qca4020.or_.1.1_postcs\QCA4020.OR.1.1_PostCS1\target\build\scripts\elfManipulator\include\elfFileClass.py", line 57, in import elfStructs as structs File "C:\Users\mistry\Documents\GitHub\Workspace\Demo's\QCA4020\qca4020.or_.1.1_postcs\QCA4020.OR.1.1_PostCS1\target\build\scripts\elfManipulator\include\elfStructs.py", line 43, in import elfUtils as utils File "C:\Users\mistry\Documents\GitHub\Workspace\Demo's\QCA4020\qca4020.or_.1.1_postcs\QCA4020.OR.1.1_PostCS1\target\build\scripts\elfManipulator\include\elfUtils.py", line 63 except elfManipulatorError as e: ^ SyntaxError: invalid syntax
  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Tue, 2018-07-03 09:57

The issue is due to large working directory path length "C:\Users\mistry\Documents\GitHub\Workspace\Demo's\QCA4020\qca4020.or_.1.1_postcs\QCA4020.OR.1.1_PostCS1\target\"

Could you try to reduce the working directory length and try building the HelloWorld_Demo (C:\Demo's\QCA4020/QCA4020.OR.1.1_PostCS1/target/quartz/demo/Helloworld_demo/build/gcc)

  • Up0
  • Down0
mistry Moderator
Join Date: 18 Apr 18
Posts: 56
Posted: Tue, 2018-07-03 13:22
Thanks, I will try that. But maybe my error was older version of python added to the path. Doing some google searches, i think "except as e:" syntax gives error as it is only backwards compatible with 2.6 and 2.7. Have you guys tested the python scripts on python versions 3.x and above? I am getting different errors when I added path to python version 3.7. build.bat t 4020 cdb 2p0 **************************************************************************** Building Quartz Helloworld Demo for v2 Chipset RTOS threadx CHIPSET VARIANT qca4020 ***************************************************************************** File "..\..\..\..\..\quartz\nvm\tool\NVM2C.py", line 81 print 'NVM parsing error: unexpected tag.' ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print('NVM parsing error: unexpected tag.')? Should I just roll back to python version 2.7 to be safe?
  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Tue, 2018-07-03 14:46

The issue is with Python version 3.7.0

Please rollback to python version 2.7 and try with shorter current directory path.

  • Up0
  • Down0
shujaul.wi2wi
Join Date: 3 Aug 18
Posts: 3
Posted: Fri, 2018-08-03 04:46
'make' is not recognized as an internal or external command,
operable program or batch file.
 
 
 
 
//While giving make prepre command for FREERTOS above message pops out
  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Fri, 2018-08-03 10:51

Could you please check if make is installed on your PC ?

C:\CS1.1_20_7.1\quartz\demo\Helloworld_demo\build\gcc>where make
C:\Utils\Cygwin\bin\make.exe

We have a build batch script to build on windows using freeRTOS

C:\CS1.1_20_7.1\quartz\demo\Helloworld_demo\build\gcc> build.bat f 4020 cdb  

Usage: build.bat [RTOS (FreeRTOS = f, ThreadX = t)] [chipset variant (4020, 4024, 4025)] [board variant (Carrier = c, DUT = d, CDB = cdb)] [chipset revision (1.2 = 1p2, 2.0 = 2p0)] [NVM fi le]

  • Up0
  • Down0
shujaul.wi2wi
Join Date: 3 Aug 18
Posts: 3
Posted: Wed, 2018-08-08 22:10

wi2wi-test2@wi2witest2-HP-EliteBook-8460p:~/Desktop/640ad7/FreeRTOS/qurt/FreeRTOS$ cd 2.0/
wi2wi-test2@wi2witest2-HP-EliteBook-8460p:~/Desktop/640ad7/FreeRTOS/qurt/FreeRTOS/2.0$ ls
640ad7     NUL              qurt_interrupt_asm.S  qurt_rmutex.c  qurt_timer.c
build.bat  output           qurt_interrupt.c      qurt_signal.c  readme.txt
Makefile   qurt_init.c      qurt_pimutex.c        qurt_system.c
Makefile~  qurt_internal.h  qurt_pipe.c           qurt_thread.c
wi2wi-test2@wi2witest2-HP-EliteBook-8460p:~/Desktop/640ad7/FreeRTOS/qurt/FreeRTOS/2.0$ make
Compiling qurt_init.c
mkdir -p output
arm-none-eabi-gcc -c -g -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -mfloat-abi=hard -fno-inline-functions -Os -O3 -fno-zero-initialized-in-bss -std=c99 -fno-short-enums -mapcs-frame -gdwarf-3 -D FEATURE_MUTEX_PI_RECURSIVE -D QURT_THREAD_MAX_PRIORITIES=32 -I. -I../../../~/Desktop/640ad7/FreeRTOS/1.0/FreeRTOS/Demo/QUARTZ -I../../../~/Desktop/640ad7/FreeRTOS/1.0/FreeRTOS/Source/include -I../../../~/Source/include  -c -o output/qurt_init.o qurt_init.c
arm-none-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [qurt_init.o] Error 1

wi2wi-test2@wi2witest2-HP-EliteBook-8460p:~/Desktop/640ad7/FreeRTOS/qurt/FreeRTOS/2.0$
 

//* I got this error while giving make command for FreeRTOS.

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Mon, 2018-08-13 10:56


I have verified the added snippet of printenv and error console, i could observe the issues might be due to ARM toolchain not added in default PATH.

Make sure you have set the below TOOLCHAIN PATHs:

The toolchain can be downloaded from the ARM website at: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
■ Supported version: 6.2


export PATH=$PATH://home/user/Downloads/gcc-arm-none-eabi-6_2-2016q4/bin

export TOOLLIBPATH=/home/user/Downloads/gcc-arm-none-eabi-6_2-2016q4/lib/gcc/arm-none-eabi/6.2.1/thumb/v7e-m/

export NEWLIBPATH=/home/user/Downloads/gcc-arm-none-eabi-6_2-2016q4/arm-none-eabi/lib/thumb/v7e-m/

Please make sure when you us "env" command under PATH variable you should see the ARAM toolchain being included.

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