+ All Categories
Home > Documents > SW Tools Solutions for DA8x - processors.wiki.ti.com€¦ · UART UART MMC/SD [at GA] ERTFS [at GA]...

SW Tools Solutions for DA8x - processors.wiki.ti.com€¦ · UART UART MMC/SD [at GA] ERTFS [at GA]...

Date post: 30-May-2020
Category:
Upload: others
View: 14 times
Download: 0 times
Share this document with a friend
48
1 SW Tools Solutions for DA8x Linux by Degrees (updated) Part I (Using Primus DSK LSP 2.20.00.03 and MontaVista Pro Version 5.0) January 30, 2009 Joe George (with material stolen from all over)
Transcript

1

SW Tools Solutions for DA8x

Linux by Degrees (updated)Part I

(Using Primus DSK LSP 2.20.00.03 and MontaVista Pro Version 5.0)

January 30, 2009

Joe George(with material stolen from all over)

2

Agenda

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

Operating Systems – Tools vs. Target– DaVinci Tool Summary– Development System Configurations

• Standard DaVinci Linux (2 PC’s -> 1 WinXP PC+ 1 VMWare Linux PC) from Bootcamp• Joe DaVinci WinXP(1 PC-> WinXP + VMWare Linux on 1 PC ) – uses PumpKIN TFTP and NFSAxe Servers in WinXP• Minimal WinXP (1 PC -> WinXP Only)• Joe Optimum DaVinci (2 PC’s->1 WinXP PC + 1 WinxXP PC with VMWare Linux-Optional )

• Montavista Installation– Montavista Install MV-Demo files and installation (comes with Primus DSK) – Linux and WinXP– MV-Pro files ( and installation (comes with DVSPB) – Linux and WinXP

• Primus DSK SDK page and Release Schedule - - Linux and WinXP• DevRocket (MV-Pro only) - Linux and WinXP

– Importing LSP and building Kernel (uImage) in Bash Shell and DevRocket• Dual-core Debug (CCS Interaction) – Build in DevRocket, Debug in CCS, target GDB

– Importing and building DSPLINK GPP loopgpp example in (Bash Shell and) DevRocket– Building DSPLINK DSP loop.out example in DOS Shell and Debug in CCS– Booting target and use of PumpKIN TFTP and NFSAxe Servers (with SD Card target filesystem) in WinXP

• Remote Debug of loopgpp example with DevRocket using GDB (Server)• Apps using Ethernet (iperf) and /dev/dsp (wavplay) drivers• (Trace and) SoC Analyzer (And LTT)• Remote Debug of uImage using KGDB• TTO Lab extention to ARM and Linux• Dual-Core Debug with Green Hills Multi• Montavista File Summary and Structure• Open Source Linux?, DDD?Various HintsMarketing BackupCustomer/Performance Media Backup

3

Operating Systems – Tools vs Target

DA8x ARM+DSP(Catalog ARM+DSP)

DaVinci ARM/Linux(Catalog ARM for Video)

Traditional TI DSP

Linux (MontaVista)BIOS on ARM (System

BIOS)

Linux(Red Hat 3 or 4, Suse)and WinXP

Linux (MontaVista)Linux (Red Hat 3 or 4, Suse)

(and WinXP, too)

BIOSWindows

Target O/STools O/S

Target H/W(DM644x)

PC running development tools

If Target development tools run under Windows, why use Linux as Tools O/S?Maybe it is time to rethink this for our legacy and non-audio customers.

4

Summary - Operating Systems – Tools vs Target

DSPLINK

Linux (MontaVista)and BIOS on ARM?

Linux (MontaVista)

-----

ARM Target O/S

OMAP-L1 ARM+DSP(Catalog ARM+DSP)

DaVinci ARM/Linux(Catalog ARM for Video)

Traditional TI DSP

DSP/BIOS

Linux (Red Hat 3 or 4, Suse)and WinXP (CCS?)

xDM/Codec Engine(DSP/BIOS)

Linux (Red Hat 3 or 4, Suse)(and WinXP, too)

BIOS(Linux - Virtuallogix)Windows (CCS)

DSP Target O/STools O/S

PC running development tools

Target H/W(OMAP-L1 ARM+DSP)

5

DaVinci Tool SummaryDM644x Target

Linux(ARM)

DSP/BIOS(C64x+ DSP)

Command Line (Linux or WinXP)Compiler: GCC, MV-Pro – target LinuxBuild: MV-Pro bash shell – target LinuxDebug: GDB

GUI (Linux or WinXP)Build/Compile/Debug:

CCS (WinXP) - target LinuxGreenHills Multi (Linux or WinXP) – target LinuxMV-Pro/DevRocket (Linux or WinXP) – target LinuxDDD? (Linux)

Command Line (Linux, WinXP)Compiler: MV-ProBuild: MV-Pro bash shellDebug: N/A

GUIBuild/Compile/Debug:

CCS (WinXP)GreenHills Multi (Linux or WinXP)

Joe has been looking at most “cost effective” and traditional dsp options, some GUI and mostly WinXP-based.

6

Standard DaVinci System Configuration (from bootcamp)

WindowsPC

Linux “Tools”PC

(VMware)

DM6446DVEVM

RS-232

eth0

Ethernet Router

Ethernet provides physical connection for booting

U-Boot loads Kernel from “Tools” PC into DDR2 memory using TFTP

Filesystem is accessed via NFS protocol

After MakeNo need to

download to targetTeraTerm/

HyperTerminal

Samba

U-BootRS-232 is physical connection to U-Boot

Use to interrupt DVEVM standalone boot

Configure U-Boot modes by setting/saving environment variables

RS-232Ethernet

port

LAN port

7

WinXP

Linux “Tools”PC

(VMware)

DM6446DVEVM

Samba

Or VMShare

eth0Ethernet Router

After MakeNo need to

download to target

PC

PumpKIN TFTP Server

nfsAxeNFS Server

Joe WinXP DaVinci System Configuration (1 PC)

RS-232

U-Boot

USB

JTAGBHUSB560/SDUSB510/GH Probe

Multi/CCS

NFS/tftp

MV-Pro/DevRocket

TeraTerm/HyperTerminal

Ethernetport

LAN port

•Got uImage kernel to boot off WinXP using Pumpkin TFTP server•Got NFSAxe to act as NFS Server on WinXP•Got MV-Pro to build uImage kernel in WinXP in Bash and DevRocket (with some path modification)•Used DevRocket Debug on WinXP and GDBserver (with –attach PID) on DVEVM to build/debug decode (AAC) •Got ARM and DSP open in CCS (though SD drivers seems more stable then BH) with Linux running.

•If LAN then got Corp network access but some delay and certain local resources (i.e. DevRocketTarget filesystem might not work)•If WAN/Internet then local router with MAC address filtering isolates from Corp network, but tough to use Outlook, SNAP servers, and other network resources (turn off DHCP, though turning back on will require a Router hard reset).

8

WinXP DM6446DVEVM

eth0Ethernet Router

•Makes you wonder if you could get rid of the Linux Tools completely for the Catalog ARM+DSP programmerFor Bash hello - p. 4-10 of SPRUE66.pdfPATH="/opt/montavista/pro/devkit/arm/v5t_le/bin:/opt/montavista/pro/bin:/opt/montavista/common/bin:$PATH"cd /home/a0321791/workdir/filesys/opt/helloarm_v5t_le-gcc hello.c -o hello./hello

For Bash kernel uImage - p. 4-11 of SPRUE66.pdfPATH="/opt/montavista/pro/devkit/arm/v5t_le/bin:/opt/montavista/pro/bin:/opt/montavista/common/bin:$PATH"ANDPATH="/opt/mv_pro_4.0/montavista/pro/devkit/arm/v5t_le/bin:/opt/mv_pro_4.0/montavista/pro/bin:/opt/mv_pro_4.0/montavista/common/bin:$PATH" cd /home/a0321791/workdir/lsp/ti-davincimake ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage

PC

PumpKIN TFTP Server

nfsAxeNFS Server

RS-232

U-BootUSB JTAGBHUSB560/SDUSB510/GH Probe

CCSMV-LSP/MV-Pro

Minimal WinXP DaVinci System ConfigurationNFS/tftp

TeraTerm/HyperTerminal

Ethernetport

9

WinXP

Linux “Tools” PC(VMware) - optional

DM6446DVEVM

eth0

Ethernet Router

•Local router with MAC address filtering isolates ONLY “Linux Box” and EVM from TI network•WinXP PC (regular laptop) on TI network AND can access DVEVM with RS-232 terminal (and uBoot)•WinXP PC can be (hibernated and) removed daily without messing up the local system/IP address •Got uImage kernel to boot off WinXP TFTP server (PumpKIN) with uBoot from WinXP PC•Got MV-Pro to build uImage kernal in WinXP in Bash and DevRocket (some path modification)•Used DevRocket on WinXP and GDBserver on DVEVM to build/debug decode (AAC) demo program•VMWare Linux optional for testing

After MakeNo need to

download to target

PC

Joe Optimum DaVinci System Configuration (2 PC’s)

RS-232

U-Boot

USB

JTAG

BHUSB560/SDUSB510/GH Probe

CCS TFTP Server NFS Server

NFS/tftp

WinXP

PumpKIN TFTP Server

nfsAxeNFS Server

USB

MV-Pro/DevRocket

PC (Linux Box)

TeraTerm/HyperTerminal

MicrosoftOutlook

Ethernetport

WAN/Internet port

10

This is what you get with the Primus DSK:http://focus.ti.com/docs/toolsw/folders/print/tmdxoskl137bet.html

For MV-Demo Install – Linux box or VMWare –(External from: http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/S1SDKLNX/SDK_EA2OMAPL137LNX/index_external.html)

mvl_5_0_demo_target_setuplinux.bin (Target Filesystem)mvl_5_0_0_demo_lsp_setuplinux_02_20_00_03.bin (Linux Support Package which

builds uImage)mvl_5_0_demo_sys_setuplinux.bin (Arm cross development environment/cross

compiler but out-of-date LSP so use the one above)

Please note that DevRocket is NOT provided with Demo tools.

(WinXP works for Target Filesystem and LSP only if:1. Use Linux to install the ,bin to get .tar file2. Use tar zxvf in bash shell

Montavista Install MV-Demo – Linux and WinXP

11

Montavista Install MV-Pro - Linux

Optimum VMWare image is: davinci_dm644x_rhel4_ws_u4_dvevm_1_20_00_01_JoewithDevRocket2opts - 18.8GByte

Other permutations are:davinci_dm644x_rhel4_ws_u4_dvevm_1_20_00_01_JoewithDevRocket2optsopt3primusandotherstuff?? – 24 Gbytedavinci_dm644x_rhel4_ws_u4_dvevm_1_20_00_01_JoewithMultiwithDevRocketwithDisks - 19.2 Gbyte

This is what you get with the DVSPB:http://focus.ti.com/docs/toolsw/folders/print/tmdsdvspba9.html

MV-Pro 5.0 Install CD’s: propro--hosthost--arm_v5t_learm_v5t_le--0702774.iso0702774.isodevrocketdevrocket--0702794.iso0702794.isosrcsrc--propro--0702774.iso? docs0702774.iso? docs--propro--0702774.iso? 0702774.iso? lspslsps--TiDaVinciTiDaVinci--arm_v5t_learm_v5t_le--0802106.iso?0802106.iso?

For MV-Pro Install on VMWare: In VMWare, HDD->Share folder. Then extract the 2 .iso files mentioned above to local VMware /temp directory (Path error fix "- to /"after chmod).

Install same http://127.0.0.1:9999 as WinXP slideNote that /tmp/mvl-install is 2.5Gbyte. Will take 3 hours to install which is better than 5 hours with CD.

12

Primus DSK SDK Page

Full (ARM+DSP) SDK (Need to register TI&ME):http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/S1SDKLNX/SDK_EA2OMAPL137LNX/index_external.html

•Montavista files (updated from 2 CD’s)

•Device Drivers (ARM and DSP)

•Out-of-date LSP in demo_sys_setuplinux.bin

13

SW Phased Release ScheduleHandoff DatesSW Tools

OS

rCSL EDMA McASP EDMA McASP EDMA McASPGPIO LCD GPIO LCD GPIO LCDI2C NAND I2C NAND I2C NANDSPI MMC/SD SPI MMC/SD SPI MMC/SD

UART USB UART USB UART USBEMAC EMAC EMAC

DSP/BIOS Drivers EDMA LLD McASP EDMA LLD McASPGPIO GPIO LCDCI2C I2C USB [at GA]SPI SPI NAND [at GA]UART UART MMC/SD [at GA]

ERTFS [at GA]Linux Drivers GPIO McASP GPIO McASP

I2C I2C LCDCSPI SPI USBUART UART NANDEMAC EMAC MMC/SD

DSP side Ethernet NDK FrameworkIPCLinux Boot

Early Adopter Release 1 Early Adopter Release 2 Beta SDK/GA SDKSept. - 08 Nov. - 08 Jan-09/ 1Q09

CCS 3.3x CCS 3.3 CCS 3.3Codegen Tools 6.1.5 Codegen Tools 6.1.5 Codegen Tools 6.1.5Gnu Linux Toolchain Gnu Linux Toolchain Gnu Linux ToolchainDSP BIOS 5.33 DSP BIOS 5.33 DSP BIOS 5.33

Codec Engine/Framework Components

Demo Version of MontaVista Pro 5.0 Demo Version of MontaVista Pro 5.0 Demo Version of MontaVista Pro 5.0

NDK Stack/ EMAC driver NDK Stack/ EMAC driver

Link 1.6xUBL, U-Boot, Flashwriter, Modes UBL, U-Boot, Flashwriter, Modes

Full (ARM+DSP) SW Schedulehttp://focus.ti.com/dsp/docs/dspcontent.tsp?contentId=51127

14

Executable is in: /opt2/montavista/common/eclipse/devrocketTried VMware DevRocket install on laptop. Got Build errors when trying to “File->Import->Existing Project into Workspace” of the WinXP version. Instead did File->Import->External C++ Project from Linux mvl_lsp_setuplinux_1_20_01_10.bin and build works for uImage kernel.

MV-Pro DevRocket - Linux

Workspace is in: /home/user/montavista/devrocket2.0/workspace/uImageDevRocketLSP120

15

For MV-Pro Install on WinXP (New from HDD and .iso tool):Download winxpvirtualcdcontrolpanel_21.exe from http://support.microsoft.com/kb/916902 and Unzip. Mount the above .isofiles as instructed and install MV-Pro. Will take 3 hours to install which is better than 5 hours with CD.

Montavista Install MV-Pro - WinXP

For MV-Pro Install on WinXP:Might need to put WinXP in "safe mode with networking" by hitting F-8 when I saw the Dell logo on my laptop at reboot. I can't explain why my laptop did not like http://127.0.0.1:9999 . It did take over 5 hours to install though from CD.

This is what you get with the DVSPB:http://focus.ti.com/docs/toolsw/folders/print/tmdsdvspba9.html

MV-Pro 5.0 Install CD’s: propro--hosthost--arm_v5t_learm_v5t_le--0702774.iso0702774.isodevrocketdevrocket--0702794.iso0702794.isosrcsrc--propro--0702774.iso? docs0702774.iso? docs--propro--0702774.iso? 0702774.iso? lspslsps--TiDaVinciTiDaVinci--arm_v5t_learm_v5t_le--0802106.iso?0802106.iso?

For MV-Pro Install on VMWare: In VMWare, HDD->Share folder. Then extract the 2 .iso files mentioned above to local VMware /temp directory (Path error fix "- to /"after chmod).

16

•Build Config with C++ View in C++ Perspective with makecommand.

MV-Pro DevRocket - WinXP

•Debug Config with C++ View in C++ Perspective using remote GDBdebugging

17

•In DevRocket workspace (move or copy LSP to:)•C:\mvcyg5.0\home\a0321791\workspace\linux-2.6.18_pro500•File->New->Standard Make C/C++ Project

•Can also do in a temp directory and File->Move to workspace will make a copy (Will take almost ½ to 1 hour to copy)and then delete original.

DevRocket – Import for LSP

•Will take almost ½ to 1 hour to import•Turning off the indexer under “Project->Properties->C/C++ Indexer->No Indexer can speed up.

18

•Add paths in Bash shell by:•Type:

export PATH="/joetemp/make/make-3.81:/opt3primus/montavista/pro/devkit/arm/v5t_le/bin:/opt3primus/montavista/pro/bin:/opt3primus/montavista/common/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/CCStudio_v3.3/bin:/cygdrive/c/CCStudio_v3.3/bios_5_33_01/xdctools"

•Or make a bash.bashrc file in C:\mvcyg4.0\home\a0321791with this line and from Bash shell type:source ~/.bashrc

•Test Path by typing:set

•To get the output:•PATH=/joetemp/make/make-3.81:opt3primus/montavista/pro/devkit/arm/v5t_le/bin:/opt3primus/montavista/pro/bin:/opt3primus/montavista/common/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/CCStudio_v3.3/bin:/cygdrive/c/CCStudio_v3.3/bios_5_33_01/xdctools

•Build uImage by:make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage

Bash shell is nice to debug build by writing outputs to file such as:

MV-Pro Bash Shell – Build uImage kernel(Optional for command line build/debug)

make –d ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage > output.txt 2>&1

make –p ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage > output.txt 2>&1

Also get to the entire WinXP HDD by:cd /cygdrive/c/mvcyg5.0

Menuconfig has issues with kconfig in bash:make ARCH=arm CROSS_COMPILE=arm_v5t_le-menuconfigSo set in VMWare a copy .config file

•NO appending PATH!•So no, set PATH=%PATH%•Command Windows are cheap (DOS, Bash, or Linux) so SET 1 for each build.

19

DevRocket – Build Environment (uImage)

•Check DevRocket Build Environment under DevRocket Project->Properties->Make Project->Environment Tab->PATH="/joetemp/make/make-3.81:/opt3primus/montavista/pro/devkit/arm/v5t_le/bin:/opt3primus/montavista/pro/bin:/opt3primus/montavista/common/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/CCStudio_v3.3/bin:/cygdrive/c/CCStudio_v3.3/bios_5_33_01/xdctools"):

20

•DevRocket Project Properties->Builder Configuration->Build->Command line •Console with build uImage kernel info •System.map file gives you driver functions like davinci_set_samplerate() for reference (address wrong due to MMU) but symbol info and source code pathnames good.

DevRocket – Build uImage kernel

•For Build Command, under DevRocket Project->Properties->Make Project->Make Builder->Build Command (Uncheck Default)->C:\mvcyg5.0\bin\ make ARCH=arm CROSS_COMPILE=arm_v5t_le-•Build variable=uImage

21

DevRocket – Import for GPP DSPLink Loop sample

•Will take almost ½ to 1 hour to import•Turning off the indexer under “Project->Properties->C/C++ Indexer->Uncheck enable” can speed up.

•In DevRocket workspace (move or copy app to:) but not directory. Only MV5.0 directory.Your choice•C:\mvcyg5.0\home\a0321791\workspace•File->New->Standard Make C/C++ Project

•Can also do in a temp directory and File->Move to workspace will make a copy (Will take almost ½ to 1 hour to copy)and then delete original.

22

DSPLink loop sample – Rules.make (optional)

•Rules.make can be used to match MV bash environment with DevRocket. •In the Makefile, add an include of Rules.make•Now DSPLINK=/joetemp/dsplink_1_61_00_02/dsplink

23

DevRocket – Build/Environment (DSPLINK GPP)

•For Build Command, under DevRocket Project->Properties->Make Project->Make Builder->Build Command (Uncheck Default)->C:\mvcyg5.0\bin\make •Build variable=all•Environment tab,need PATH="/joetemp/make/make-3.81:/opt3primus/montavista/pro/devkit/arm/v5t_le/bin:/opt3primus/montavista/pro/bin:/opt3primus/montavista/common/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/CCStudio_v3.3/bin:/cygdrive/c/CCStudio_v3.3/bios_5_33_01/xdctools•DSPLINK=/joetemp/dsplink_1_61_00_02/dsplink can be here or Rules.make

24

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

•DSPLINK•Builds and runs fine in Linux•Cannot build both ARM and DSP side examples in the same directory in WinXP so:

•ARM Side libraries and examples directories:C:\mvcyg5.0\home\a0321791\workspace\dsplink_1_61_00_02\dsplink\gpp\srcC:\mvcyg5.0\home\a0321791\workspace\dsplink_1_61_00_02\dsplink\gpp\src\samples\loop

•were Built with MV50 bash shell after some tweaking of paths in:C:\mvcyg5.0\home\a0321791\workspace\dsplink_1_61_00_02\dsplink\make\Linux\da8xx_mvlpro5.0.mk

•DSP Side libraries directories: C:\Temp\joetemp\dsplink_1_61_00_02\dsplink\dsp\src

•were built with MV50 bash shell after since building in DOS as recommended gave make build path errors.

•Meanwhile the DSP side examples:C:\Temp\joetemp\dsplink_1_61_00_02\dsplink\dsp\src\samples\loop

•Had to be built in DOS in a temp directory since tconf.exe cannot build in a directory with a “.” in the pathname like the MV default installation directory:C:\mvcyg5.0

•The DSP side examples needed some tweaking to build in MV Bash in the files:C:\Temp\joetemp\dsplink_1_61_00_02\dsplink\make\DspBios\C64XX\compile.mk and link.mk

I did try subst s: "c:/mvcyg5.0“ which got tconf.exe working but later had make path issues for copying files. Funny thing is that I have to make the DOS "\" into a Linux "/“ in the: C:\Temp\joetemp\dsplink_1_61_00_02\dsplink\make\DspBiosc64xxp_5.xx_windows.mk

file for the example to build.Please see: http://community.itg.ti.com/digital/forums/p/4791/15114.aspx#15114for a full explanation

DSPLINK – Build in DevRocket, Debug in CCS…

25

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

ARM Make a .map fileNot great for addresses due to MMU, but good to trace symbols and build sources:C:\mvcyg5.0\home\a0321791\workspace\dsplink_1_61_00_02\dsplink\dsp\BUILD\OMAPL1XXGEM_0\EXPORT\DEBUG

(If not there in the makefile, add –Wl, -Map option to LD_Flags)#jg 10/23/08 Made ARM .map file LD_FLAGS += -lfreetype -lpng -ljpeg -lpthreadLD_FLAGS += -lfreetype -lpng -ljpeg -lpthread -Wl,-Map,allcopy.map

ARM Side tweak paths in da8xx_mvlpro5.0.mk (BUILDOS checked when building libraries):BASE_BUILDOS := /home/Administrator/workspace/uImageDevRocketlinux-2.6.18_pro500BASE_TOOLCHAIN := /opt3primus/montavista/pro/devkit/arm/v5t_leOSINC_PLATFORM := $(BASE_TOOLCHAIN)/lib/gcc/armv5tl-montavista-linux-gnueabi/4.2.0/includeOSINC_TARGET := $(BASE_TOOLCHAIN)/target/usr/includeCOMPILER := $(BASE_CGTOOLS)/arm_v5t_le-gccLD := $(BASE_CGTOOLS)/arm_v5t_le-ldARCHIVER := $(BASE_CGTOOLS)/arm_v5t_le-ar

DSP Side libs needed tweaks in compile.mk:STD_INC_PATH := $(CC_SW_INC)c:/mvcyg4.0$(PROJ_INC_GENERIC)STD_INC_PATH += $(CC_SW_INC)c:/mvcyg4.0$(PROJ_INC_BUILDOS)STD_INC_PATH += $(CC_SW_INC)c:/mvcyg4.0$(PROJ_INC_BUILDOSVER)STD_INC_PATH += $(CC_SW_INC)c:/mvcyg4.0$(PROJ_INC_DEVICEOS)STD_INC_PATH += $(CC_SW_INC)c:/mvcyg4.0$(PROJ_INC_DSPDEVICE)STD_INC_PATH += $(CC_SW_INC)c:/mvcyg4.0$(PROJ_INC_DSPDEVICECLASS)

link.mk file needed some really ugly tweaks like this one for the archiver:# jg 12/10/08 - diff path for dsp (with c:/mvcyg5.0)USR_LIBS_RELJ :=c:/mvcyg5.0$(USR_LIBS_DEB)$(target_deb): $(USR_LIBS_DEB)

$(CMDECHO)$(DISPLAY) Generating $(basename $@)...$(CMDECHO)$(COPYFILES) "$(PROJ_INCLUDE)" "$(EXPORT_INC_PLATFORM)" > $(TRASH)$(CMDECHO)$(CMD_ARCHIVE) c:/mvcyg5.0$(ARCHIVE_DEB) $(foreach dir,

$(ARGS_ARCH_DEB), $(wildcard c:/mvcyg4.0$(dir)/*.obj)) $(USR_LIBS_DEBJ)

DSPLINK - MV50 Bash Build Tweaks

26

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

Made the DOS "\" into a Linux "/“ in DspBiosc64xxp_5.xx_windows.mkBASE_INSTALL := c:/CCStudio_v3.3#BASE_INSTALL := c:\CCStudio_v3.3#BASE_SABIOS := $(BASE_INSTALL)\biosBASE_SABIOS := c:/CCStudio_v3.3/bios_5_33_01#BASE_SABIOS := c:\CCStudio_v3.3\bios_5_33_01#BASE_BUILDOS := $(BASE_SABIOS)\packages\ti\biosBASE_BUILDOS := $(BASE_SABIOS)/packages/ti/bios# ----------------------------------------------------------------------------# Base directory for the XDC tools# ----------------------------------------------------------------------------XDCTOOLS_DIR := c:/CCStudio_v3.3/bios_5_33_01/xdctools#XDCTOOLS_DIR := c:\CCStudio_v3.3\bios_5_33_01\xdctools# ----------------------------------------------------------------------------# Base for code generation tools - compiler, linker, archiver etc.# ----------------------------------------------------------------------------BASE_CGTOOLS := c:/CCStudio_v3.3/C6000/cgtools6_1_2BASE_CGTOOLSBIN := $(BASE_CGTOOLS)/bin# ============================================================================# COMPILER# ============================================================================# ----------------------------------------------------------------------------# Name of the compiler# ----------------------------------------------------------------------------#COMPILER := $(BASE_CGTOOLSBIN)\cl6xCOMPILER := $(BASE_CGTOOLSBIN)/cl6x#jg 12/22/08# ============================================================================# LINKER# ============================================================================LINKER := $(BASE_CGTOOLSBIN)/cl6x -z# ============================================================================# TCONF# ============================================================================#TCONF := $(BASE_TCONF)\tconfTCONF := $(BASE_TCONF)/tconf#jg 12/22/08

DSPLINK - DOS Build Tweaks

27

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

Build DSP loop.out in DOS Window

•DOS Environment can be set in:C:\Temp\joetemp\dsplink_1_61_00_02\dsplink\etc\host\scripts\msdos\dsplinkenv.bat

•Key environment variables are:•set DSPLINK=C:/temp/joetemp/dsplink_1_61_00_02/dsplinkSetPATH=%DSPLINK%\etc\host\scripts\msdos;c:\CCStudio_v3.3\bios_5_33_01\xdctools;c:\CCStudio_v3.3\bios_5_33_01\xdctools\bin;C:\perl\bin;C:\WINDOWS\system32

•DSP Link Loop sample in:C:\Temp\joetemp\dsplink_1_61_00_02\dsplink\dsp\src\samples\loop

•NO appending PATH!•So no, set PATH=%PATH%•Command Windows are cheap (DOS, Bash, or Linux) so SET 1 for each build.

Shell sh.exe (in xdctools\bin)

Perl (from Active Perl)

gmake (in xdctools) for loop.out

gmake > output.txt 2>&1

28

Format SD Card for Target Filesystem•Take mvl_5_0_demo_target_setuplinux.bin and install in Linux• tar zxvf mvl5.0-target_path.tar.gz•Full instructions (target or host) at:•https://sps03.itg.ti.com/sites/dsp-peraudio/primus/Wiki/Home.aspx•But what I did in Linux VMWare (host):Using Linux Host Machine Insert a fresh 2 GB SD card to a Linux Host. Depending on the Linux machine configuration, it may get auto detected and auto mounted. If it gets auto mounted note down its 'mount point'. Optional for old multipartition SD cards

Find-out the device node for the card (usually /dev/sd) - assuming it is /dev/sda from hereon [$ ls/dev/sd*] If it was auto mounted, unmount all the partitions in it [$ umount /dev/sda<1/2/3/4>] Run fdisk [$ fdisk /dev/sda] If more than one partitions were in it, then delete all of them and create a new one for the entire disk using command ‘d - for delete' and ‘n - for new partition' Change the type of partition to Linux using the command "t" then "83" Write the changes with "w" Depending on Linux Host settings, it may again get automounted. Unmount the disk if it is automountedFormat the disk using [$ mkfs.ext2 /dev/sda1]. Wait for the formating to complete. Mount the disk to some mount point say ~/test "$mount /dev/sda1 ~/test" Create a tar ball of the root file system Unzip the root file system to ~/test Unmount the disk [$ umount ~/test] Use the disk

29

Setup uImage/Uboot for SD Card Target Filesystem•Take mvl_5_0_demo_target_setuplinux.bin (MVL 5.0 Target File System) and install in Linux• tar zxvf mvl5.0-target_path.tar.gz•Full instructions for kernel drivers (SD, USB, audio, etc.) at:http://pspwiki.india.ti.com/bin/view/EngDiscussions/PrimusLinuxUserGuide

•But what I did in Linux VMWare (for SD Target Filesyste,):MMC/SD Device Drivers --->

MMC/SD Card support ---> <*> MMC support <*> MMC block device driver <*> TI DAVINCI Multimedia

For uBoot with target file system root as SD card (tftp server uImage):setenv bootargs mem=120M console=ttyS2,115200n8 root=/dev/mmcblk0p1 ip=dhcp noinitrd rw;setenvautoload no;dhcp;bootcmd dhcp;setenv serverip 192.168.1.100;tftpboot;bootm

Note: Directory on SD Card:/joewashereSD2

30

WinXP - Boot Target with PumpKIN and NFSAxe Server

•To prep for remote debugging on target (TCP/IP Address 158.218.121.65)[email protected]:~# mount 158.218.121.89:/c/mvcyg4.0/home/a0321791/montavista/devrocket2.0/workspace

•Teratermfor uBoot

•PumpKIN for tftpserver

•NFSAxe for NFS Server

•WinXP Host TCP/IP Address is 158.218.121.89

31

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

DSPLINK Load loop.out in CCS

•CCS setup and CCS open with loop.out loaded and run (But .pjt file is faked for debug since loop.out was built with gmake

DSP Side:

32

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

Run loopgpp from Linux (After loading loop.out in CCS) •Mount WinXP NFS Server (TCP/IP Address 192.168.1.100) to Target and look at dirmount 192.168.1.100:/c/mvcyg5.0/joetemp /misc/[email protected]:# cd /misc/winxpnfs/dsplink_1_61_00_02/dsplink/gpp/build/export/[email protected]# lsarch.a dsplinkk.ko ldrv.lib messagegpp osal.oarch.lib gen.a ldrv.o messagemultigpp readwritegpparch.o gen.lib loop.map mpcsxfergpp ringiogppdsplink.a gen.o loop.out mplistgpp scalegppdsplink.lib joefromwinxp loopgpp osal.adsplink.o ldrv.a loopgpp2 osal.lib

Load dsplink [email protected]:#mknod /dev/dsplink c 230 [email protected]:#insmod dsplinkk.ko

Run [email protected]:# ./loopgpp loop.out 1024 10000 0xc3e27f00=============== Sample Application : LOOP ============== Executing sample for DSP processor Id 0 ====Entered LOOP_Create ()Leaving LOOP_Create ()Entered LOOP_Execute ()Transferred 1000 buffersTransferred 2000 buffersTransferred 3000 buffersTransferred 4000 buffersTransferred 5000 buffersTransferred 6000 buffersTransferred 7000 buffersTransferred 8000 buffersTransferred 9000 buffersTransferred 10000 buffersLeaving LOOP_Execute ()Entered LOOP_Delete ()Leaving LOOP_Delete ()====================================================root@192.168.1.101:#

DSPLINK Run loopgpp from Primus DSK Linux command line

33

DevRocket Remote Debug (GDB) of DSPLINK loop sample•To prep for remote debugging in DevRocket,

•Go to Project->Debug->Debugger Tab•App Name: loopgpp•Make sure Debugger= GDB Server •GDB Debugger=arm_v5t_le-gdb.exe•Connection=TCP•IP address=IP of Target/Primus DSK (192.168.1.100)•Port #=100000

34

DevRocket Remote Debug – Target Setup

To prep for remote debugging on target (TCP/IP Address 192.168.1.101):

Run loopgpp from Linux (After loading loop.out in CCS) Mount WinXP NFS Server (TCP/IP Address 192.168.1.100) to Target and look at dirmount 192.168.1.100:/c/mvcyg5.0/joetemp /misc/[email protected]:# cd /misc/winxpnfs/dsplink_1_61_00_02/dsplink/gpp/build/export/debug

Load dsplink [email protected]:#mknod /dev/dsplink c 230 [email protected]:#insmod dsplinkk.ko

Run gdbserver (in /usr/bin) with copied version of loopgpp2 (to avoid file access conflicts) [email protected]:#gdbserver host:10000 ./loopgpp2 loop.out 1024 10000 0xc3e27f00

See main.c code in next slide

35

WinXP – DSPLINK with CCS on DSP side and DevRocket on ARM side

•DevRocketSource Debug on ARM•BP at line 709 of loop.c

•CCS Source Debug on DSP

•Gdbserverdebug on target

•GDB Server running on Target (TCP/IP Address 192.168.1.101)for Port 10000 with PID 1125

•DevRocket Breakpoint at line ? of tskloop.c•Single step was not working but Resume to next Breakpoint OK

36

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

DSPLINK Interaction (DSP-side with Load symbols (if you don’t load loop.out from CCS)

ARM/DSP talking over DSPLINK. Use all.x64P.map file to find MSGQ_put (lower case “p”) in CCS:

DSP Side:

37

Linux – Brave new world (ENET iperf program using Linux sockets driver on Primus DSK)

ON PC AS SERVER (DOS Executable came from http://www.noc.ucf.edu/Tools/Iperf/):C:\mvcyg5.0\joetemp\iperf>iperf -s------------------------------------------------------------Server listening on TCP port 5001TCP window size: 8.00 KByte (default)------------------------------------------------------------[1872] local 192.168.1.100 port 5001 connected with 192.168.1.101 port 2968[ ID] Interval Transfer Bandwidth[1872] 0.0-10.0 sec 56.9 MBytes 47.7 Mbits/sec

ON STARTER KIT AS CLIENT:[email protected]:/misc/winxpnfs/iperf/iperfprimus/iperf-2.0.4/src#./iperf -c 192.168.1.100------------------------------------------------------------Client connecting to 192.168.1.100, TCP port 5001TCP window size: 16.0 KByte (default)------------------------------------------------------------[ 3] local 192.168.1.101 port 2968 connected with 192.168.1.100 port 5001[ ID] Interval Transfer Bandwidth[ 3] 0.0-10.0 sec 56.9 MBytes 47.7 Mbits/sec

OMAP-L137/TMS320C6747 Floating Point

Starter Kiteth0

Ethernet Router

U-Boot

JTAG

TFTP Server NFS Server

NFS/tftp

WinXP

PumpKIN TFTP Server

nfsAxeNFS Server

MV-Pro/DevRocket

PC (Linux Box)

WAN/Internet port

Ethernetport

38

DevRocket (WinXP) – Remote Debug uImage (KGDB)

To prep for KGDB debugging on target, need to do on Host:make ARCH=arm CROSS_COMPILE=arm_v5t_le- menuconfig

•But this causes same build errors on WinXP due to:1. Kconfig “help” heading can’t take space (manually removed)2. Other build error with ?

•Workaround by running menuconfig in VMWare and copy .config to:/home/a0321791/montavista/devrocket2.0/workspace/uImageDevRocketLSP120

•In menuconfig got to add KGDB support target, and U-boot with:setenv bootargs mem=120M console=ttyS0,115200n8 root=/dev/hda1 rw noinitrd [email protected]/,@192.168.1.103/

But getting stuck in bootup with WinXP uImage with VMWare .config. Boots with VMWare uImage:kgdboe: local port 6443kgdboe: local IP 192.168.1.102kgdboe: interface eth0kgdboe: remote port 6442kgdboe: remote IP 192.168.1.100

Then error with cmemk.ko and [email protected]:# ./loadmodules.sh:insmod: error inserting 'cmemk.ko': -1 Invalid module format:mknod: wrong number of argumentsTry `mknod --help' for more information.

Then decode will not open Codec EngineDecode demo started.Decode Debug: Codec Engine initializedDecode Debug: JoeEngine name is decodeTraceUtil> Error: Failed to open codec engine "decode"

39mount 192.168.1.100:/c/mvcyg5.0/joetemp /misc/winxpnfscd /misc/winxpnfs/wavplay/wavplay-1.4make no_x./wavplay madworld.wav

•make ARCH=arm CROSS_COMPILE=arm_v5t_le- Menuconfig•Device Drivers --->

•Sound ---> <*> Sound card support •Advanced Linux Sound Architecture --->

•<*> Advanced Linux Sound Architecture •System on Chip audio support ---> •<*> ALSA for SoC audio support •<*> SoC Audio support for DA8XX EVM •[*] DA8XX McASP0 control by ARM •[ ] DA8XX McASP2 control by ARM DA8xx CODEC (Using the TLV3106 CODEC) ---> (X) Using the TLV3106 CODEC•[ ] DA8XX McASP1 control by ARM

Linux – Brave new world (Sound wavplay program using Linux /dev/dsp (OSS API in ALSA) driver on Primus DSK)

OMAP-L137/TMS320C6747 Floating Point

Starter Kit eth0

Ethernet Router

TLV320AIC3106

TFTP Server NFS Server

NFS/tftpWinXP

PumpKIN TFTP Server

nfsAxeNFS Server

MV-Pro/DevRocket

PC (Linux Box)

WAN/Internet port

Ethernetport

•Using /dev/dsp

/dev/dsp

40

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

uImage AIC33 (sample rate) Driver Manipulation

AIC33 driver divides fake speech.c sampleRate value to normalize. Printf works in decode app but not driver

DSP Side:

•Sample rate speedup x4 and slowdown /4

41

Linux – TTO Lab -> Turn DIP’s into..CPUEDMA

RCVCHAN gBufferRcv

McBSP0

Rcv

Xmt

XMTCHAN gBufferXmt

COPY

+

Pong

Pong

Ping

Ping

Add a xDAIS FIR Filter to systemUse filter to eliminate sinewave from audio stream

Flash LEDs and Load

DIP_1

DIP_2

XDAISFilter

ADC

DAC

•DSP

42

…command line and/or web page controlCPUEDMA

RCVCHAN gBufferRcvADC

DAC

McBSP0

Rcv

Xmt

XMTCHAN gBufferXmt

COPY

+

Pong

Pong

Ping

Ping

Boot Linux and add command line app to switch DIPHTTP server on Linux, switch DIP with a mouse-click

Flash LEDs and Load

DIP_1

DIP_2

XDAISFilter

Technical Training

TTO

Command Line on Starter kit:[email protected]:/misc/winxpnfs/iperf/iperfprimus/iperf-2.0.4/src#./lab11 DIP_1 On

Webpage loading from HTTP Server on Starter kit:

DIP_2 OnOff

•DSP

Linux ARM(bash and http server)

43

(Trace and) SoC Analyzer (And LTT)

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

For Trace debug command line does not work on WinXP:[email protected]:~# CE_DEBUG=2 ./decoded2 -a data/sounds/davincieffect.aac nogdb [email protected]:~#CE_TRACE="*=01234567" ./decoded2 -a data/sounds/davincieffect.aac nogdbdspoff

But adding into code does in main.c:// jg 9/10/08 - From CE FAQGT_set("*=01234567");

To prep for LTT and SoC Analyzer on target, need to build on Host:make ARCH=arm CROSS_COMPILE=arm_v5t_le- menuconfigBut this causes build errors on WinXP due to:

1. Kconfig “help” heading can’t take space (manually removed)2. Other build error with ?

•Workaround by running menuconfig in VMWare and copy .config to:/home/a0321791/montavista/devrocket2.0/workspace/uImageDevRocketLSP120

•In make menuconfig got to add relayfs and then on target: [email protected]:~# mount relayfs /mnt/relayfs

•Then on Host after running:[email protected]:~#./thttpd -c "/cgi-bin/"And using DVT-DM644xSOCAB.exe is Version: 1.0.0, got http error with:command=killall+tracedaemon%3Brm+/tmp/trace.trace+/tmp/proc.txt+/tmp/proc_thread.txt+/tmp/output.txt%3B/bin/tracedaemon+-b524288+-n4+-eSTART+++++++-eSCHED+++-ePROCESS+-eFS++++++++/tmp/trace.trace+/tmp/proc.txt+%3E/tmp/output.txt%3B/opt/dvt-dsa/mapProcThread+/tmp/proc_thread.txt%3Bmkfifo+/tmp/cecmdpipe%3Becho+socrates%3Doff+%3E/tmp/cecmdpipe%3Becho+resetfiles+%3E/tmp/cecmdpipe+%3Becho+socrates%3Don+%3E/tmp/cecmdpipe

Even when running out of IE web browser execute.html. Error in execute.pl

Need to RETRY running above in VMWare – Quick VMWare build gave same error

44

•Got GH Multi running in WinXP using BH USB560 (VMWare Linux license not working) •Ran “Hello World” on ARM and DSP with GH Multi (using DaVinciEVM_arm_dspfix.gel•Got Multi “Freeze Mode” uImage kernel debug (though symbols/path seemed a little off) and GHS kernal analyzer (OSA)•Got Multi “Run Mode” debug of Linux “fork example”

Dual-Core Debug: Stop (Freeze) Mode Debug with GHS Multi

•ARM “Hello World”

•DSP “Hello C64x World”

•ARM Registers and Memory

•DSP Registers and Memory

45

MontaVista Linux Distro – Content SummaryMontaVista Linux• Target Filesystem – target runtime environment

– Location: …(C:/mvcyg4.0/)opt/montavista/pro/devkit/arm/v5t_le/target (Makes target file structure, Linux commands ls, grep, etc.) – Comes in target-arm_v5t_le-0600980.iso in MV-Pro CD and MV-Eval file mvl_lsp_setuplinux_1_20_00_10.bin for Linux and

mvl_lsp_setupwin32_1_20_00_10.exe for WinXP• ‘ti-davinci’ LSP = kernel + drivers

– Drivers and baseport by TI PSP team, Catalog Apps– Location: …Should be in (C:/mvcyg4.0/)opt/montavista/pro/devkit/lsp (Makes kernel i.e. uImage) copied from

(C:/mvcyg4.0/optfromlsp)/montavista/pro/devkit/lsp and contains (C:/mvcyg4.0/optfromlsp)/montavista/pro/devkit/lsp/ti-davinci/arch/arm/boot/uImage

– Comes in target-arm_v5t_le-0600980.iso in MV-Pro CD (and lspslsps--titi--davinci_evmdavinci_evm--0600990.iso, I think though I never got this one to 0600990.iso, I think though I never got this one to install) andinstall) and MV-Eval file mvl_setuplinux_1_20_00_10.bin for Linux

– Copy of this is LINUXKERNEL_INSTALL_DIR in Rules.make: c:/mvcyg4.0/home/a0321791/montavista/devrocket2.0/workspace/uImageDevRocketLSP120

• Arm cross dev environment: Host tools– Compiler Location: …(C:/mvcyg4.0/)opt/montavista/pro/devkit/arm/v5t_le/bin (arm_v5t_le-gcc, etc. tool)– Tools Location: …(C:/mvcyg4.0/)opt/montavista/pro/bin (MVL tools, rpm, etc.)– Comes in cross-arm_v5t_le-0600980.iso MV-Pro CD (and MV-Eval file mvl_target_setuplinux_1_20_00_10.bin for Linux, I think)– This is MVTOOL_DIR in Rules.make

• Docs (man, info, pdf, html)• DevRocket (Eclipse) centric

– DevRocket Executable Location: C:\mvcyg4.0\opt\montavista\common\eclipse– Dev Rocket Workspace Location (App): C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\DecodeAAC points to->– DevRocket Workspace (Kernal): C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\uImageDevRocketLSP120

contains C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\uImageDevRocketLSP120\arch\arm\boot\uImage

• Special Features

– Real Time Pre-emption, LTT, KGDB, High Res Timer• Configuration

– DevRocket, Make Menuconfig, xconfig• Build

– DevRocket, gmake• Debug

– DevRocket, printf, LTT, GDB, KGDB, DDD

46

VMware Image – Root Filestructure (/)

47

WinXP – Root Filestructure (/)

•In WinXP put everything under C:\mvcyg4.0\home\a0321791

48

DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS

TECHNOLOGYTECHNOLOGY ••88

Open Source Linux, DDD, etc.•Was able in import OMAP3 into DevRocket (OMAP35x_LINUX_PSP_1_0), but need to tweak to build ARCH_OMAP35XX instead of ARCH_DAVINCI (PREFIX=arm_v5t_le-)•Probably need to use CodeSourcery and build In Linux•DDD


Recommended