Cadenux Simplified Code Composer Studio Steps For Loading
ARM9 rrload Bootloader
Version 1.0
|
|
Trademarks
ARM is a registered trademark of ARM Limited. Linux is a registered
trademark of Linus Torvalds in the United States and other countries and is
used by Cadenux under license. Texas Instruments, Code Composer Studio, and TI
are registered trademarks of Texas Instruments Incorporated. All other
trademarks are the property of their respective owners.
Code Composer Studio 2.x Installation Steps
Installing Program
- Insert 2.x CD and select install. Install to the c:\ti directory.
- Remove the CD and reboot.
Installing Drivers
- Run SetupCCOMAP_PPplusDriver.exe.
- There should be a "Setup CCS2" icon on you desktop. Launch it.
- Import Configuration -> Clear, confirm with yes.
- Import Configuration -> Close dialog
- In 3rd pane, select "Install Device Driver". Install all drivers that
match sd*.dvr, installing sdgoheterogti.dvr last.
- Exit Setup CCS2 and rerun the program.
- Drag sdgoheterogti from the second pane to the first pane. Board
Properties wizard should appear. On the Board Properties tab, change
address 0x240 to 0x378 (which is your parallel port). If you are using
USB, pick the appropriate value.
- On the Processor Configuration tab, you should see 4 or 5 entires. If you
only see BYPASS, try exiting Setup CCS and restarting it. If that doesn't
work try deleting all sd*.drv and reinstalling them, then exit Setup CCS
and restart it.
- Select the TMS470R2x (which is TI's code name for ARM9), change the
Processor Name to "arm9" and Add Single. Select the TMS320C5400 or
TMS320C5500 name it c54 or c55 and click Add Single.
Click next.
- Click Next, then Finish (there are no GEL files needed). This will close
the Board Properties dialog.
- Setup Code Composer Studio File ->Save, then File ->Exit. Do not
run CCS.
Configuring Drivers
- There should be a SDConfig on your desktop. Launch that.
- Double click 378 (this is your parallel port). Use a different value if
you are using a XDS510USB. Double click Emu.
- Verify hardware product (XDS510PP_PLUS for parallel port JTAG
debugger).
- Set emulator port mode to something your BIOS supports. You can find the
port mode under I/O Configuration in your BIOS setup.
- SDConfig File->Save
- Connect the XDS510PP+ to your EVM, your computer, and to power.
Power up the EVM.
- Click Emulator->Reset, then Emulator->Test. In the lower frame, you
should see the line Found JTAG IR length of 12. If you have a
length other than 12, your board is not properly set up (or your hardware
has more devices in the JTAG scan chain). Make sure that
switches Test0 and Test1 on the board are both set to Low and double check
your emulator port mode, then repeat this step.
- Click Emulator->Reset a dozen or so times, then Emulator->Test a
dozen or so times. If the response is not consistent, then you likely
don't have the parallel port settings (ECP or EPP)
correct.
- File->Exit.
Using Code Composer Studio To Load rrload Bootloader
- There should be a CCS2 (OMAP) icon on your desktop. Launch it.
NOTE: If you no valid code on the flash chip, CCS may have trouble
synchronizing with the ARM processor (since the ARM processor will
likely be executing illegal instructions), which will bring up an error
message stating Can't Initialize Target CPU. Click
Retry and press and release the reset switch on the target
hardware. You may have to do this several times, changing the timing
when you release the reset switch compared to when you press
Retry. Another idea to try is hold down the reset button
and apply power. With the reset button still held down, start CCS.
When the CCS splash screen is display, release the reset button.
- Select Open->sdgoheterogti/dsp. On the new window that opens, click
Debug->Run Free. It is a good idea to minimize this window now to
avoid confusion.
- Back on the CCS: Parallel Debug Manager window, select
Open->sdgoheterogti/arm9.
- On the new window, click on Debug->Reset CPU. If everything is working
right, you should see
EA7FFFFE B 0x00200000
If, instead, you see 00000000 00000BAD ANDEQ..., then the JTAG is
out of synch with the board. In that case, you have to reset the target
hardware and restart CCS.
- Select Debug->Step Into (F8). If rrload is stored in flash and your
jumpers are setup to use flash, not SDRAM, then you should see
02000000 E59F03DC LDR R0, ...
If this is the first time rrload is being loaded, then the address
displayed after a single step will be 02000000 and the
instruction will be what ever is currently loaded at the beginning of
flash. This step is just to verify that CCS has control over the ARM
processor.
- Download <development directory>/rrload/setup.out
(ELF format) into memory. File ->Load Program. If everything is
working right, you should see
00000004 ... LDR R0, ...
- Start minicom (115,200, 8 data bits, 1 stop bit, no parity, no hardware
handshake, no software handshake) and connect the serial cable to
UART0.
- Debug->Run, wait a bit, Debug->Halt.
If everything is working right, you should see something like
00000014 ... B 00000014
with the address matching the "forever" label in the setup assembly
language source file (e.g. <development
directory>/rrload/setup_<processor>.S). Also, "Setup
Complete" message should be shown in the minicom window.
- Download the file rrload.dat, which is a version of
rrload in the CCS data format. CCS ARM9 doesn't read the ELF
version of rrload correctly. To load the file
rrload.dat,
File ->Data->Load...
Select the <development
directory>/rrload/rrload.dat file. The load address and PC
address can be displayed by running
make -C rrload clean all
in the <development directory>. The output will look
something like:
Load address (needed for loading rrload.dat using CCS):
08300180
Entry point (needed for loading rrload.dat using CCS):
0x083086f4
You also need to set the Program Counter in the ARM9 CPU register to the
entry point address by selecting
View ->Registers ->CPU Registers.
and then double clicking on the PC register value to bring up the dialog
box that allows the PC value to be set. Enter the "Entry Point" address.
If everything is working right, you should see
... E1A0C00D MOV R12, R13
- Debug->Run If everything is working right, you should see rrload menu
on the minicom terminal.
- Using the rrload menus, erase the entire chip.
- Using the rrload menu via minicom, store the bootloader into flash.
- If everything is working right, you can power down the broad, disconnect
the JTAG emulator, and then apply power to the board. You should see the
rrload menu displayed.