Skip to content
Snippets Groups Projects
README.md 2.13 KiB
Newer Older
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
The `quad/` directory contains all code that programs the quadcopter. This
includes any C libraries we have written, any HDL to program the Zybo on
bbartels's avatar
bbartels committed
the quad, and the XSDK main project that runs on the Zybo.

bbartels's avatar
bbartels committed
## Brief Intro
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
The main quad application is located at `src/quad_app/`.
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
To run this application on the Zybo, we need to implement the hardware drivers,
bbartels's avatar
bbartels committed
and provide a `main` function. This is done in `xsdk_workspace/real_quad/src`.
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
We can also run this application on our own laptops for testing. We call this
implementation the "virtual quad". This is done in `src/virt_quad`.
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
#### Primarily Libraries and Executables
bbartels's avatar
bbartels committed

To build the libraries and executables:
bbartels's avatar
bbartels committed
```
make
bbartels's avatar
bbartels committed
```

You can also build each library individually inside their respective project
directories:
```
cd src/<project> && make
```

bbartels's avatar
bbartels committed
**NOTE**: All build artifacts will be placed in `lib` or `bin` (depending on 
whether it is a library or executable, respectively)
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
#### XSDK Project (embedded project that runs on the Zybo)
bbartels's avatar
bbartels committed
To build the XSDK project, refer to the [XSDK instructions](xsdk_workspace/README.md).
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
## Testing

bbartels's avatar
bbartels committed
#### Automated Tests
_Write tests! It makes automating things so much easier._
bbartels's avatar
bbartels committed

Run the unit and functional tests:
bbartels's avatar
bbartels committed
```
make test
```

bbartels's avatar
bbartels committed
And glad to hear you are interested in writing your own unit tests! Look at the
bbartels's avatar
bbartels committed
[README](src/test/README.md) and examples in our simple testing library at 
`src/test`.
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
#### Manually testing the hardware interface
bbartels's avatar
bbartels committed
Of course, we cannot run automated tests on code that needs the Zybo. But
bbartels's avatar
bbartels committed
we have manual tests that you can use to test each specific driver in the 
hardware interface.
bbartels's avatar
bbartels committed

Look in `xsdk_workspace/real_quad/src/hw_impl_zybo_tests.c` for instructions.
bbartels's avatar
bbartels committed
Ideally, you would run these tests from the XSDK IDE.
dawehr's avatar
dawehr committed

bbartels's avatar
bbartels committed
## Sections
bbartels's avatar
bbartels committed
* [The Quad Application](src/quad_app/README.md)  
* [Quad App on the Zybo (Real Quad)](xsdk_workspace/real_quad/README.md)  
* [Quad App on Unix (Virtual Quad)](src/virt_quad/README.md)  
bbartels's avatar
bbartels committed
* [XSDK Instructions](xsdk_workspace/README.md)  
bbartels's avatar
bbartels committed

bbartels's avatar
bbartels committed
## Other Documents
bbartels's avatar
bbartels committed
* [Zybo Pinout Assignments](doc/zybo_pinout_assignments.md)  
* [How to use Xilinx software tools](doc/how_to_use_xilinx_tools.pdf)