Skip to content

Commit d53c868

Browse files
committed
Updated the app layer documentation to include macOS GNU error fix
1 parent a18e216 commit d53c868

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

docs/userguides/app_layer.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,29 @@ tb make_app examples/app_hello_world/ -j8
8383
Then flash the resulting bin on your crazyflie according to [the flashing instructions](/docs/building-and-flashing/build.md). Make sure to point to the right build binary.
8484

8585

86+
> **Note:** If you are using **macOS** you may encounter errors when trying to build your app, such as:
87+
> ```
88+
> readlink: illegal option -- m
89+
> sed: invalid command code .
90+
> cp: illegal option -- T
91+
> ```
92+
> This happens because the app-layer build expects the GNU versions of `readlink`, `sed` and `cp`. To fix the errors, install and use the GNU utilities:
93+
> ```
94+
> brew install coreutils gnu-sed
95+
> ```
96+
> Then replace `readlink`, `sed` and `cp` with `greadlink`, `gsed` and `gcp`, either with temporary aliases:
97+
> ```
98+
> alias readlink=greadlink
99+
> alias sed=gsed
100+
> alias cp=gcp
101+
> ```
102+
> Or by permanently adding them to your path:
103+
> ```
104+
> export PATH="/usr/local/opt/coreutils/libexec/gnubin:/usr/local/opt/gnu-sed/libexec gnubin:$PATH"
105+
> ```
106+
> Or by going to `/scripts/kconfig/merge_config.sh` and replacing them there.
107+
108+
86109
## Internal log and param system
87110
88111
For the app-layer, it would be good to have access to log and/or parameter values and to set parameter values. This way, your app will be able to read out sensor data or to switch controller/estimator on air. To check out these functions, look at `src/modules/interface/log.h` or `.../param.h` for the internal access functions. There is also an example to be found in `/examples/app_internal_param_log/`.

0 commit comments

Comments
 (0)