Difference between revisions of "ARM"

From CSCWiki
Jump to navigation Jump to search
 
(14 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
* An ARM compiler and build environment. If you do your development on corn-syrup this is already set up for you.
 
* An ARM compiler and build environment. If you do your development on corn-syrup this is already set up for you.
 
* Basic working knowledge of [http://www.gnu.org/software/screen/ GNU screen].
 
* Basic working knowledge of [http://www.gnu.org/software/screen/ GNU screen].
  +
  +
== Hardware ==
  +
  +
* The TS-7800 is connected by serial port to corn-syrup. We have ported U-Boot to the board and installed it to the onboard flash memory. U-Boot is used to load a compiled program from our TFTP server over the network. We have also wired the board so that it resets when COM3 is opened; this is used to reset the board when a user program crashes it.
  +
  +
== Development Environment ==
  +
  +
Every CSC machine has a utility called "become_board" installed that is used to connect to the board's console. You must use this program to interact with the board.
  +
  +
The board also sometimes runs a linux environment ([http://goto80.csclub.uwaterloo.ca goto80.csclub.uwaterloo.ca]). It is okay to reset the board while linux is running; don't worry about shutting it down safely.
  +
  +
== Rules & Regulations ==
  +
  +
* Only the systems committee touches the board hardware. You can power cycle the board without touching it. If there is a problem, email syscom@csclub.uwaterloo.ca.
  +
* Share the board. If other people are connected, keep your sessions short and reset the board when you've finished testing.
   
 
== Compiling and Running Your First Program ==
 
== Compiling and Running Your First Program ==
Line 28: Line 43:
 
* Run become_board to attach to the TS-7800 screen session.
 
* Run become_board to attach to the TS-7800 screen session.
   
become_board
+
become_board goto80
   
 
* Reboot the board from the radreboot window. Press C-a 1 (control-A, then 1) to switch windows, then press enter to reboot.
 
* Reboot the board from the radreboot window. Press C-a 1 (control-A, then 1) to switch windows, then press enter to reboot.
Line 46: Line 61:
 
ffffffe9 worlds for 723 people.
 
ffffffe9 worlds for 723 people.
   
If you press any key the board will reboot.
+
If you press any key the program will end and return to U-Boot.
  +
  +
== Further Steps ==
  +
  +
* Write some C code. You can start by modifying iotest.c.
  +
* Write some ARM assembly. You can start by modifying ts7800.S.
  +
* Work through the CS 452 kernel assignments (skip the train parts). These are available on [http://www.cgl.uwaterloo.ca/~wmcowan/teaching/cs452/ Bill Cowan's web site].
  +
* Port your code to Binaerpilot.
  +
  +
== Binaerpilot ==
  +
  +
We also have a Gumstix Overo Tide machine that is newer and faster than the TS-7800. Access it using
  +
  +
become_board binaerpilot
  +
  +
The base files for this board are available using
  +
  +
git clone csclub.uwaterloo.ca:/srv/git/arm/overo-bwio.git
  +
  +
The documentation for this board is available at http://csclub.uwaterloo.ca/~board/docs/.
  +
  +
== Troubleshooting ==
  +
  +
* If the shared screen session is not working properly, such as when an important window is closed, the easiest way to recover is to terminate the screen session entirely and rerun become_board. Press C-a \ (control-A, then backslash) to terminate the screen session. Note that this disconnects everyone and should be used sparingly.
  +
  +
== Documentation ==
  +
  +
* The hardware documentation is available at [http://www.embeddedarm.com/products/board-detail.php?product=ts-7800 embeddedarm.com] and locally at [http://csclub.uwaterloo.ca/~board/ts7800 csclub.uwaterloo.ca/~board/ts7800].

Latest revision as of 05:13, 27 October 2012

Prerequisites

  • Email syscom@csclub.uwaterloo.ca asking to be added to the board group.
  • An ARM compiler and build environment. If you do your development on corn-syrup this is already set up for you.
  • Basic working knowledge of GNU screen.

Hardware

  • The TS-7800 is connected by serial port to corn-syrup. We have ported U-Boot to the board and installed it to the onboard flash memory. U-Boot is used to load a compiled program from our TFTP server over the network. We have also wired the board so that it resets when COM3 is opened; this is used to reset the board when a user program crashes it.

Development Environment

Every CSC machine has a utility called "become_board" installed that is used to connect to the board's console. You must use this program to interact with the board.

The board also sometimes runs a linux environment (goto80.csclub.uwaterloo.ca). It is okay to reset the board while linux is running; don't worry about shutting it down safely.

Rules & Regulations

  • Only the systems committee touches the board hardware. You can power cycle the board without touching it. If there is a problem, email syscom@csclub.uwaterloo.ca.
  • Share the board. If other people are connected, keep your sessions short and reset the board when you've finished testing.

Compiling and Running Your First Program

We have modified the busy-wait I/O library used by CS 452 to work with the TS-7800. The following steps explain how to compile and run the test application on the TS-7800. These steps should be completed on corn-syrup.

git clone csclub.uwaterloo.ca:/srv/git/arm/ts7800-bwio.git
cd ts7800-bwio
  • Build the test application:
make CC=arm-linux-gnueabi-gcc
  • Create yourself a directory on our TFTP server (caffeine):
ssh caffeine mkdir -p /srv/tftp/ARM/$USER
  • Copy the test application (bin/iotest) to your directory on the TFTP server.
scp bin/iotest caffeine:/srv/tftp/ARM/$USER/
  • Run become_board to attach to the TS-7800 screen session.
become_board goto80
  • Reboot the board from the radreboot window. Press C-a 1 (control-A, then 1) to switch windows, then press enter to reboot.
  • Execute your test program on the board. Press C-a 0 (control-A, then 0) to switch windows. Replace $USER by your user name.
tftp ARM/$USER/iotest
bootelf

If all goes well, you should see the following output:

Hello
***Hello
Hello world.
Well, hello world23.
-23 worlds for 1 person.
ffffffe9 worlds for 723 people.

If you press any key the program will end and return to U-Boot.

Further Steps

  • Write some C code. You can start by modifying iotest.c.
  • Write some ARM assembly. You can start by modifying ts7800.S.
  • Work through the CS 452 kernel assignments (skip the train parts). These are available on Bill Cowan's web site.
  • Port your code to Binaerpilot.

Binaerpilot

We also have a Gumstix Overo Tide machine that is newer and faster than the TS-7800. Access it using

become_board binaerpilot

The base files for this board are available using

git clone csclub.uwaterloo.ca:/srv/git/arm/overo-bwio.git

The documentation for this board is available at http://csclub.uwaterloo.ca/~board/docs/.

Troubleshooting

  • If the shared screen session is not working properly, such as when an important window is closed, the easiest way to recover is to terminate the screen session entirely and rerun become_board. Press C-a \ (control-A, then backslash) to terminate the screen session. Note that this disconnects everyone and should be used sparingly.

Documentation