mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +03:00
Fix building guide (rebase because weird things happened
This commit is contained in:
parent
3a5961a758
commit
b38afdb7db
22 changed files with 64 additions and 64 deletions
|
@ -1,6 +1,6 @@
|
|||
# Building in Eclipse
|
||||
|
||||
How to build, test & debug Cleanflight in Eclipse on Linux, Windows & MacOS.
|
||||
How to build, test & debug Betaflight in Eclipse on Linux, Windows & MacOS.
|
||||
|
||||
## Checklist
|
||||
|
||||
|
@ -17,7 +17,7 @@ Use this checklist to make sure you didn't miss a step. Versions mandated below
|
|||
- [ ] Optionally [Download and Install](https://github.com/gnuarmeclipse/qemu/releases) the latest GNU ARM Eclipse QEMU [read more](#install-qemu)
|
||||
- [ ] Add a new update site to Eclipse named "GNU ARM Eclipse Plugins" with the URL "http://gnuarmeclipse.sourceforge.net/updates" and install all the features offered
|
||||
- [ ] Configure [the recommended workspace settings](http://gnuarmeclipse.github.io/eclipse/workspace/preferences/)
|
||||
- [ ] Checkout the cleanflight source code [read more](#checkout-cleanflight)
|
||||
- [ ] Checkout the betaflight source code [read more](#checkout-betaflight)
|
||||
- [ ] *Windows platform only:* Add the msys or cygwin bin directory to the project path
|
||||
- [ ] Build the code by going to *Project menu -> Build All* [read more](#build)
|
||||
- [ ] Run the tests by creating and running a make target named "test"
|
||||
|
@ -47,85 +47,85 @@ Retain the default installation directories so that the GNU ARM Plugins can loca
|
|||
|
||||
### Install OpenOCD
|
||||
|
||||
You should install OpenOCD If you will be debugging on real hardware, such as the STM32F3DISCOVERY dev board. It is not required to simply build Cleanflight or run the tests.
|
||||
You should install OpenOCD If you will be debugging on real hardware, such as the STM32F3DISCOVERY dev board. It is not required to simply build Betaflight or run the tests.
|
||||
|
||||
### Install QEMU
|
||||
|
||||
No tests currently run on the QEMU emulator therefore this install is entirely optional. It is useful to test your installation, since you can compile and run a blinky demo.
|
||||
|
||||
### Checkout Cleanflight
|
||||
### Checkout Betaflight
|
||||
|
||||
If you'll be submitting changes to cleanflight, [fork the repository](https://help.github.com/articles/fork-a-repo/) on GitHub and checkout your copy.
|
||||
If you'll be submitting changes to betaflight, [fork the repository](https://help.github.com/articles/fork-a-repo/) on GitHub and checkout your copy.
|
||||
|
||||
In Eclipse go to *File -> Import* choose *Git -> Projects from Git*
|
||||
|
||||

|
||||

|
||||
|
||||
Choose *Clone URI*
|
||||
|
||||

|
||||

|
||||
|
||||
Enter the URI https://github.com/cleanflight/cleanflight or if you've forked the repo, enter your URI instead. With a fork, you will need to specify your authentication details
|
||||
Enter the URI https://github.com/betaflight/betaflight or if you've forked the repo, enter your URI instead. With a fork, you will need to specify your authentication details
|
||||
|
||||

|
||||

|
||||
|
||||
On the branch selection dialog, de-select all branches and select only *master*
|
||||
|
||||

|
||||

|
||||
|
||||
Select the default destination directory
|
||||
|
||||

|
||||

|
||||
|
||||
When the download completes, choose *Use the New Project wizard* and click Finish
|
||||
|
||||

|
||||

|
||||
|
||||
Choose *C/C++ -> Makefile Project with Existing Code*
|
||||
|
||||

|
||||

|
||||
|
||||
Enter cleanflight as the project name and browse to your home directory -> git -> cleanflight for the existing code location. Ensure the C (cleanflight) and C++ (tests) languages are checked. Choose the Cross ARM GCC toolchain for the Indexer Settings. Click finish.
|
||||
Enter betaflight as the project name and browse to your home directory -> git -> betaflight for the existing code location. Ensure the C (betaflight) and C++ (tests) languages are checked. Choose the Cross ARM GCC toolchain for the Indexer Settings. Click finish.
|
||||
|
||||

|
||||

|
||||
|
||||
Set your build and debug targets by going to project properties -> C/C++ Build and choose the Behaviour tab. Replace "all" in the build box with "TARGET=xxx DEBUG=GDB" where xxx is your platform such as NAZE
|
||||
|
||||

|
||||

|
||||
|
||||
On Windows only, add msys or cygwin bin directory to the project's path by right clicking the project and choosing properties
|
||||
|
||||

|
||||

|
||||
|
||||
Edit the path variable in *C/C++ Build -> Environment*
|
||||
|
||||

|
||||

|
||||
|
||||
Append the full path to the relevant bin dir
|
||||
|
||||

|
||||

|
||||
|
||||
### Build
|
||||
|
||||
Choose project -> build all
|
||||
|
||||

|
||||

|
||||
|
||||
### Configure Debugging
|
||||
|
||||
Choose debug -> debug configurations
|
||||
|
||||

|
||||

|
||||
|
||||
Create a new OpenOCD configuration for the obj\main\cleanflight_XXX.elf application (this file is generated by the build step above)
|
||||
Create a new OpenOCD configuration for the obj\main\betaflight_XXX.elf application (this file is generated by the build step above)
|
||||
|
||||

|
||||

|
||||
|
||||
Add the appropriate openocd board configuration parameter for your dev platform
|
||||
|
||||

|
||||

|
||||
|
||||
Add the target to your debug menu favourites
|
||||
|
||||

|
||||

|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue