Skip to content

Executing Barebox Via JTAG On RDU2

Chris Healy edited this page Feb 4, 2016 · 5 revisions

Hardware Setup

Before you proceed connect all necessary cables (debug USB, power) and make sure that jumper J17 is shorted and pins 16 and 14 on connector P1 on debug daughter board are shorted as well.

Software Setup

Prerequisites

It is assumed that all of the following steps are going to be executed on a Linux machine with some flavour of GCC ARM toolchain installed. One possible(and very highly recommended) candidate would be 'arm-none-eabi-gcc' from this site.

Building OpenOCD

To build OpenOCD do the following:

$ git clone https://github.com/ndreys/zodiac-openocd.git
$ cd zodiac-openocd
$ git checkout imx6q
$ ./bootstrap
$ ./configure --enable-ftdi
$ make

Executing Barebox

In a standalone terminal session(you'd need to keep OpenOCD running) do the following:

$ cd zodiac-openocd
$ src/openocd -s tcl -f tcl/board/zii-rdu2-with-dcd.cfg

Building Barebox (IRAM boot)

To build Barebox execute following commands:

$ git clone https://github.com/ndreys/zodiac-barebox.git
$ cd zodiac-barebox
$ git checkout imx6-iram
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi zii_imx6q_sram_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi-

Executing Barebox (IRAM boot)

In a separate terminal do the following:

$ cd zodiac-barebox
$ scripts/zii-boot-from-iram.sh

Building Barebox (DDR boot)

To build Barebox execute following commands:

$ git clone https://github.com/ndreys/zodiac-barebox.git
$ cd zodiac-barebox
$ git checkout imx6-iram
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi zii_imx6q_rdu2_defconfig
$ make ARCH=arm CROSS_COMPILE=arm-none-eabi-

Executing Barebox (DDR boot)

In a separate terminal do the following:

$ cd zodiac-barebox
$ scripts/zii-boot-from-ddr.sh

Notes On OpenOCD/GDB Usage

Bear in mind that OpenOCD does not always behave in a very robust manner, so when any JTAG related problem arises try power cycling the board and restarting both GDB and OpenOCD