Building in VMWare Linux while booting Linux and Debugging (Linux Aware) with CCSv4 - WinXP
1
Making uImage in:
DaVinci-PSP-SDK-
03.20.00.14/src/kernel/linux-03.20.00.14
Booted Linux in Tera Term
Debugging Linux Kernal in CCSv4
with XDS510 (better than kGDB)
Basically just need vmlinux file from: /home/root1/joetemp/OMAPL137/DaVinci-PSP-SDK-
03.20.00.14/src/kernel/linux-03.20.00.14:
http://processors.wiki.ti.com/index.php/Linux_Aware_Debug_(CCSv4.x)
Breakpoints available after
Target->Load Symbols->vmlinux
Building in VMWare Linux while booting Linux and Debugging with CCSv5 (Linux Aware) - Linux
2
C code clickable from project Window
after Target->Load Symbols->vmlinux
Booted Linux in Tera Term (like last slide) , debugging Linux
Kernel in CCSv5 with XDS510 (registers, breakpoints, etc.)
Basically just need vmlinux file from: /home/root1/joetemp/OMAPL137/DaVinci-PSP-SDK-
03.20.00.14/src/kernel/linux-03.20.00.14:
http://processors.wiki.ti.com/index.php/Linux_Debug_in_CCSv5
In Ubuntu 9.04:host $gksudo /usr/local/CCSv5/ccsv5/eclipse/eclipse &
3•GEL file not reliaible with MMU on turn on in DSP uboot: •Type:
U-Boot > mw 0x01C10A3C 103U-Boot > md 0x01C10A38 401c10a38: 00000103 00000103 00000000 00000000
Debug ARM9 and DSP simultaneoulsy with CCSv4/CCSv5 Linux Aware
Debug ARM9 and DSP simultaneously Turning off MMU will kill Linux
http://support.spectrumdigital.com/boards/evmomapl137/revd
TLV320
Standalone EVM Block Diagram (USB Stick for uImageand SD/MMC Card Filesystem)
Switch on power
Use Teraterm or Hyperterminal to talk to uboot
(115k-*-N-1 – >No flow control)
Boot uImage from FAT32 USB
stick (USB0 microUSB
connector)
Filesystem on SD/MMC card
Example Comparison : MVL Pro 5.0 vs GITMVL 5.0 Pro Community Linux
Kernel VersionUses 2.6.18, which is almost 3 years old
Uses latest available kernel
Kernel bug-fixesApplied to 2.6.18, so no need to change kernel versions
Applied to current release, which changes every few months. User may need new kernel to get a fix.
File SystemComprehensive host and target file systems with GUI tools for optimization.
Not part of kernel. TI is addressing through Arago. Initially may be less user-friendly than MVL.
Linux run-time Licensing
Demo copy and LSP open source, but original licensing has created confusion.
TI offering is clearly free as GIT Linux distributions are open source.
Tools licensingGNU Tools free. IDE requires annual subscription.
GNU Tools free. IDE requires annual subscription.
Third-party support
MV and its partners Multi-vendor, including MV
Format SD/MMC Card for Target Filesystem
6
•Both CL and MV described here: http://processors.wiki.ti.com/index.php/Creating_filesystems_on_removable_media#DaVinci_GIT_based_SDK
•One option get filesystem arago-demo-image-da850-omapl138-evm.tar.gz from:• http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/sdk/omap_l138/1_00/latest/index_FDS.html
•To extract filesystem type:host $cd /home/root1/joetemp/OMAPL137/workdir/filesyshost $tar zxvf arago-demo-image-da850-omapl138-evm.tar.gz
•In summary, type:host $ sudo dpkg-reconfigure -plow dashhost $/sbin/parted /dev/sdb1 printhost $/sbin/parted /dev/sdb1 rm 1host $/sbin/parted /dev/sdb1 mkpartfs primary ext2 0 950Mhost $mount -t ext2 /dev/sdb1 /media/usbdiskhost $chmod 777 -R .host $cp –Rf /home/root1/joetemp/OMAPL137/workdir/filesys/. /media/usbdisk
Other options I’ve never tried like USB stick for filesystem on the same page
More details info on NFS and TFTP here:http://processors.wiki.ti.com/index.php/Setting_up_OMAP-L137_Target_File_System#Exporting_a_Shared_File_System_for_Target_Access
7
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 automounted
Format 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
MV, but should
work on CL
with Cygwin
8
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;setenv
autoload no;dhcp;bootcmd dhcp;setenv serverip 192.168.1.100;tftpboot;bootm
Note: Directory on SD
Card:/joewashereSD2
MV, but should
work on CL
with Cygwin
Other
9
DSPTEXAS INSTRUMENTS
TECHNOLOGY •8
Linux Cheat Sheet
10
•For Ubuntu 9.04
•Generic file and netwoking:
host $sudo bashhost $whoamihost $printenvhost $gksudo nautilus &host $gksudo gedit &host $gksudo shares-admin &host $gksudo gnome-search-tool &host $gksudo firefox &host $/sbin/ifconfig
host $make all > yo.txt 2>&1host $make -d all > yo.txt 2>&1host $make -p all > yodef.txt 2>&1host $tar zxvf filenamehost $tar cvzf <output.tar.gz> <directory> to create a ‘tarhost $ grep -i -r ddr * > yogrep4.txt
Editing /etc/exports the /etc/exports file is used for creating a share on the NFS serverFor Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255* /files 192.168.1.0/24(rw,no_root_squash,async)/home/root1/joetemp/DA830/workdir/filesys 192.168.1.0/24(rw,no_root_squash,async)Save this file and then in a terminal typehost $/ sudo /etc/init.d/nfs-kernel-server restartAlso after making changes to /etc/exports in a terminal you must typehost $sudo exportfs –a
•CCSv5 and SD XDS510 USB emulator specific:host $cd /usr/local/CCSv5/ccsv5/eclipsehost $gksudo /usr/local/CCSv5/ccsv5/eclipse/eclipse &
host $cd /usr/local/CCSv5/ccsv5/ccs_base_5.0.2.00006/emulation/drivershost $lsusbhost $./sdjtag -X portsavailable
11
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
•Teraterm for uBoot
•PumpKIN for tftp server
•NFSAxe for NFS Server
•WinXP Host TCP/IP Address is 158.218.121.89
MV, but should
work on CL
with Cygwin
12
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 5001
TCP 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 5001
TCP 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
nfsAxe NFS Server
MV-Pro/DevRocket
PC (Linux Box)
WAN/Internet port
Ethernetport
MV, but should
work on CL
with Cygwin
13
mount 192.168.1.100:/c/mvcyg5.0/joetemp /misc/winxpnfs
cd /misc/winxpnfs/wavplay/wavplay-1.4
make 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
nfsAxe NFS Server
MV-Pro/DevRocket
PC (Linux Box)
WAN/Internet port
Ethernetport
•Using /dev/dsp
/dev/dsp
MV, but should
work on CL
with Cygwin
14
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 system
Use filter to eliminate sinewave from audio stream
Flash LEDs and Load
DIP_1
DIP_2
XDAIS
Filter
ADC
DAC
•DSP
15
…command line and/or web page control
CPUEDMA
RCVCHAN gBufferRcvADC
DAC
McBSP0
Rcv
Xmt
XMTCHAN gBufferXmt
COPY
+
Pong
Pong
Ping
Ping
Boot Linux and add command line app to switch DIP
HTTP server on Linux, switch DIP with a mouse-click
Flash LEDs and Load
DIP_1
DIP_2
XDAIS
Filter
Technical TrainingOrganization
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 On
Off
•DSP
Linux ARM(bash and http server)
16
•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
Can use CCS
Stop-mode
debug instead