To get the rotating tiger first you need:
The following SW:
- MQX 4.0.2 EAR1
- vf600 OpenVG 0.4.0
- Uboot Image... I am using: U-Boot 2011.12-00548-gd2215dc-dirty (Mar 26 2013 - 16:59:44)
- CodeSourcery GCC compiler: Sourcery CodeBench Lite Edition - Mentor Graphics
- (Download the EABI release: EABI Release Sourcery CodeBench Lite 2012.03-56)
Note: at this initial state, Bill Krakar can provide access to the OpenVG release and uboot binary.
The following HW:
- Vybrid 1.1 with L2 Cache enabled
- SD Card
- AutoEVB Rev C
- serial console
- Display monitor with DVI input and DVI cable
Building the executable:
Build MQX 4.0.2 EAR1
1. edit mqx/source/bsp/vybrid_autoevb_a5/init_bsp.c, change __EXTERNAL_DDRAM_SIZE to 0x800000
2. cd build/vybrid_autoevb_a5/make
3. TOOL=gcc_cs CONFIG=debug TOOLCHAIN_ROOTDIR=$your_cs_install_path/Sourcery_CodeBench_Lite_for_ARM_EABI make build
Build OpenVG Tiger sample app:
Build demo application:
1. Apply rotation_800 makefile patch for mqx4
--- a/tests/rotation_800/build-autovf600-gnu-mqx-d/eclipse/makefile
+++ b/tests/rotation_800/build-autovf600-gnu-mqx-d/eclipse/makefile
@@ -15,10 +15,10 @@
##############################################################################################
# Start of default section
#
-PLATFORM = faraday_a5
+PLATFORM = vybrid_autoevb_a5
GC3XX_ROOT = ../../../..
-MQX_TWRVF65GS10_PATH ?= /home/wayne/vivante/extpacs/os/mqx_impresario
-MQX_LOC ?= $(MQX_TWRVF65GS10_PATH)
+MQX_TWRVF65GS10_PATH ?= $(GC3XX_ROOT)/../extpacs/os/mqx4
+MQX_LOC = $(MQX_TWRVF65GS10_PATH)/lib/$(PLATFORM).gcc_cs
GCC_DIR = $(shell export PATH='$(PATH)'; which $(CC) | sed 's|/bin/.*||; \
s|/cygdrive/\(.\)|\1:|')
GCC_VERSION = $(shell $(CC) --version | grep ^arm | sed 's/^.* //g')
@@ -41,9 +41,8 @@ DDEFS = \
-DTWRVF600 \
-D__GNU__ \
-DDISCFG_PLAT_ACR \
+ -D__STRICT_ANSI__ \
-DARM \
- -DIMPRESARIO_CPU_FARADAY \
- -DUSE_THUMB \
-DgcdENABLE_BANK_ALIGNMENT=1 \
-DgcdBANK_BIT_START=13 \
-DgcdBANK_BIT_END=15 \
@@ -66,35 +65,10 @@ DADEFS =
# List all default directories to look for include files here
DINCDIR = \
$(GC3XX_ROOT)/hal/os/$(OS_TYPE)/inc \
- $(MQX_LOC)/os/mqx/mqx/include \
- $(MQX_LOC)/os/mqx/mqx/bsp \
- $(MQX_LOC)/os/mqx/mqx/psp \
- $(MQX_LOC)/os/mqx/config \
- $(MQX_LOC)/os/mqx/pcmmgr \
- $(MQX_LOC)/os/mqx/pcmmgr/codec \
- $(MQX_LOC)/infrastructure/config/include \
- $(MQX_LOC)/os/mqx/config/common \
- $(MQX_LOC)/infrastructure/config/profiles \
- $(MQX_LOC)/os/mqx/mqx/psp/cortex-a \
- $(MQX_LOC)/os/mqx/mqx/psp/cortex-a/vybrid \
- $(MQX_LOC)/os/mqx/mqx/bsp/$(PLATFORM) \
- $(MQX_LOC)/os/mqx/mqx/io/serial \
- $(MQX_LOC)/os/mqx/mqx/io/spi \
- $(MQX_LOC)/os/mqx/mqx/io/esdhc \
- $(MQX_LOC)/os/mqx/mqx/io/sdcard \
- $(MQX_LOC)/os/mqx/mqx/io/sdcard/sdcard_esdhc \
- $(MQX_LOC)/os/mqx/mqx/io/lwgpio \
- $(MQX_LOC)/os/mqx/mqx/io/sai \
- $(MQX_LOC)/os/mqx/mqx/io/flashx \
- $(MQX_LOC)/os/mqx/mqx/io/flashx/freescale \
- $(MQX_LOC)/os/mqx/mqx/io/esai \
- $(MQX_LOC)/os/mqx/mqx/io/esai/esai_fifo \
- $(MQX_LOC)/os/mqx/mqx/io/esai/esai_fifo/mqx_dev_drv \
- $(MQX_LOC)/os/mqx/mqx/io/asrc \
- $(MQX_LOC)/os/mqx/mqx/io/i2c \
- $(MQX_LOC)/os/mqx/mqx/io/usb \
- $(MQX_LOC)/os/mqx/mqx/io/io_expander \
- $(MQX_LOC)/os/mqx/mfs/include \
+ $(MQX_LOC)/debug/bsp \
+ $(MQX_LOC)/debug/psp \
+ $(MQX_LOC)/../../config/common \
+ $(MQX_LOC)/../../config/$(PLATFORM) \
$(GC3XX_ROOT)/sdk/inc \
$(GC3XX_ROOT)/tests/libs/twrvf600 \
$(GC3XX_ROOT)/tests/libs
@@ -107,13 +81,11 @@ DLIBDIR = \
# List all default libraries here
# bsp/psp libs need to be pulled in before libc, to assure mqx malloc is used
DLIBS = \
- $(GC3XX_ROOT)/libs/vg/build-autovf600-gnu-mqx-d/libovg.a \
- $(GC3XX_ROOT)/libs/egl/build-autovf600-gnu-mqx-d/libegl.a \
- $(GC3XX_ROOT)/tests/libs/twrvf600/build-autovf600-gnu-mqx-d/libtwrvf600.a\
- $(GC3XX_ROOT)/tests/libs/guts/build-autovf600-gnu-mqx-d/libguts.a\
- $(MQX_LOC)/os/mqx/lib/libpsp.a \
- $(MQX_LOC)/os/mqx/lib/libbsp.a \
- $(MQX_LOC)/os/mqx/lib/libpcmmgr.a \
+ $(GC3XX_ROOT)/libs/vg/build-twrvf600-gnu-mqx-d/libovg.a \
+ $(GC3XX_ROOT)/libs/egl/build-twrvf600-gnu-mqx-d/libegl.a \
+ $(GC3XX_ROOT)/tests/libs/twrvf600/build-twrvf600-gnu-mqx-d/libtwrvf600.a\
+ $(MQX_LOC)/debug/psp/psp.a \
+ $(MQX_LOC)/debug/bsp/bsp.a \
-lc -lgcc -lm -lcs3hosted -lcs3 -lcs3arm
#
@@ -131,7 +103,7 @@ PROJECT = ttt
#
# Define linker script file here
#
-LDSCRIPT = $(GC3XX_ROOT)/tests/scripts/impresario_ddr.ld
+LDSCRIPT = $(GC3XX_ROOT)/tests/scripts/ddr.ld
FULL_PRJ = $(PROJECT)
# List all user C define here, like -D_DEBUG=1
@@ -182,9 +154,6 @@ OPT = \
-mfloat-abi=soft \
-fno-exceptions \
-fno-builtin-printf \
- -mfpu=neon \
- -mthumb \
- -nostdlib \
-isystem $(GCC_DIR)/lib/gcc/arm-none-eabi/$(GCC_VERSION)/include \
-isystem $(GCC_DIR)/lib/gcc/arm-none-eabi/$(GCC_VERSION)/include-fixed \
-isystem $(GCC_DIR)/arm-none-eabi/include
2. cd tests/rotation_800/build-autovf600-gnu-mqx-d/eclipse
3. export MQX_TWRVF65GS10_PATH=$your_mqx4_path
4. make
Prepare SD Card:
On a linux host:
- load uboot into sdcard
dd if=u-boot.imx of=/dev/sdX bs=512 seek=2 conv=sync && sync
where /dev/sdX is your sdcard device, for instance: /dev/sdb
- load the generated elf file:
sudo dd if=/media/shared/ttt.bin of=/dev/sdX bs=512 seek=2048 conv=sync && sync
where /dev/sdX is your sdcard device, for instance: /dev/sdb
Testing the SD Card on the AutoEVB:
- Insert the SD card on the AutoEVB sd card slot
- Set the following RCON switches: SW10: 6,7 ON, SW11 4,6 (numbers of individual switches go from 1 to 8)
- Connect the serial port to a terminal with the following settings: speed 115200, Data bits 8, Stop bits 1, Parity None, Flow control xon/xoff.
- Make sure your board has the uart serial port jumpers properly enabled: J46 1-2, J48 set, J49 1-2.
- Make sure your boot jumpers are configured to boot from RCON switches: J15 0 1 2 J18 0 1 2
- Make sure you have connected the DVI to the AutoEVB and your Display
On Uboot
- As soon as you apply power you should see uboot sending data to your terminal, stop the autoboot and write the following to configure the boot parameters
set bootcmd 'mmc read 0x80000420 0x800 0x11364;go 0x80000420'
saveenv
reset
You should see the tiger rotating in your display.
Message was edited by: Ioseph Martinez Pelayo
Added: Make sure your boot jumpers are configured to boot from RCON switches: J15 0 1 2 J18 0 1 2