How to create a CrossWorks Project for OpenSSD

From OpenSSDWiki
Viewed 8184 times, With a total of 4 Posts
Jump to: navigation, search

Clicked A Few Times
Threads 11
Posts 39
You can use CrossWorks as an alternative to ARM’s development suite. CrossWorks is an inexpensive ($150USD for a non-commercial license) IDE that supports many inexpensive ($80 USD) USB ARM JTAG devices.

This guide is a work in progress.

1. Download and install CrossWorks for ARM here: http://www.rowley.co.uk/arm/index.htm
2. Activate the 30 day trial.
3. Install the Generic ARM CPU Support Package from Tools->Install Packages
4a. Goto File->New Project
4b. Under Manufactures, select Generic, and choose An executable for a generic ARM7 processor that supports only running from RAM located at address 0x00000000, then click next
4c. Change the project name to OpenSSD-1.0.5 and append the same to project location (where the files are stored), then click next.
4d. **not sure what these settings should be, maybe long instead of int ** click next.
4e. Uncheck crt0.s, sram_placement.xml, and Standard_ARM_Startup.s, then click next twice.
5a. Copy the target_spw, sata, include, and tc folders to the project location established in step 4c. Then copy and rename one of the ftl folders to ftl (eg: ftl_dummy renamed to ftl)
5b. open target_spw and delete init_rvds.s then rename init_gnu.s to init.s
5c. Create a folder in your project folder called "ARM RAM Debug" (this is automatically created on the first source build), and copy over ld_script from the build_gnu folder.
5d. add ld_script to the projects system files and change its file type under properties to "Linker Script"
6. Goto Project->Properties, under your solution change the following:
Preprocessor Options -> User Include Directories
$(ProjectDir)/include
$(ProjectDir)/target_spw
$(ProjectDir)/ftl
Code Generation Options
ARM Core Type = ARM7TDMI-S
Optimization Level = Optimize For Size (personal preference)
7. Goto init.s and add reset_handler to the globals at the bottom of the file.
8. Goto ld_script and change:
init.o(INIT) to "ARM RAM Debug/init.o"(INIT)
9. Edit Standard_ARM_RAM_Only_MemoryMap.xml and change size to 0x00018000
Now you should be able to build the project.

Next, we must release the lock on the controller so you can use JTAG.

1. Open Standard_ARM_Target.js and replace its contents with
function Reset()
{
  TargetInterface.peekUint32(0x82000004);
  TargetInterface.peekUint32(0x50001000);
  TargetInterface.peekUint32(0x60000040);
  TargetInterface.peekUint32(0x81000004);
  TargetInterface.peekUint32(0x80000030);

  TargetInterface.peekUint32(0x50000200);
  TargetInterface.peekUint32(0x60000030);
  TargetInterface.peekUint32(0x60000044);
  TargetInterface.peekUint32(0x85000014);
  TargetInterface.peekUint32(0x80000008);

  TargetInterface.peekUint32(0x8000000C);
  TargetInterface.peekUint32(0x60000024);
  TargetInterface.peekUint32(0x84000200);
  TargetInterface.peekUint32(0x80000020);
  TargetInterface.peekUint32(0x50000020);

  TargetInterface.peekUint32(0x83000004);
  TargetInterface.peekUint32(0x5000000C);
  TargetInterface.peekUint32(0x80000100);
  TargetInterface.peekUint32(0x82000020);
  TargetInterface.peekUint32(0x80000010);
  
  TargetInterface.peekUint32(0x86000000);

  TargetInterface.stopAndReset(1);
}

2. In Project Manager under Project Properties make sure Target Script Options is set to Reset()


Note: If your using a FTDI based JTAG debugger disable Fast Memory Accesses.
Edited On 3:22:57 AM - Fri, Jun 24th 2011 by Jeremy Brock
Jeremy Brock

A+ Perfect Computers (http://www.recovermyflashdrive.com)
President / Sr. R&D Engineer
2465 Black Rock Tpke., STE. C
Fairfield, CT 06825, USA
Tel: 203-549-9761
Email: jeremy@recovermyflashdrive.com

Clicked A Few Times
Threads 8
Posts 17
Great! Jeremy, what model of USB ARM JTAG device do you recommend for CrossWorks?
Associate Professor
Computer Systems Laboratory
Sungkyunkwan University
http://csl.skku.edu/jinsoo

Clicked A Few Times
Threads 11
Posts 39
I'm still converting my notes to instructions, so the guide isn't complete.
I'm using the following JTAG adapter:
http://www.olimex.com/dev/arm-usb-ocd.html

Its based on the FTDI chipset as many inexpensive JTAG adapters are, it appears to work except when I upload code the "Verify" process says the upload failed ~50% of the time even though the upload was successful, CrossWorks seems to think its an issue with the JTAG adapter. I'm debating buying their $300USD JTAG adapter as I know I can compile the Jasmine source now. I'll complete the guide over the weekend.

I'm also having an issue sending the "Unlock" commands, I'm un-sure where the proper place to put them in CrossWorks is, so I'm sending them on the first "SRAM program" and then remarking them afterwards. This is a minor issue which I'm sure is easily solved.

It's still very exciting as I can debug my code for a fraction of a cost of what ARM wants for their development suite.
Edited On 5:40:43 PM - Sat, Jun 18th 2011 by Jeremy Brock

Clicked A Few Times
Threads 11
Posts 39
The more I use CrossWorks the more I like Eclipse, auto complete is a must for me, I haven't memorized all the registers yet. I must figure out how to get OpenOCD working so I can debug.. Never easy..

Clicked A Few Times
Threads 11
Posts 39
Pulled an all nighter and got Eclipse working with OpenOCD and the jasmine source.

Once I post a solution there will be no cost to develop on the Jasmine other than $70USD for a JTAG Adapter


Forum >> OpenSSD Project >> General Discussion



Who's here now Members 0 Guests 0 Bots/Crawler 0


AWC's: 2.5.12 MediaWiki - Stand Alone Forum Extension
Forum theme style by: AWC
Views
Personal tools