To specify the controller to use during flight, set the flag when running make `make CONTROLLER="Student"`. This command will build with the student controller.
The Crazyflie is setup to use the Makefile in the root of the firmware folder. Several settings can be specified on the command line when running `make`. The common ones for compilation are listed here.
During startup the crazyflie will record a message in the console that it is using a non-standard controller.
## Specify the controller to use
To specify the controller to use during flight, set the `CONTROLLER` flag when running make, `make CONTROLLER="Student"`. This command will build with the student controller.
The name of the controller is defined in the [controller.c](/../blob/master/crazyflie_software/crazyflie-firmware-2021.06/src/modules/src/controller.c) file at:
During startup the crazyflie will record a message in the console that it is using a non-standard controller:
```
CONTROLLER: Using Student (4) controller
```
## How to add new files to the build path
- create a new file in crazyflie firmware folder
- add the to be generated .o file to the makefile's list of project objects, ex: `PROJ_OBJ += student_controller.o` on line 181
- As the make file executes it generates dependencies for each files based on the `#include` preprocessor command. These dependency files are automatically placed in `/bin/dep/` folder.
When creating new source files, they will need to be added to the Makefile in order to compile with the rest of the firmware.
- Create a new file in crazyflie firmware folder
- Add the to be generated .o file to the makefile's list of project objects, ex: `PROJ_OBJ += student_controller.o` on line 181 of `Makefile`
- Note: As the make file executes it generates dependencies for each files based on the `#include` preprocessor command. These dependency files are automatically placed in `/bin/dep/` folder.
- run `make` to ensure the new file is included in your build