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?)
Can you please double check jumper positions on your board or attach a picture for us to review?
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.
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?
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)
The issue is with Python version 3.7.0
Please rollback to python version 2.7 and try with shorter current directory path.
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]
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.
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.