blob: 9eb132a406aee4cf72bf3d83b2fea4463b6c975f [file] [log] [blame]
Brian Silverman9c0f1452015-01-10 21:19:39 -08001
2* Purpose
3The HAL is a hardware abstraction layer that provides a uniform
4interface that can be used to access a number of primarily I/O
5features in the underlying platform. The features include:
6- Analog input, accumulation and triggers
7- PWM, Relay and Solenoid output
8- Digital input and output
9- I2C and SPI communication
10- Encoders and counters
11- Interrupts and Notifiers
12
13The initial goal is to allow a higher level like WPILib to support
14both the CRIO and the upcoming Athena platform only by changing which
15version of the HAL it's running on.
16
17* Editing
18You can always use any text editor and then build with Maven. There
19are also eclipse project files so that it can be edited in the same
20eclipse environment that teams develop with. For the AthenaXX, this
21can be found in the =root= directory of this project. It imports as an
22FRC Robot C++ Eclipse project. The Windriver project can be imported
23from the =src= directory.
24
25* Building with Maven
26There are multiple build targets that the HAL supports. Instructions
27for setting up the environment and building each of these is described
28below. Current targets are listed below:
29- All: All of the following targets.
30- include: The header files for the HAL.
31- Azalea: CRIO C++ build.
32- AthenaXX: Athena Dos Equis C++ build.
33- AthenaXXJava: Athena Dos Equis Java build with auto-generated JNA
34 wrappers.
35
36Output from each build target is placed in the directory
37=target/<target-name>=. So, the Azalea output is placed in
38=target/Azalea=.
39
40** All
41Note: Windows only due to the Windriver requirement.
421. Ensure that =C:\WindRiver\gnu\3.4.4-vxworks-6.3\x86-win32\bin= is
43 on the system path so that =ccppc= and =arppc= can be accessed.
442. Set the environment variable =WIND_BASE= to =C:\WindRiver\vxworks-6.3=.
453. Ensure that
46 =$HOME/wpilib/toolchains/arm-none-linux-gnueabi-4.4.1/bin/= is on
47 the system path so that =arm-none-linux-gnueabi-g++= and
48 =arm-none-linux-gnueabi-ar= can be accessed.
494. Checkout and install the NI-Libraries from Github:
50 [[https://github.com/first/NI-Libraries]].
515. Run the following maven command:
52 =mvn clean install=
536. Success
54
55** include
561. =cd= into the include directory: =cd include=
572. Run the following maven command:
58 =mvn clean install=
593. Success
60
61** Azalea
62Note: Windows only.
631. Ensure that =C:\WindRiver\gnu\3.4.4-vxworks-6.3\x86-win32\bin= is
64 on the system path so that =ccppc= and =arppc= can be accessed.
652. Set the environment variable =WIND_BASE= to =C:\WindRiver\vxworks-6.3=.
663. =cd= into the AthenaXX directory: =cd AthenaXX=
674. =cd= into the Azalea directory: =cd Azalea=
685. Run the following maven command:
69 =mvn clean install=
706. Success
71
72** AthenaXX
731. Ensure that
74 =$HOME/wpilib/toolchains/arm-none-linux-gnueabi-4.4.1/bin/= is on
75 the system path so that =arm-none-linux-gnueabi-g++= and
76 =arm-none-linux-gnueabi-ar= can be accessed.
772. Install the include target.
783. =cd= into the AthenaXX directory: =cd AthenaXX=
794. Run the following maven command:
80 =mvn clean install=
815. Success
82
83** AthenaXXJava
841. Ensure that
85 =$HOME/wpilib/toolchains/arm-none-linux-gnueabi-4.4.1/bin/= is on
86 the system path so that =arm-none-linux-gnueabi-g++= and
87 =arm-none-linux-gnueabi-ar= can be accessed.
882. Checkout and install the NI-Libraries from Github:
89 [[https://github.com/first/NI-Libraries]].
903. Install the include target.
914. =cd= into the AthenaXXJava directory: =cd AthenaXXJava=
925. Run the following maven command:
93 =mvn clean install=
946. Success