Activating ARM9 with a working OS » History » Version 5
Vanč Levstik, 04.01.2011 16:34
1 | 1 | Aleksander Bešir | h1. Activating ARM9 with a working OS |
---|---|---|---|
2 | |||
3 | 2 | Aleksander Bešir | {{toc}} |
4 | |||
5 | 1 | Aleksander Bešir | h2. Basic concept |
6 | 3 | Vanč Levstik | |
7 | h3. Hardware |
||
8 | |||
9 | !http://www.shrani.si/f/2A/128/4kJtfyhW/arm-picture.jpg! |
||
10 | We will be using FRI-SMS 32-bit microcontroller based on AT91SAM9620 chip from ARM9 family. It has fast ROM and RAM memories and embedds Ethernet MAC, one USB Device Port, and a USB Host controller. It also integrates several standard peripherals, such as the USART, SPI, TWI, Timer |
||
11 | Counters, Synchronous Serial Controller, ADC and MultiMedia Card Interface. |
||
12 | More about microcontroller can be found in "Manual":http://laps.fri.uni-lj.si/fri-sms/datoteke/AT91SAM9260.pdf |
||
13 | |||
14 | h3. Software |
||
15 | |||
16 | For programming the device we will be using AT91 In-System programmer "SAM-BA":http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3883. |
||
17 | We will also use "U-BOOT":http://www.denx.de/wiki/U-Boot as a second-step bootloader. |
||
18 | Our operating system will be Linux, kernel version 2.6.27. |
||
19 | |||
20 | 5 | Vanč Levstik | h3. Additional hardware |
21 | 3 | Vanč Levstik | |
22 | 5 | Vanč Levstik | For programming flash memory we need additional USB (A-B) cable. |
23 | |||
24 | For using the arm from our PC, we need RS232 cable, which is made from serial DB9 cable. We open the DB9 cable and connect only three signals(RX, TX and GND) with CRIMP according to "RS232 cable plan":http://laps.fri.uni-lj.si/fri-sms/datoteke/rs232.pdf |
||
25 | |||
26 | For our file-system we use SD card (and not SD-hc), which we previously format on PC with linux to ext3, and extract our "Filesystem":http://laps.fri.uni-lj.si/fri-sms/datoteke/rootfs-frisms.ext3.tar.bz2 on it. |
||
27 | |||
28 | 3 | Vanč Levstik | h2. Installing OS |
29 | |||
30 | h3. Concept |
||
31 | |||
32 | FRI-SMS is built, so it boots from integrated ROM memory. It looks for bootloader into serial flash memory, if it is found it loads into internal SDRAM. This first-step bootloader then sets SDRAM controller and loads second-step bootloader(U-BOOT) into external SDRAM end executes it. |
||
33 | Second-step bootloader takes care of other microcontroller settings and runs the OS. |
||
34 | |||
35 | If bootloader is not found in ROM it searches for bootloader thtrough USB interface and then through RS232 interface and waits there in loop. |
||
36 | |||
37 | |||
38 | h3. Loading software into flash ROM memory |
||
39 | |||
40 | * Installing SAM-BA |
||
41 | 4 | Vanč Levstik | After installing SAM-BA we have to set the drivers correctly. SAM-BA is based on setting connection throuogh COM port, so we have to install a driver which sets the PC, so it recognizes the USB as COM port. SAM-BA install includes a driver, but it does not work on x64 |
42 | based operating systems such as Windows Vista 64-bit and Windows 7 64-bit. Attached is a modified driver, so it works on those systems (tested on Windows 7). |
||
43 | 1 | Aleksander Bešir | |
44 | |||
45 | 4 | Vanč Levstik | With SAM-BA we establish a connection between PC and FRI-SMS, then we enable DataFlash on external flash memory. |
46 | # First we load second-step bootloader U-BOOT from address *0x8400* onward |
||
47 | # Next step is Linux OS kernel, which we load on address *0x42000* |
||
48 | # Last step is first-step bootloader, which must be loaded last, because we can't load any more files after we load first step loader (at least until system restore) |
||
49 | 5 | Vanč Levstik | |
50 | |||
51 | h2. Using the OS |
||
52 | |||
53 | h3. Establishing connection |
||
54 | |||
55 | For connecting our PC to ARM console we use beforementioned RS232 cable. |
||
56 | Then we need a program for establishing serial connection. I used Minicom on Ubuntu Linux, in Windows we can use Putty. |
||
57 | The settings for connection should be as follows: |
||
58 | - speed 115.200 baud |
||
59 | - data bits: 8 |
||
60 | - stop bits: 1 |
||
61 | - parity: NO |
||
62 | - flow control: XON/XOFF |