source: rtems/c/src/lib/libbsp/arm/beagle/README @ 64f7724

4.115
Last change on this file since 64f7724 was 53dd6d61, checked in by Ben Gras <beng@…>, on Nov 3, 2014 at 6:53:40 PM

BSP for several Beagle products

Specifically the beagleboard, beagleboard xM, beaglebone, beaglebone black.

More info on these targets: http://www.beagleboard.org/

This commit forms a basic BSP by combining Claas's work with

. new clock and irq code and definitions for

beagle targets (beagleboard and beaglebones), mostly
reused from the Minix codebase, thus making
irqs, ticks and non-polled console mode work too

. new timer code for ns timing with high timer resolution,

24MHz on the AM335X and 13MHz on the DM37XX

. select the console uart based on target at configure time
. removing all the lpc32xx-specific macros and code and

other unused code and definitions that the beagle bsp
was based on

. re-using some standard functions instead of lpc32xx versions
. fixed some whitespace problem in preinstall.am
. fixed some compile warnings
. configure MMU: set 1MB sections directly in the TTBR,

just to show the difference between cacheable RAM and
non-cacheable device memory and invalid ranges; this lets us
turn on caches and not rely on boot loader MMU configuration.
Verified to work when MMU is initially either on or off when
RTEMS gets control.

Thanks for testing, commentary, improvements and fixes to Chris Johns,
Brandon Matthews, Matt Carberry, Romain Bornet, AZ technology and others.

Signed-Off-By: Ben Gras <beng@…>

  • Property mode set to 100644
File size: 3.8 KB
Line 
1BSP for beagleboard xm, beaglebone (original aka white), and beaglebone black.
2
3original beagleboard isn't tested.
4
5wiki: http://www.rtems.org/wiki/index.php/Beagleboard
6
71.   *** CONFIGURING ************
8
9bsp-specific build options in the environment at build time:
10CONSOLE_POLLED=1 use polled i/o for console, required to run testsuite
11CONSOLE_BAUD=... override default console baud rate
12
13BSPs recognized are:
14beagleboardorig  original beagleboard
15beagleboardxm    beagleboard xm
16beaglebonewhite  original beaglebone
17beagleboneblack  beaglebone black
18
19Currently the only distinction in the BSP are between the beagleboards and
20the beaglebones, but the 4 names are specified in case hardware-specific
21distinctions are made in the future, so this can be done without changing the
22usage.
23
24
252.   *** BUILDING    ************
26
27To build BSPs for the beaglebone white and beagleboard xm, starting from
28a directory in which you have this source tree in rtems-src:
29
30$ mkdir b-beagle
31$ cd b-beagle
32$ ../rtems-src/configure --target=arm-rtems4.11 --enable-rtemsbsp="beaglebonewhite beagleboardxm"
33$ make all
34
35This should give you .exes somewhere.
36
37Then you need 'mkimage' to transform a .exe file to a u-boot image
38file. first make a flat binary:
39
40$ arm-rtems4.11-objcopy $exe -O binary $exe.bin
41$ gzip -9 $exe.bin
42$ mkimage -A arm -O rtems -T kernel -a 0x80000000 -e 0x80000000 -n RTEMS -d $exe.bin.gz rtems-app.img
43
44All beagles have memory starting at 0x80000000 so the load & run syntax is the same.
45
463.   *** BOOTING     ************
47
48Then, boot the beaglebone with u-boot on an SD card and load rtems-app.img
49from u-boot. Interrupt the u-boot boot to get a prompt.
50
51Set up a tftp server and a network connection for netbooting. And to
52copy rtems-app.img to the tftp dir. Otherwise copy the .img to the FAT
53partition on the SD card and make uboot load & run that.
54
554.   *** BEAGLEBONES ************
56
57(tested on both beaglebones)
58
59Beaglebone original (white) or beaglebone black netbooting:
60
61uboot# setenv ipaddr 192.168.12.20
62uboot# setenv serverip 192.168.12.10
63uboot# echo starting from TFTP
64uboot# tftp 0x80800000 rtems-app.img
65uboot# dcache off ; icache off
66uboot# bootm 0x80800000
67
68Beaglebone original (white) or beaglebone black from a FAT partition:
69
70uboot# fatload mmc :1 0x80800000 ticker.img
71uboot# dcache off ; icache off
72uboot# bootm 0x80800000
73
744.   *** BEAGLEBOARD ************
75
76(tested on xm)
77
78For the beagleboard the necessary commands are a bit different because
79of the ethernet over usb:
80
81uboot# setenv serverip 192.168.12.10
82uboot# setenv ipaddr 192.168.12.62
83uboot# setenv usbnet_devaddr e8:03:9a:24:f9:10
84uboot# setenv usbethaddr e8:03:9a:24:f9:11
85uboot# usb start
86uboot# echo starting from TFTP
87uboot# tftp 0x80800000 rtems-app.img
88uboot# dcache off ; icache off
89uboot# bootm 0x80800000
90
914.   *** SD CARD ****************
92
93There is a script here that automatically writes an SD card for any of
94the beagle targets.
95
96Let's write one for the Beaglebone Black. Assuming your source tree is
97at $HOME/development/rtems/rtems-src and your bsp is built and linked
98with examples and installed at $HOME/development/rtems/4.11.
99
100    % cd $HOME/development/rtems/rtems-src/c/src/lib/libbsp/arm/beagle/simscripts
101    % sh sdcard.sh $HOME/development/rtems/4.11 $HOME/development/rtems/b-beagle/arm-rtems4.11/c/beagleboneblack/testsuites/samples/hello/hello.exe
102
103The script should give you a whole bunch of output, ending in:
104
105    Result is in bone_hello.exe-sdcard.img.
106
107There you go. dd that to an SD card and boot!
108
109The script needs to know whether it's for a Beagleboard xM or one of the
110Beaglebones. This is to know which uboot to use. It will detect this
111from the path the executable is in (in the above example, it contains
112'beagleboneblack'), so you have to specify the full path.
113
114
115Good luck & enjoy!
116
117Ben Gras
118beng@shrike-systems.com
Note: See TracBrowser for help on using the repository browser.