Brian Silverman | 9c0f145 | 2015-01-10 21:19:39 -0800 | [diff] [blame] | 1 | |
| 2 | * Purpose |
| 3 | The HAL is a hardware abstraction layer that provides a uniform |
| 4 | interface that can be used to access a number of primarily I/O |
| 5 | features 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 | |
| 13 | The initial goal is to allow a higher level like WPILib to support |
| 14 | both the CRIO and the upcoming Athena platform only by changing which |
| 15 | version of the HAL it's running on. |
| 16 | |
| 17 | * Editing |
| 18 | You can always use any text editor and then build with Maven. There |
| 19 | are also eclipse project files so that it can be edited in the same |
| 20 | eclipse environment that teams develop with. For the AthenaXX, this |
| 21 | can be found in the =root= directory of this project. It imports as an |
| 22 | FRC Robot C++ Eclipse project. The Windriver project can be imported |
| 23 | from the =src= directory. |
| 24 | |
| 25 | * Building with Maven |
| 26 | There are multiple build targets that the HAL supports. Instructions |
| 27 | for setting up the environment and building each of these is described |
| 28 | below. 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 | |
| 36 | Output 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 |
| 41 | Note: Windows only due to the Windriver requirement. |
| 42 | 1. 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. |
| 44 | 2. Set the environment variable =WIND_BASE= to =C:\WindRiver\vxworks-6.3=. |
| 45 | 3. 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. |
| 49 | 4. Checkout and install the NI-Libraries from Github: |
| 50 | [[https://github.com/first/NI-Libraries]]. |
| 51 | 5. Run the following maven command: |
| 52 | =mvn clean install= |
| 53 | 6. Success |
| 54 | |
| 55 | ** include |
| 56 | 1. =cd= into the include directory: =cd include= |
| 57 | 2. Run the following maven command: |
| 58 | =mvn clean install= |
| 59 | 3. Success |
| 60 | |
| 61 | ** Azalea |
| 62 | Note: Windows only. |
| 63 | 1. 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. |
| 65 | 2. Set the environment variable =WIND_BASE= to =C:\WindRiver\vxworks-6.3=. |
| 66 | 3. =cd= into the AthenaXX directory: =cd AthenaXX= |
| 67 | 4. =cd= into the Azalea directory: =cd Azalea= |
| 68 | 5. Run the following maven command: |
| 69 | =mvn clean install= |
| 70 | 6. Success |
| 71 | |
| 72 | ** AthenaXX |
| 73 | 1. 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. |
| 77 | 2. Install the include target. |
| 78 | 3. =cd= into the AthenaXX directory: =cd AthenaXX= |
| 79 | 4. Run the following maven command: |
| 80 | =mvn clean install= |
| 81 | 5. Success |
| 82 | |
| 83 | ** AthenaXXJava |
| 84 | 1. 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. |
| 88 | 2. Checkout and install the NI-Libraries from Github: |
| 89 | [[https://github.com/first/NI-Libraries]]. |
| 90 | 3. Install the include target. |
| 91 | 4. =cd= into the AthenaXXJava directory: =cd AthenaXXJava= |
| 92 | 5. Run the following maven command: |
| 93 | =mvn clean install= |
| 94 | 6. Success |