From 822cbd7c34f2ed55f98224d2c86630960c5eff8e Mon Sep 17 00:00:00 2001 From: Brendan Bartels <bbartels@iastate.edu> Date: Thu, 30 Mar 2017 19:53:19 -0500 Subject: [PATCH] quad: change "modular_quad_pid" to "real_quad" --- quad/README.md | 49 ++++++++----------- .../{modular_quad_pid => real_quad}/.cproject | 0 .../.gitignore | 0 .../{modular_quad_pid => real_quad}/.project | 0 .../Debug/ext/commands/subdir.mk | 0 .../Debug/ext/computation_graph/subdir.mk | 0 .../Debug/ext/graph_blocks/subdir.mk | 0 .../Debug/ext/quad_app/subdir.mk | 0 .../Debug/ext/queue/subdir.mk | 0 .../Debug/makefile | 0 .../Debug/objects.mk | 0 .../Debug/sources.mk | 0 .../Debug/src/subdir.mk | 0 .../Release/ext/commands/subdir.mk | 0 .../Release/ext/computation_graph/subdir.mk | 0 .../Release/ext/graph_blocks/subdir.mk | 0 .../Release/ext/quad_app/subdir.mk | 0 .../Release/ext/queue/subdir.mk | 0 .../Release/makefile | 0 .../Release/objects.mk | 0 .../Release/sources.mk | 0 .../Release/src/subdir.mk | 0 .../ext/__CAUTION__.md | 0 .../src/hw_impl_zybo.c | 0 .../src/hw_impl_zybo.h | 0 .../src/hw_impl_zybo_axi_timer.c | 0 .../src/hw_impl_zybo_global_timer.c | 0 .../src/hw_impl_zybo_i2c.c | 0 .../src/hw_impl_zybo_mio7_led.c | 0 .../src/hw_impl_zybo_pwm_input.c | 0 .../src/hw_impl_zybo_pwm_output.c | 0 .../src/hw_impl_zybo_system.c | 0 .../src/hw_impl_zybo_tests.c | 0 .../src/hw_impl_zybo_uart.c | 0 .../src/lscript.ld | 0 .../src/main.c | 0 .../src/platform.c | 0 .../src/platform.h | 0 .../src/platform_config.h | 0 .../test/.gitignore | 0 .../test/Makefile | 0 .../test/test_uart_buff.c | 0 .../test/xil_types.h | 0 43 files changed, 21 insertions(+), 28 deletions(-) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/.cproject (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/.gitignore (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/.project (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/ext/commands/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/ext/computation_graph/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/ext/graph_blocks/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/ext/quad_app/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/ext/queue/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/makefile (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/objects.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/sources.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Debug/src/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/ext/commands/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/ext/computation_graph/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/ext/graph_blocks/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/ext/quad_app/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/ext/queue/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/makefile (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/objects.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/sources.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/Release/src/subdir.mk (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/ext/__CAUTION__.md (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo.h (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_axi_timer.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_global_timer.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_i2c.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_mio7_led.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_pwm_input.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_pwm_output.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_system.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_tests.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/hw_impl_zybo_uart.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/lscript.ld (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/main.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/platform.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/platform.h (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/src/platform_config.h (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/test/.gitignore (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/test/Makefile (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/test/test_uart_buff.c (100%) rename quad/xsdk_workspace/{modular_quad_pid => real_quad}/test/xil_types.h (100%) diff --git a/quad/README.md b/quad/README.md index 8f857b03b..badf5416e 100644 --- a/quad/README.md +++ b/quad/README.md @@ -1,22 +1,25 @@ -# Quadcopter +# Quadcopter Section -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 +This `quad/` directory contains all code that programs the quadcopter, +including any C libraries we have written, any HDL to program the Zybo on the quad, and the XSDK main project that runs on the Zybo. The main quad application is written as a library, and located at: ``` -src/quad_app/quad_app.c +src/quad_app (main function in quad_app.c) ``` The main XSDK project that actually runs on the Zybo is located at: ``` -xsdk_workspace/modular_quad_pid/main.c +xsdk_workspace/real_quad ``` -## Building +If you were wondering, we do have the complementary virtual quad easy testing: +``` +src/virt_quad +``` -### Libraries +## Building our Libraries To build the libraries: ``` @@ -29,31 +32,21 @@ directories: cd src/<project> && make ``` -### XSDK Project - -To build the XSDK project that runs on the Zybo (only works on co3050): -``` -make zybo -``` - -To build the Zybo boot image for the SD card (only works on co3050): -``` -make boot -``` - -Disclaimer: The make boot target currently does not work - ## Testing -### Libraries +We have split our code into 2 main sections: application code and hardware code. +We did that so that we can write tests that run automatically on CI. You just +can't run automatic tests on hardware code because the environments won't match. -We try to write unit tests for the libraries we've written, since they are -not tied to the Zybo platform and are able to be run in our CI environment. +All CI tests are run using the following target: ``` make test ``` -You can also run the test for specific library inside its respective project +This incorporates unit tests (`src/<library>/test`), as well as a few functional +test scripts (`scripts/tests`) that verify things on the virtual quad. + +You can also run the tests for a specific library inside its respective project directory: ``` cd src/<project> && make test @@ -61,6 +54,6 @@ cd src/<project> && make test ### XSDK Project -The XSDK project implements the hardware interfaces used in the quad app. -There are tests can be executed from the main function in that XSDK project. -These tests essentially test each hardware interface. +We have tests for the hardware-level code, they just have to be run manually. +You can find these tests along with instructions at +`xsdk_workspace/read_quad/src/hw_impl_zybo_tests.c` diff --git a/quad/xsdk_workspace/modular_quad_pid/.cproject b/quad/xsdk_workspace/real_quad/.cproject similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/.cproject rename to quad/xsdk_workspace/real_quad/.cproject diff --git a/quad/xsdk_workspace/modular_quad_pid/.gitignore b/quad/xsdk_workspace/real_quad/.gitignore similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/.gitignore rename to quad/xsdk_workspace/real_quad/.gitignore diff --git a/quad/xsdk_workspace/modular_quad_pid/.project b/quad/xsdk_workspace/real_quad/.project similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/.project rename to quad/xsdk_workspace/real_quad/.project diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/ext/commands/subdir.mk b/quad/xsdk_workspace/real_quad/Debug/ext/commands/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/ext/commands/subdir.mk rename to quad/xsdk_workspace/real_quad/Debug/ext/commands/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/ext/computation_graph/subdir.mk b/quad/xsdk_workspace/real_quad/Debug/ext/computation_graph/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/ext/computation_graph/subdir.mk rename to quad/xsdk_workspace/real_quad/Debug/ext/computation_graph/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/ext/graph_blocks/subdir.mk b/quad/xsdk_workspace/real_quad/Debug/ext/graph_blocks/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/ext/graph_blocks/subdir.mk rename to quad/xsdk_workspace/real_quad/Debug/ext/graph_blocks/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/ext/quad_app/subdir.mk b/quad/xsdk_workspace/real_quad/Debug/ext/quad_app/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/ext/quad_app/subdir.mk rename to quad/xsdk_workspace/real_quad/Debug/ext/quad_app/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/ext/queue/subdir.mk b/quad/xsdk_workspace/real_quad/Debug/ext/queue/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/ext/queue/subdir.mk rename to quad/xsdk_workspace/real_quad/Debug/ext/queue/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/makefile b/quad/xsdk_workspace/real_quad/Debug/makefile similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/makefile rename to quad/xsdk_workspace/real_quad/Debug/makefile diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/objects.mk b/quad/xsdk_workspace/real_quad/Debug/objects.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/objects.mk rename to quad/xsdk_workspace/real_quad/Debug/objects.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/sources.mk b/quad/xsdk_workspace/real_quad/Debug/sources.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/sources.mk rename to quad/xsdk_workspace/real_quad/Debug/sources.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Debug/src/subdir.mk b/quad/xsdk_workspace/real_quad/Debug/src/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Debug/src/subdir.mk rename to quad/xsdk_workspace/real_quad/Debug/src/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/ext/commands/subdir.mk b/quad/xsdk_workspace/real_quad/Release/ext/commands/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/ext/commands/subdir.mk rename to quad/xsdk_workspace/real_quad/Release/ext/commands/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/ext/computation_graph/subdir.mk b/quad/xsdk_workspace/real_quad/Release/ext/computation_graph/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/ext/computation_graph/subdir.mk rename to quad/xsdk_workspace/real_quad/Release/ext/computation_graph/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/ext/graph_blocks/subdir.mk b/quad/xsdk_workspace/real_quad/Release/ext/graph_blocks/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/ext/graph_blocks/subdir.mk rename to quad/xsdk_workspace/real_quad/Release/ext/graph_blocks/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/ext/quad_app/subdir.mk b/quad/xsdk_workspace/real_quad/Release/ext/quad_app/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/ext/quad_app/subdir.mk rename to quad/xsdk_workspace/real_quad/Release/ext/quad_app/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/ext/queue/subdir.mk b/quad/xsdk_workspace/real_quad/Release/ext/queue/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/ext/queue/subdir.mk rename to quad/xsdk_workspace/real_quad/Release/ext/queue/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/makefile b/quad/xsdk_workspace/real_quad/Release/makefile similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/makefile rename to quad/xsdk_workspace/real_quad/Release/makefile diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/objects.mk b/quad/xsdk_workspace/real_quad/Release/objects.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/objects.mk rename to quad/xsdk_workspace/real_quad/Release/objects.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/sources.mk b/quad/xsdk_workspace/real_quad/Release/sources.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/sources.mk rename to quad/xsdk_workspace/real_quad/Release/sources.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/Release/src/subdir.mk b/quad/xsdk_workspace/real_quad/Release/src/subdir.mk similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/Release/src/subdir.mk rename to quad/xsdk_workspace/real_quad/Release/src/subdir.mk diff --git a/quad/xsdk_workspace/modular_quad_pid/ext/__CAUTION__.md b/quad/xsdk_workspace/real_quad/ext/__CAUTION__.md similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/ext/__CAUTION__.md rename to quad/xsdk_workspace/real_quad/ext/__CAUTION__.md diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo.h b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo.h similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo.h rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo.h diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_axi_timer.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_axi_timer.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_axi_timer.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_axi_timer.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_global_timer.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_global_timer.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_global_timer.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_global_timer.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_i2c.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_i2c.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_i2c.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_i2c.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_mio7_led.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_mio7_led.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_mio7_led.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_mio7_led.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_pwm_input.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_pwm_input.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_pwm_input.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_pwm_input.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_pwm_output.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_pwm_output.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_pwm_output.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_pwm_output.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_system.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_system.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_system.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_system.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_tests.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_tests.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_tests.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_tests.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_uart.c b/quad/xsdk_workspace/real_quad/src/hw_impl_zybo_uart.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/hw_impl_zybo_uart.c rename to quad/xsdk_workspace/real_quad/src/hw_impl_zybo_uart.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/lscript.ld b/quad/xsdk_workspace/real_quad/src/lscript.ld similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/lscript.ld rename to quad/xsdk_workspace/real_quad/src/lscript.ld diff --git a/quad/xsdk_workspace/modular_quad_pid/src/main.c b/quad/xsdk_workspace/real_quad/src/main.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/main.c rename to quad/xsdk_workspace/real_quad/src/main.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/platform.c b/quad/xsdk_workspace/real_quad/src/platform.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/platform.c rename to quad/xsdk_workspace/real_quad/src/platform.c diff --git a/quad/xsdk_workspace/modular_quad_pid/src/platform.h b/quad/xsdk_workspace/real_quad/src/platform.h similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/platform.h rename to quad/xsdk_workspace/real_quad/src/platform.h diff --git a/quad/xsdk_workspace/modular_quad_pid/src/platform_config.h b/quad/xsdk_workspace/real_quad/src/platform_config.h similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/src/platform_config.h rename to quad/xsdk_workspace/real_quad/src/platform_config.h diff --git a/quad/xsdk_workspace/modular_quad_pid/test/.gitignore b/quad/xsdk_workspace/real_quad/test/.gitignore similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/test/.gitignore rename to quad/xsdk_workspace/real_quad/test/.gitignore diff --git a/quad/xsdk_workspace/modular_quad_pid/test/Makefile b/quad/xsdk_workspace/real_quad/test/Makefile similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/test/Makefile rename to quad/xsdk_workspace/real_quad/test/Makefile diff --git a/quad/xsdk_workspace/modular_quad_pid/test/test_uart_buff.c b/quad/xsdk_workspace/real_quad/test/test_uart_buff.c similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/test/test_uart_buff.c rename to quad/xsdk_workspace/real_quad/test/test_uart_buff.c diff --git a/quad/xsdk_workspace/modular_quad_pid/test/xil_types.h b/quad/xsdk_workspace/real_quad/test/xil_types.h similarity index 100% rename from quad/xsdk_workspace/modular_quad_pid/test/xil_types.h rename to quad/xsdk_workspace/real_quad/test/xil_types.h -- GitLab