Build of samples/hello_world for Arduino 101 fails with SDK v0.9 works with SDK v0.8.2


Qiu, PeiyangX <peiyangx.qiu@...>
 

It’s an openocd path issue. SDK0.9 is using x86_64, not i686.
Please try to add the following lines to .zephyrrc if you are using it.

export OPENOCD=${ZEPHYR_SDK_INSTALL_DIR}/sysroots/x86_64-pokysdk-linux/usr/bin/openocd
export OPENOCD_DEFAULT_PATH=${ZEPHYR_SDK_INSTALL_DIR}/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts

-----Original Message-----
From: zephyr-users-bounces@lists.zephyrproject.org [mailto:zephyr-users-bounces@lists.zephyrproject.org] On Behalf Of Nashif, Anas
Sent: Wednesday, March 8, 2017 4:34 PM
To: Kumar Gala <kumar.gala@linaro.org>; A Molina-SW Dev <aamag10-swdev@yahoo.com>
Cc: zephyr-users@lists.zephyrproject.org
Subject: Re: [Zephyr-users] Build of samples/hello_world for Arduino 101 fails with SDK v0.9 works with SDK v0.8.2

Looks like you are still using the 0.8.2 SDK?

On 08/03/2017, 09:33, "zephyr-users-bounces@lists.zephyrproject.org on behalf of Kumar Gala" <zephyr-users-bounces@lists.zephyrproject.org on behalf of kumar.gala@linaro.org> wrote:


> On Mar 8, 2017, at 9:02 AM, A Molina-SW Dev via Zephyr-users <zephyr-users@lists.zephyrproject.org> wrote:
>
>
>
> I was testing out building the v1.6.0 kernel using SDK v0.9 for BOARD=arduino_101 and it failed.
> I was able to build it using the SDK v0.8.2, but it failed to flash via openOCD.
>
> I´m using Ubuntu 16.04.2 LTS 64-bit as build host.
>
> This log shows the build failure with SDK v0.9:
>
>
> =======================================================================================
>
>
> alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ printenv | fgrep ZEPHYR
> ZEPHYR_SDK_INSTALL_DIR=/home/alexm/swdev/zephyr-sdk-0.9
> ZEPHYR_BASE=/home/alexm/swdev/zephyr
> ZEPHYRK_GCC_VARIANT=zephyr
>
> alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ git branch
> * (HEAD detached at v1.6.0)
> master
>
> alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ make O=/home/alexm/swdev/zephyr_build BOARD=arduino_101 flash
>
> Using /home/alexm/swdev/zephyr/boards/x86/arduino_101/arduino_101_defconfig as base
> Merging /home/alexm/swdev/zephyr/kernel/configs/unified.config
> Merging prj.conf
> #
> # configuration written to .config
> #
> make[1]: Entering directory '/home/alexm/swdev/zephyr'
> make[2]: Entering directory '/home/alexm/swdev/zephyr_build'
> GEN ./Makefile
> scripts/kconfig/conf --silentoldconfig Kconfig
> make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
> make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
> /bin/sh: 1: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: not found
> dirname: missing operand
> Try 'dirname --help' for more information.
> make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found

Seems like something isn’t right with your zephyr-sdk-0.9 install. What do you get for:

ls /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu

- k
_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


Nashif, Anas
 

Looks like you are still using the 0.8.2 SDK?

On 08/03/2017, 09:33, "zephyr-users-bounces@lists.zephyrproject.org on behalf of Kumar Gala" <zephyr-users-bounces@lists.zephyrproject.org on behalf of kumar.gala@linaro.org> wrote:


> On Mar 8, 2017, at 9:02 AM, A Molina-SW Dev via Zephyr-users <zephyr-users@lists.zephyrproject.org> wrote:
>
>
>
> I was testing out building the v1.6.0 kernel using SDK v0.9 for BOARD=arduino_101 and it failed.
> I was able to build it using the SDK v0.8.2, but it failed to flash via openOCD.
>
> I´m using Ubuntu 16.04.2 LTS 64-bit as build host.
>
> This log shows the build failure with SDK v0.9:
>
>
> =======================================================================================
>
>
> alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ printenv | fgrep ZEPHYR
> ZEPHYR_SDK_INSTALL_DIR=/home/alexm/swdev/zephyr-sdk-0.9
> ZEPHYR_BASE=/home/alexm/swdev/zephyr
> ZEPHYRK_GCC_VARIANT=zephyr
>
> alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ git branch
> * (HEAD detached at v1.6.0)
> master
>
> alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ make O=/home/alexm/swdev/zephyr_build BOARD=arduino_101 flash
>
> Using /home/alexm/swdev/zephyr/boards/x86/arduino_101/arduino_101_defconfig as base
> Merging /home/alexm/swdev/zephyr/kernel/configs/unified.config
> Merging prj.conf
> #
> # configuration written to .config
> #
> make[1]: Entering directory '/home/alexm/swdev/zephyr'
> make[2]: Entering directory '/home/alexm/swdev/zephyr_build'
> GEN ./Makefile
> scripts/kconfig/conf --silentoldconfig Kconfig
> make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
> make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
> /bin/sh: 1: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: not found
> dirname: missing operand
> Try 'dirname --help' for more information.
> make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found

Seems like something isn’t right with your zephyr-sdk-0.9 install. What do you get for:

ls /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu

- k
_______________________________________________
Zephyr-users mailing list
Zephyr-users@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-users


Kumar Gala
 

On Mar 8, 2017, at 9:02 AM, A Molina-SW Dev via Zephyr-users <zephyr-users@lists.zephyrproject.org> wrote:



I was testing out building the v1.6.0 kernel using SDK v0.9 for BOARD=arduino_101 and it failed.
I was able to build it using the SDK v0.8.2, but it failed to flash via openOCD.

I´m using Ubuntu 16.04.2 LTS 64-bit as build host.

This log shows the build failure with SDK v0.9:


=======================================================================================


alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ printenv | fgrep ZEPHYR
ZEPHYR_SDK_INSTALL_DIR=/home/alexm/swdev/zephyr-sdk-0.9
ZEPHYR_BASE=/home/alexm/swdev/zephyr
ZEPHYRK_GCC_VARIANT=zephyr

alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ git branch
* (HEAD detached at v1.6.0)
master

alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ make O=/home/alexm/swdev/zephyr_build BOARD=arduino_101 flash

Using /home/alexm/swdev/zephyr/boards/x86/arduino_101/arduino_101_defconfig as base
Merging /home/alexm/swdev/zephyr/kernel/configs/unified.config
Merging prj.conf
#
# configuration written to .config
#
make[1]: Entering directory '/home/alexm/swdev/zephyr'
make[2]: Entering directory '/home/alexm/swdev/zephyr_build'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
/bin/sh: 1: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
Seems like something isn’t right with your zephyr-sdk-0.9 install. What do you get for:

ls /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu

- k


Alex Molina
 

I was testing out building the v1.6.0 kernel using SDK v0.9 for BOARD=arduino_101 and it failed.
I was able to build it using the SDK v0.8.2, but it failed to flash via openOCD.

I´m using Ubuntu 16.04.2 LTS 64-bit as build host.

This log shows the build failure with SDK v0.9:


=======================================================================================


alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ printenv | fgrep ZEPHYR
ZEPHYR_SDK_INSTALL_DIR=/home/alexm/swdev/zephyr-sdk-0.9
ZEPHYR_BASE=/home/alexm/swdev/zephyr
ZEPHYRK_GCC_VARIANT=zephyr

alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ git branch
* (HEAD detached at v1.6.0)
master

alexm@ubu1504:~/swdev/zephyr/samples/hello_world$ make O=/home/alexm/swdev/zephyr_build BOARD=arduino_101 flash

Using /home/alexm/swdev/zephyr/boards/x86/arduino_101/arduino_101_defconfig as base
Merging /home/alexm/swdev/zephyr/kernel/configs/unified.config
Merging prj.conf
#
# configuration written to .config
#
make[1]: Entering directory '/home/alexm/swdev/zephyr'
make[2]: Entering directory '/home/alexm/swdev/zephyr_build'
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
/bin/sh: 1: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: not found
dirname: missing operand
Try 'dirname --help' for more information.
make[2]: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: Command not found
Using /home/alexm/swdev/zephyr as source for kernel
GEN ./Makefile
CHK include/generated/version.h
UPD include/generated/version.h
HOSTCC scripts/gen_idt/gen_idt.o
HOSTLD scripts/gen_idt/gen_idt
CHK misc/generated/configs.c
UPD misc/generated/configs.c
/bin/sh: 1: /home/alexm/swdev/zephyr-sdk-0.9/sysroots/i686-pokysdk-linux/usr/bin/iamcu-poky-elfiamcu/i586-poky-elfiamcu-gcc: not found
/home/alexm/swdev/zephyr/./Kbuild:103: recipe for target 'arch/x86/core/offsets/offsets.o' failed
make[3]: *** [arch/x86/core/offsets/offsets.o] Error 127
/home/alexm/swdev/zephyr/Makefile:996: recipe for target 'prepare' failed
make[2]: *** [prepare] Error 2
make[2]: Leaving directory '/home/alexm/swdev/zephyr_build'
Makefile:175: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/home/alexm/swdev/zephyr'
/home/alexm/swdev/zephyr/Makefile.inc:99: recipe for target 'flash' failed
make: *** [flash] Error 2


===================================================================================

This is a partial log after I switched to SDK v0.8.2, which built zephyr.bin, but failed to flash it.
LINK zephyr.elf
BIN zephyr.bin
Flashing arduino_101
Flashing Target Device
Open On-Chip Debugger 0.9.0-dirty (2016-08-02-16:04)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
adapter speed: 1000 kHz
trst_only separate trst_push_pull
jtag_ntrst_delay: 300
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Flyswatter2' and serial '*'

======================================================================================================

Am I missing some settings for SDK v0.9 and openOCD to work?

Alex Molina
aamag10-swdev@yahoo.com