1
0
Fork 0
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:
timman2er 2018-09-02 02:54:46 +02:00
parent 3a5961a758
commit b38afdb7db
22 changed files with 64 additions and 64 deletions

View file

@ -1,7 +1,7 @@
# Building in Ubuntu
Building for Ubuntu platform is remarkably easy. The only trick to understand is that the Ubuntu toolchain,
which they are downstreaming from Debian, is not compatible with Cleanflight. We suggest that you take an
which they are downstreaming from Debian, is not compatible with Betaflight. We suggest that you take an
alternative PPA from Terry Guo, found here:
https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
@ -44,23 +44,23 @@ sudo apt-get install gcc-arm-none-eabi=4.9.3.2014q4-0precise12
After the ARM toolchain from Terry is installed, you should be able to build from source.
```bash
cd src
git clone git@github.com:cleanflight/cleanflight.git
cd cleanflight
git clone git@github.com:betaflight/betaflight.git
cd betaflight
make TARGET=NAZE
```
You'll see a set of files being compiled, and finally linked, yielding both an ELF and then a HEX:
```
...
arm-none-eabi-size ./obj/main/cleanflight_NAZE.elf
arm-none-eabi-size ./obj/main/betaflight_NAZE.elf
text data bss dec hex filename
97164 320 11080 108564 1a814 ./obj/main/cleanflight_NAZE.elf
arm-none-eabi-objcopy -O ihex --set-start 0x8000000 obj/main/cleanflight_NAZE.elf obj/cleanflight_NAZE.hex
$ ls -la obj/cleanflight_NAZE.hex
-rw-rw-r-- 1 pim pim 274258 Jan 12 21:45 obj/cleanflight_NAZE.hex
97164 320 11080 108564 1a814 ./obj/main/betaflight_NAZE.elf
arm-none-eabi-objcopy -O ihex --set-start 0x8000000 obj/main/betaflight_NAZE.elf obj/betaflight_NAZE.hex
$ ls -la obj/betaflight_NAZE.hex
-rw-rw-r-- 1 pim pim 274258 Jan 12 21:45 obj/betaflight_NAZE.hex
```
You can use the Cleanflight-Configurator to flash the `obj/cleanflight_NAZE.hex` file.
You can use the Betaflight-Configurator to flash the `obj/betaflight_NAZE.hex` file.
## Bricked/Bad build?
@ -78,10 +78,10 @@ Make sure to remove `obj/` and `make clean`, before building again.
## Updating and rebuilding
Navigate to the local cleanflight repository and use the following steps to pull the latest changes and rebuild your version of cleanflight:
Navigate to the local betaflight repository and use the following steps to pull the latest changes and rebuild your version of betaflight:
```bash
cd src/cleanflight
cd src/betaflight
git reset --hard
git pull
make clean TARGET=NAZE