In accordance with the Convention, first introduce my own development environment:
- System: Win7 64bit SP1
- CCS version: Code Composer Studio 6.2.0
- Debug code: AM335X_STARTERWARE_02_00_01_01
- Emulator: Xds100v2 USB
- Circuit board: Its own according to Beaglebone_black, the chip is AM3358, including the Hundred Gigabit Network port, UART serial port, DDR3, NAND Flash, USB, SPI and IIC, in addition to SPI and IIC IO pin, Other circuits fully refer to the Beaglebone_black board.
In order to verify that the interface hardware of the circuit board is normal, we adopt the way of the bare-running driver. The code used is a Beaglebone test routine inside the am335x_starterware_02_00_01_01.
The front has been tested Gpio and serial port, today to verify the network port, schematic diagram as shown, and Beaglebone RevA5 exactly the same; Network card CCS project file in: D:\ti\AM335X_StarterWare_02_00_01_01\build\ Armv7a\cgt_ccs\am335x\beaglebone\enet_echo, the project can be imported with CCS.
Step 1: Import the Gateway program project file File->import. Code Composer Studio->ccs Project Next->select CCS porject to Import click Brower Select D:\ti\AM335X_StarterWare_02_ 00_01_01\build\armv7a\cgt_ccs\am335x\beaglebone Check the network port test program Enetecho, click Finsh
Step 2: Set the Debug version to release
Step 3: Compiling
Step 4: Build the target Board configuration file, name customization, click Finsh
Step 5: Test the Jtag Interface connection status, enter the configuration interface, choose your own emulator model, here I choose Xds100v2 USB, in the board or Decice dropdown box select AM3358, then click Save Save, and finally click on the test Coonnection, after success, will show the JTAG DR Integrity Scan-test has succeeded.
Step 6: Online emulation, click the Debug button, enter debug mode
Successfully enter debug mode as shown
Step 7: Connect the target board
After success, as shown in
Step 8: Load the gel file. Click Tools→gel Files and a new Gel File function window appears below the main CCS window. Right-click on the Gel Files window in the lower-right corner to load the gel file
(under D:\ti\ccsv6\ccs_base\emulation\boards\beaglebone\gel directory) SELECT, Beagleboneblack.gel
Step 9: Initialize the chip. Scripts->am335x_system_initialization->am335x_beaglebone_initialization
Step 10: Load the network port test program. Run->load->load program, select the Enetecho.out file you just compiled, the directory is D:\ti\AM335X_StarterWare_02_00_01_01\binary\armv7a\cgt_ Ccs\am335x\beaglebone\enet_echo\release
Step 11: Open the Serial debugging assistant, connect the serial port 0, here is using the AM3358 chip uart0,115200-n-8-1
Step 12: Run
Step 13: View the serial debugging assistant printing information
Step 14: Use your laptop to ping the target board
The computer network port configuration information is as follows
Note: Here to illustrate, I use the notebook debugging, not through the router, with a network cable directly connected to the circuit board, therefore, modified the method of communication in the routine, no use of automatic allocation IP the Way ( DHCP ), instead of using static IP Way.
Here's how to modify it:
(1) Modify the Static_ip_address_port1 and Static_ip_address_port2 in the Lwipopts.h file, the original value is 0, and now change to:
#define Static_ip_address_port1 0xc0a80164
#define Static_ip_address_port2 0xc0a80165
(2) Modify the IP Settings section of the enetecho.c file as follows
#if Static_ip_address_port1
Lwipifport1.instnum = 0;
Lwipifport1.slvportnum = 1;
LWIPIFPORT1.IPADDR = Static_ip_address_port1; 192.168.1.100
Lwipifport1.netmask = 0xffffff00;//255.255.255.0
LWIPIFPORT1.GWADDR = 0xc0a80101;//192.168.1.1
Lwipifport1.ipmode = ipaddr_use_static;
Bare Metal Debug AM3358 network Port