sw tools solutions for da8x - texas instrumentsprocessors.wiki.ti.com/images/9/99/linuxbydegrees...1...
TRANSCRIPT
1
SW Tools Solutions for DA8x
Linux by Degrees (updated)Part I
(Using DVEVM/DVSDK 1.20.00.10 and MontaVista Pro Version 4.0.1)
October 31, 2008
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– MV Evaluation files and installation (comes with DVEVM) – Linux and WinXP– MV-Pro files ( and installation (comes with DVSPB) – Linux and WinXP
• DevRocket (MV-Pro only) - Linux and WinXP– Importing LSP and building Kernel (uImage) in Bash Shell and DevRocket– Importing DaVinci and building Decode demo (for AAC) in (Bash Shell and) DevRocket– Remote Debug of decode demo with DevRocket using GDB (Server)– Booting target and use of PumpKIN TFTP and NFSAxe Servers in WinXP– Remote Debug of decode AAC demo with DevRocket– (Trace and) SoC Analyzer (And LTT)– Remote Debug of decode demo AAC with DevRocket using KGDB– uImage AIC33 driver Manipulation (sample rate)– GUI-based Target Filesystem browsing using DevRocket
• Dual-core Debug (CCS Interaction) – Build in DevRocket, Debug in CCS, target GDB (moved to allcopy)…• DSPLINK Interaction – Build in DevRocket, Debug in CCS
– DSP-side in CCS– ARM-side in target GDB
• 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
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.
5
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
6
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).
7
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
8
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
9
This is what you get with the DVEVM:http://focus.ti.com/docs/toolsw/folders/print/tmdsevm6446.html
For MV-Eval Install – Linux box or VMWare – LSP only(External from: https://www-a.ti.com/extranet/cm/product/dvevmsw/dspswext/general/v1_20_00.shtml)mvl_lsp_setuplinux_1_20_01_10.bin (Target Filesystem)dvevm_setuplinux_1_20_00_10.bin (decode demo app and media files)dvsdk_setuplinux_1_20_00_10.bin (decode demo app and buildable source)
By default goes into /opt/dvevm/mv_pro_4.0/montavista/pro/devkit/lsp/ti-davincifor copying later into /home/user/workdir/lsp/ti-davinci
Please note that DevRocket is NOT provided with Eval tools.
(Other Linux files. Linux tools I think. So more than LSP?mvl_setuplinux_1_20_00_10.binmvl_target_setuplinux_1_20_00_10.bindsp_bios_setuplinux_5_31_01_07.bin?)
For MV-Eval Install – WinXP – LSP only(Internal from:ftp://ftp.dal.design.ti.com/sanb-davinci/1_20_00_10)mvl_lsp_setupwin32_1_20_00_10.exe (Target Filesystem)dvsdk_setupwin32_1_20_00_10.exe (decode demo app and media files)dvevm_setupwin32_1_20_00_10.exe (decode demo app and buildable source)
By default goes into C:\montavista for copying later into C:\mvcyg4.0 (MV-Pro if necessary)
Please note that DevRocket is NOT provided with Eval tools.
Montavista Install MV-Eval – Linux and WinXP
10
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_JoewithMulti - 16.5 Gbytedavinci_dm644x_rhel4_ws_u4_dvevm_1_20_00_01_Joe - on lab laptop - 16.9 GByte (12 compressed)davinci_dm644x_rhel4_ws_u4_dvevm_1_20_00_01_JoewithDevRocket - 18.7GByte - useless. Delete and use 2optsdavinci_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 Install CD’s host-pro-0600980.iso target-arm_v5t_le-0600980.iso (LSP, I think)cross-arm_v5t_le-0600980.iso (arm/v5t_le/bin)devrocket-0501898.iso src-pro-0600980.iso docs-pro-0600980.isolspslsps--titi--davinci_evmdavinci_evm--0600990.iso0600990.iso--Could not install with this.Could not install with this.
For MV-Pro Install on VMWare: In VMWare, HDD->Share folder. Then extract the 6 .iso files mentioned above to local VMware /temp directory (Path error fix "- to /"after chmod).
Install with 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. Also install LSP failed with select in opt2. So put Also install LSP failed with select in opt2. So put arch in opt2.arch in opt2.
11
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
12
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 - WinXPThis is what you get with the DVSPB:http://focus.ti.com/docs/toolsw/folders/print/tmdsdvspba9.html
MV-Pro Install CD’s host-pro-0600980.iso target-arm_v5t_le-0600980.iso (LSP, I think)cross-arm_v5t_le-0600980.iso (arm/v5t_le/bin)devrocket-0501898.iso src-pro-0600980.iso docs-pro-0600980.isolspslsps--titi--davinci_evmdavinci_evm--0600990.iso0600990.iso--Could not install Could not install with this.with this.
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.(Providing mvl_setuplinux_1_xx_xx_xx.exe and mvl_target_setuplinux_x_xx_xx_xx.exefor WinXP would be a lot less painful if customers take this route. Note that /tmp/mvl-install is 2.5Gbyte. Also install LSP failed with select in opt2. Also install LSP failed with select in opt2. So put arch in opt2.So put arch in opt2.
13
•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
14
•In DevRocket workspace File->New->Kernal Project does not show an LSP)•MontavistaZone says to run in a Bash shell:
•/opt/montavista/<edition>/host/bin/mvl-setup•Or better yet (next slide)
DevRocket – If no LSP Installed
15
•In DevRocket workspace for LSP under•C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\uImageDevRocketLSP120
•Key is (if File->New->Kernal Project does not show an LSP), then File->Import->External C/C++ Project
DevRocket – Import for LSP
•Will take almost ½ to 1 hour to import•Turning off the indexer under “Project->Properties->C/C++ Indexer->Uncheck enable” can speed up.
16
•Add paths in Bash shell by:•Type:
PATH="/opt/dvevm/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“
•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=/opt/montavista/pro/devkit/arm/v5t_le/bin:/opt/montavista/pro/bin:/opt/montavista/common/bin:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
…•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 ARCH=arm CROSS_COMPILE=arm_v5t_le-uImage > output.txt
make ARCH=arm CROSS_COMPILE=arm_v5t_le-uImage 2> err.txt
Also get to the entire WinXP HDD by:cd /cygdrive/c/mvcyg4.0
Menuconfig has issues with kconfig:make ARCH=arm CROSS_COMPILE=arm_v5t_le-menuconfig > yoyo.txt 2>&1
So set in VMWare a copy .config file
17
•Check DevRocket Build Environment under DevRocket Project->Properties->Builder Configuration->Environment:
MVHOSTTOOLCHAIN=/opt/montavista/pro/binMVCYGWINUSRBIN=C:\mvcyg4.0\usr\binMVHOME=/opt/montavistaMVCOMMONTOOLCHAIN=/opt/montavista/common/binMVCYGWINBIN=C:\mvcyg4.0\binMVTARGETTOOLCHAIN=/opt/montavista/pro/devkit/arm/v5t_le/bin
DevRocket – Build Environment
18
•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
19
DevRocket – Import for Decode AAC demo
•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 for LSP under•C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\DecodeAAC
•Key is (if File->New->Kernal Project does not show an LSP), then File->Import->External C/C++ Project
20
Decode AAC demo – Rules.make Environment
•Rules.make needs to be modified to match the particular PC directory environment. •Start with:•C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\DecodeAAC•Rest of the modifications on the next slide
21
Decode AAC demo – Rules.make Environment
•Rest of the modifications:# The installation directory of the DVEVM dvevm_1_20.DVEVM_INSTALL_DIR=c:/mvcyg4.0/home/a0321791/montavista/devrocket2.0/workspace/DecodeAAC#jg 8/12/08 on TI Network laptop
#jg 7/24/08 **Configuro might not like changing this one to full path!! Bash doesnt' care**# The directory that points to your kernel source directory.LINUXKERNEL_INSTALL_DIR=c:/mvcyg4.0/home/a0321791/montavista/devrocket2.0/workspace/uImageDevRocketLSP120#jg 8/12/08 on TI Network laptop
# The prefix to be added before the GNU compiler tools (optionally including# path), i.e. "arm_v5t_le-" or "/opt/bin/arm_v5t_le-".MVTOOL_DIR=c:/mvcyg4.0/opt/montavista/pro/devkit/arm/v5t_leMVTOOL_PREFIX=$(MVTOOL_DIR)/bin/arm_v5t_le-#jg 7/23/08
# Where to copy the resulting executables and data to (when executing 'make# install') in a proper file structure. This EXEC_DIR should either be visible# from the target, or you will have to copy this (whole) directory onto the# target filesystem.EXEC_DIR=/home/a0321791/montavista/devrocket2.0/workspace/DecodeAAC#EXEC_DIR=c:/mvcyg4.0/home/a0321791/montavista/devrocket2.0/workspace/DecodeAAC#jg 8/12/08 on TI Network laptop - DevRocket does not like c: path (I think)
22
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
23
DevRocket Remote Debug (GDB) of Decode AAC demo
•To prep for remote debugging in DevRocket, •Go to Project->Debug->Debugger Tab•Make sure Debugger= GDB Server •GDB Debugger=arm_v5t_le-gdb•Connection=TCP•IP address=IP of Target/DVEVM (158.218.121.65)•Port #=100000
24
DevRocket Remote Debug – Target Setup
To prep for remote debugging on target (TCP/IP Address 158.218.121.65):
•Mount WinXP NFS Server (TCP/IP Address 158.218.121.89) to Target [email protected]:~# mount 158.218.121.89:/c/mvcyg4.0/home/a0321791/montavista/devrocket2.0/workspace /misc/winxpnfs
•Run copied version of decoded app (to avoid file access conflicts) along with .sh [email protected]:~# cd /misc/winxpnfs/decodeaac/demos/decode/[email protected]:/misc/winxpnfs/decodeaac/demos/decode/debug# ./[email protected]:/misc/winxpnfs/decodeaac/demos/decode/debug# cp decoded [email protected]:/misc/winxpnfs/decodeaac/demos/decode/debug# ./decoded2 -a data/sounds/davincieffect.aac gdb &[1] [email protected]:/misc/winxpnfs/decodeaac/demos/decode/debug# Decode Debug: NTSC selectedargc = 4argv[0] = ./decoded2argv[1] = -aargv[2] = data/sounds/davincieffect.aacargv[3] = gdbDebug is argv[3]gdb(Could not get Project->Debug->(x)=ArgumentsTab to work for argc/argv. This was better,)
•Run gdbserver (in /usr/bin) with attach to decoded2 [email protected]:/misc/winxpnfs/decodeaac/demos/decode/debug# gdbserver host:10000 --attach 1125Attached; pid = 1125Listening on port 10000(gdbserver host:10000 ./decoded2 -a data/sounds/davincieffect.aac nogdb dspoff &Will also work but seems to close the targer Putty window when done)
•Added the gdb switch to decode to determine run time whether to debug or not./decoded2 -a data/sounds/davincieffect.aac gdb & - debug./decoded2 -a data/sounds/davincieffect.aac nogdb & - no debugSee main.c code in next slide
25
DevRocket Remote Debug •GDB Server running on Target (TCP/IP Address 158.218.121.65)for Port 10000 with PID 1125
•DevRocket Breakpoint at line 325 of main.c•If you add ijoe=0 to the expressions tab and “resume”, you can continue the debug•Single step was not working but Resume to next Breakpoint OK
26
(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
27
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"
28
DevRocket (WinXP) – Remote Debug uImage (KGDB)
Tried rebuilding CMEM and got modpost error in uImageDevRocketLSP120/scripts make[3]: Entering directory `/home/a0321791/montavista/devrocket2.0/workspace/uImageDevRocketLSP120'CC [M] /home/a0321791/montavista/devrocket2.0/workspace/allcopy/cmem_1_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.oBuilding modules, stage 2.MODPOST
make[4]: *** [__modpost] Error 139make[3]: *** [modules] Error 2make[3]: Leaving directory `/home/Administrator/montavista/devrocket2.0/workspace/uImageDevRocketLSP120'
Need to try all of the above in VMWare
29
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
30
DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS
TECHNOLOGYTECHNOLOGY ••88
•Gave up on AAC decode due to CE error and lack of source.•Moved to all.x64p since source is available for codec and server (Built in Devrocket)
•ARM Side Object and Source:C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\demos\decode\debug\decodedC:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\demos\decode\main.c
•DSP Side Object (map file) and Source: C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\codec_engine_1_10_01\examples\servers\all_codecs\all.x64PC:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\codec_engine_1_10_01\examples\servers\all_codecs\package\cfg\all.x64P.mapSRC: C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\codec_engine_1_10_01\examples\codecs\sphdec_copy\sphdec_copy.c
•Fake all.pjt (and allarm.pjt, though target GDB works better for ARM) project give at least function level debugging without –g option (adding C compiler options look like a RTSC-layer nightmare, though after figuring out linker LD_Flags options, need to revisit )
•For debug on ARM CCS can: File->Load Symbols->Load Symbols of decode. Then File->Load Symbols->Add Symbols only of dsplinkk.ko and cmemk.ko. But GDB works better (will show screenshot later)•For debug on DSP CCS: File->Load Symbols->Load Symbols of all.x64P. (will show screenshot later)
•Had to find/install framework_components_1_10_01 to build ??
CCS Interaction – Build in DevRocket, Debug in CCS…
31
DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS
TECHNOLOGYTECHNOLOGY ••88
CCS Interaction – Build in DevRocket•Gave up on AAC decode due to CE error and lack of source.•Moved to all.x64p since source is available for codec and server (Built in Devrocket)
•Used sphenc_copy to capture some audio content: ./encoded2 -s sin.raw.g711 -l -t 30•Used sphdec_copy play it:./decoded2 -l -s sin.raw.g711 nogdb dspoff
32
DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS
TECHNOLOGYTECHNOLOGY ••88
Due to codec engine errors with AAC decode, moved to all.x64p that copies a speech file. Used sphdec_copy to playback some audio content:./decoded2 -l -s sin.raw.g711 nogdb dspoff
Putting it in CCS gives the above with KOV, memory, and some C source/function level debug
CCS Interaction
33
DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS
TECHNOLOGYTECHNOLOGY ••88
ARM Side Make a .map file (Finally!). Not great for addresses due to MMU, but good to trace symbols and build sources. Look in:C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\demos\decode\Makefile
And 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 Object and Source (Need to fully trace MSGQ_Put):C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\dsplink_1_30_08_02\packages\dsplink\package\ti\dsplink\gpp\Linux\Davinci\DEBUG\dsplinkk.koC:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\dsplink_1_30_08_02\packages\dsplink\gpp\export\BIN\Linux\Davinci\Release\dsplink.lib has -> MSGQ_Put()C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\dsplink_1_30_08_02\packages\dsplink\gpp\src\api\msgq.c --- which calls MSGQ_put()C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\dsplink_1_30_08_02\packages\dsplink\gpp\src\ldrv\ldrv_msgq.c -- LDRV_MSGQ_Put()???C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\dsplink_1_30_08_02\packages\dsplink\gpp\src\osal\Linux\sync.c -- SYNC_SignalSEM???-from Samir DSP Champs
From Linux Console:cmem initialized 3 pools between 0x87800000 and 0x88000000DDR_START 0x8fa00000 DDR_SIZE 0x400000
DSP Side Object and Source (Need to fully trace MSGQ_put):C:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\dsplink_1_30_08_02\packages\dsplink\package\ti\dsplink\dsp\DspBios\Davinci\DEBUGC:\mvcyg4.0\home\a0321791\montavista\devrocket2.0\workspace\allcopy\dsplink_1_30_08_02\packages\dsplink\dsp\src\msg\DspBios\Davinci\zcpy_mqt.c - ZCPY_MQT_swiFxn which calls MSGQ_put()
Can build CMEM, DSPLINK, etc. in DevRocket ones build issues are resolved
DSPLINK Interaction Build in DevRocket, Debug in CCS…
34
DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS
TECHNOLOGYTECHNOLOGY ••88
DSPLINK Interaction Build in DevRocket, Debug in CCS…
35
DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS
TECHNOLOGYTECHNOLOGY ••88
DSPLINK Interaction (CCS Only)
ARM and DSP talking over DSPLINK but breakpoints not stable on ARM with XDS due to ARM MMU. Can halt/run but no breakpoints, program memory manipulation
DSP Side:
36
DD SPSPTEXAS INSTRUMENTS TEXAS INSTRUMENTS
TECHNOLOGYTECHNOLOGY ••88
DSPLINK Interaction (DSP-side CCS)
ARM/DSP talking over DSPLINK. Use all.x64P.map file to find MSGQ_put (lower case “p”) in CCS:
DSP Side:
37
••88
DSPLINK Interaction (ARM-side GDB)
ARM/DSP talking over DSPLINK. Use allcopy.map file to find MSGQ_Put (cap P) from DSPLINK in target GDB gdb --args ./decoded2 -s sin.raw.g711 nogdb dspoff
•Symbol source file path
38
•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
39
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
40
VMware Image – Root Filestructure (/)
41
WinXP – Root Filestructure (/)
•In WinXP put everything under C:\mvcyg4.0\home\a0321791
42
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