Support Tools
From OMAPpedia
Contents |
[edit] Linux Host Setup
Details on how to setup the host machine with the necessary software tools and compilers can be seen at Host_PC_Setup
[edit] Installing USB to Serial on PC
Zoom2's debug should be connected and all switches on the debug should be set to "OFF" position.
Note: If Windows does not recognize the USB to serial device as shown above go to http://www.ftdichip.com/Drivers/VCP.htm and download the latest FTDI drivers zip file. Extract the zip file and when installing the device drivers via the Windows “Found New Hardware” wizard, direct Windows to the FDTI directory that contains the *.inf files. | |
| |
| |
Connect Zoom2/Blaze to PC and open Teraterm or Hyperterm. Ensure that the following settings are selected:
For Blaze:
- COM Port: COM11 (3rd port)
- Bits per second: 115200
- Parity: None
- Flow Control: None
For Zoom2:
- COM Port: Listed above
- Bits per second: 115200
- Parity: None
- Flow Control: None
- Power on device
- On startup device display will show
- "OMAP44XX SDP #" on Teraterm/hyperterm output screen for Blaze
- "OMAP34XX ZOOM2#" on Teraterm/hyperterm output screen for Zoom2
[edit] USB to "On The Go"
[edit] Hardware Setup
|
On "REV A" boards, USB works with power from any available source. Connect the USB cable to the main board: the ports on the debug board are not connected for USB. For revisions prior to "REV A", including numbered revisions, power must be supplied either through the AC connector on the main board or from the battery connector, also on the main board. If you plug the AC adaptor to the debug board, USB will not work.
Hardware configuration in which USB OTG port will work: Note: AC power connected to main board, Battery connected to main board. NOTE: USB won't work if the power is connected to the debug board. Connect debug board before connecting power. (For the first lot of boards, Battery should be above 2V. This is fixed on final set of production boards. All boards before March,09 are first lot boards.) Debug USB port remains at the same place J12 on debug board. MUSB OTG port is located on the Main board. Use the latest u-boot and x-loader as mentioned in the getting started on zoom2 guide. |
Note: AC power connected to main board, Battery connected to main board. NOTE: USB won't work if the power is connected to the debug board. Connect debug board before connecting power. (For the first lot of boards, Battery should be above 2V. This is fixed on final set of production boards. All boards before March,09 are first lot boards.) Debug USB port remains at the same place J12 on debug board. MUSB OTG port is located on the Main board. Use the latest u-boot and x-loader as mentioned in the getting started on zoom2 guide.
[edit] ADB over USB
[edit] Android Gadget ADB: Linux PC Host
Sequence:
1. Boot the Android kernel with g_android built in and 'Android gadget adb' function selected
2. Connect one end of the cable to the MUSB port on the target and the other to the Linux HOST machine;
3. On the left hand top corner of the Android UI screen you should see a ‘USB Attached’ Notification.
4. Make sure on the target 'USB Debugging' is selected:
-On Android UI, -Press F1 key, -Goto Notifications -Select USB debugging
5. To make ADB work for TI vendor ID, On your Host machine create the following file (if not already present):
$ sudo su <psswd> $ mkdir ~/.android $ vi ~/.android/adb_usb.ini $ echo "0x0451" > ~/.android/adb_usb.ini $ cat /root/.android/adb_usb.ini 0x0451
6. Mount the 'usbfs' filesystem on the Linux Host Machine
$ sudo mount -t usbfs none /proc/bus/usb
7. Also, on the Host make sure adb server is running:
$ sudo su <psswd> $ cd <path>/mydroid/out/host/linux-x86/bin $ ./adb kill-server $ ./adb start-server
8. Verify that the gadget enumerated properly on the host (Linux PC) by running:
$ cat /proc/bus/usb/devices | grep “usbfs”
9. Now check that the device is connected:
$ cd <path>/mydroid/out/host/linux-x86/bin $ ./adb devices
[output should be something like this] List of devices attached [serial number] device
$ ./adb shell
[This should take you to the console prompt of the board] to quit, type exit. 10. Write a file in to the FS on board:
$ ./adb push <path>/file ./
[This will transfer 'file' in to the / of the FS on the board, check using 'ls' on the console prompt of the board] 11. Read a file from the FS on board into the Host machine
$ ./adb pull ./file <path>/dir/
[This will copy 'file' from the FS into the Host machine]
[edit] Android Gadget ADB: Windows PC Host
Sequence:
1. On windows Host, Download latest Android SDK (http://developer.android.com/sdk/index.html) and unzip it in a local folder (i.e. c:\android_sdk).
2. Optionally, you may want to add the location of the SDK's primary tools directory to your system PATH. Right-click on My Computer, and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add the full path to the tools\ directory to the path.
3. A windows Host needs a driver to recognize the device as an android ADB peripheral. This driver can be downloaded with the android sdk manager or if you have problems fetching the Google repository, you can download the driver from the following location: (https://dl-ssl.google.com/android/repository/usb_driver_r03-windows.zip) and unzip it in sdk folder (i.e. c:\android_sdk\usb_driver)
4. Edit (or create and then edit if it doesn't already exist) file in "%USERPROFILE%\.android\adb_usb.ini": echo 0x0451 > "%USERPROFILE%\.android\adb_usb.ini"
5. Edit android_winusb.inf to match TI vendor ID and USB Gadgets product ID's:
Under [Google.NTx86] section add these lines and save the file:
; ;OMAP-3/4 %SingleAdbInterface% = USB_Install, USB\VID_0451&PID_D101 %CompositeAdbInterface% = USB_Install, USB\VID_0451&PID_D102&MI_01 %CompositeAdbInterface% = USB_Install, USB\VID_0451&PID_D106&MI_02 %CompositeAdbInterface% = USB_Install, USB\VID_0451&PID_D107&MI_03 %SingleAdbInterface% = USB_Install, USB\VID_0451&PID_FFFFE %CompositeAdbInterface% = USB_Install, USB\VID_0451&PID_FFFE&MI_01
6. Boot the Android kernel with g_android built in and 'Android gadget adb' function selected
7. Connect micro-B USB cable between Blaze board and Windows PC.
8. On the left hand top corner of the Android UI screen you should see a ‘USB Attached’ Notification.
9. Make sure on the target 'USB Debugging' is selected:
-On Android UI, -Press F1 key, -Goto Notifications -Select USB debugging
10. Go to 'Device Manager' (Right click on 'My computer', select 'Manage', selcet 'Device Manager' under system tools in the left column) and see if your device is enumerated as: "OMAP-3/4" OR "OMAP3"/"OMAP4" [for older releases]
11. Install driver for the device using android_winusb.inf file
- Right click on the enumerated device - select 'update driver' option - Provide the path to the android_winusb.inf file
12. Once the driver is installed, the device should appear in the Device Manager as shown:
13. Now make sure adb server is running on Windows, Open command prompt and restart adb server just to make sure it is in a proper state:
$ adb kill-server $ adb start-server $ adb devices
[output should be something like this] List of devices attached [serial number] device
$ adb shell
[This should take you to the console prompt of the board] to quit, type exit.
12. Write a file in to the FS on board:
$ adb push <path>/file ./
[This will transfer 'file' in to the / of the FS on the board, check using 'ls' on the console prompt of the board]
13. Read a file from the FS on board into the Host machine
$ adb pull ./file <path>/dir/
[This will copy 'file' from the FS into the Host machine]
[edit] Downloading the USB Android driver for Windows
Java is needed to run the android sdk manager. just select the usb driver package:
the driver is now available in the sdk directory :
[edit] finding the Vendor ID and Product ID of the device
You need to modify the .inf file that comes with the driver to match the Vendor ID and the Product ID of the board. To find the VID and PID of your board, connect the board to your windows computer. if this one proposes you to install a driver, say no and go to the device manager in the control panel.
right click ->properties and then click on the 'details' tab of the new USB peripheral.
select the 'Device Instance Id' to get the VID and the PID :
then go back to the device manager, right click -> "uninstall" on the USB device, and disconnect the device.
[edit] ADB over Ethernet
Check if you have the following property set in your init.rc. If not do it manually on the console
# setprop service.adb.tcp.port 5555 # stop adbd # start adbd
Set the environment variable ADBHOST to the IP address of your board:
$ export ADBHOST=<Board IP>
Also, on the Host make sure adb server is running:
$ sudo su <psswd> $ cd <path>/mydroid/out/host/linux-x86/bin $ ./adb kill-server $ ./adb start-server $ ./adb devices
[output should be something like this]
List of devices attached
[Emulator-device-number] device
$ ./adb shell
[This should take you to the console prompt of the board] to quit, type exit.
[edit] Firewalls
"Git" is a great tool and does work behind proxy's / firewalls with a little help. There are many ways to do this however this section will only cover "corkscrew".
[edit] Corkscrew
Download "corkscrew" at Corkscrew and un-tar it.
cd corkscrew-2.0 ./configure make cp corkscrew ~/bin/corkscrew
This can be placed anywhere as long as it is in PATH. Next create the following simple shell script called git-proxy in ~/bin directory (or some place listed in PATH).Replace items inbetween "<...> with the correct information.
#!/bin/sh exec <path_to_corkscrew>/corkscrew <proxy_name> <proxy port> $*
Save the file and give it execute permissions
chmod u+x git-proxy
Run it to test it. It should give the usage statement for corkscrew.
Now tell git you want to use a proxy. Replace the stuff between the "<...>" and don't leave out the single quotes.
git config --global core.gitproxy '<path_to_proxy>/git-proxy'
This will setup "git" to always use the proxy for all git commands, with all git trees.
To set the proxy for just a specific git tree execute instead something similar to the following. The below command configures "git" to use the proxy for all URLs with a kernel.org suffix.
git config --global core.gitproxy '"<path to proxy>/git-proxy"; for kernel.org' 'for kernel.org$'
[edit] Ubuntu's Firewall setting
Configure Ubuntu's "Network Proxy" appropriately to get access to source code
- System-->Preferences-->Network Proxy
- Set the following parameters:
- Select: "Proxy Configuration"
- Select: "Manual proxy configuration"
- Check mark: "Use the same proxy for all protocols
- Enter following data: HTTP proxy:<enter proxy address> Port: <enter port>
- Close
Configure the Proxy for the package manager:
- System -> Administrator -> Synaptic Package Manager
- Login -> Settings -> Preferences
- Network tab -> Add the HTTP proxy and port number in order to get the package manager to be able to get past the firewall.
Configure "http_proxy" and "ftp_proxy" environmental variable:
If there is a need to use a proxy server to access the web set the environment variables "http_proxy" and "ftp_proxy". This will allow "apt-get" etc. to use this environment variable value. Below would be the ideal way of assigning values for "http_proxy":
# export http_proxy=”<proxy-server>:<port>” # export ftp_proxy="<proxy-server>:<port>"
Add this to ~/.bashrc so that everytime the machine is rebooted this variable does not have to be exported.
[edit] Serial Console over USB to OTG
Uboot, xloaded and an wokring kernel should be built prior to proceeding with this section. Refer to [[|]] for more information regarding uboot and xloader.
Refer to USB to "On The Go" for hardware setup.
[edit] Kernel Configuration
On Zoom-I and Zoom-II, to enable Serial console over USB OTG the following configurations to the kernel should be set.
CONFIG_USB_GADGET_MUSB_HDRC=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DEBUG=y CONFIG_USB_GADGET_DEBUG_FILES=y CONFIG_USB_GADGET_SELECTED=y CONFIG_USB_GADGET_DUALSPEED=y CONFIG_USB_G_SERIAL=y
To enable above configuration follow the steps listed below
cd <path_to_kernel_dectory> # make CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
Selected the following menu options:
- Device Drivers
- USB Support
- Enable
- <*> Inventra Highspeed Dual Role Controller (TI, ...)
- Enable
- USB Support
- Device Drivers
- USB Support
- USB Gadget Support
- Enable:
- USB Peripheral Controller (Inventra HDRC USB Peripheral (TI, ...))
- <*> USB Gadget Drivers
- USB Support
[edit] Initiating serial console
[edit] On Target
Run the following commands to establish serial console.
- List the major number of USB serial gadget
# cat /proc/devices Character devices: 1 mem 2 pty 3 ttyp 4 /dev/vc/0 4 tty 4 ttyS 5 /dev/tty 5 /dev/console 5 /dev/ptmx 6 lp 7 vcs 10 misc 13 input 14 sound 21 sg 29 fb 99 ppdev 116 alsa 128 ptm 136 pts 180 usb 189 usb_device 259 ttyGS
- Create node using command
# mknod /dev/ttyGS0 c 259 0
- Establishing serial console on ttyGS0
# /sbin/getty -L /dev/ttyGS0 115200 vt100
[edit] Host side
- ttyACM0 should be set as serial device.
minicom -s
- Select serial console and change /dev/tty to /dev/ttyACM0 with baudrate 115200.
serial console should read:
# login: root <enter> # ls






