Skip to content

Commit

Permalink
Add sdkconfig.defaults to examples and mention in README
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidB137 committed Oct 8, 2023
1 parent 734c7c6 commit 681af76
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ an access point serving "standard" devices as well as all of IoT.
spsp:
git: https://github.com/DavidB137/spsp.git
```
3. Rename `main.c` to `main.cpp` file inside `main` project directory
3. Create `sdkconfig.defaults` file incide root project directory:
```
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_CXX_EXCEPTIONS=y
```
SPSP uses exceptions, so they need to be enabled in the build process.
It may be also necessary to enable size optimalization depending on
the flash size.
4. Rename `main.c` to `main.cpp` file inside `main` project directory
and change it's content to:
```cpp
#include "spsp.hpp"
Expand All @@ -52,7 +60,7 @@ an access point serving "standard" devices as well as all of IoT.

### Examples

You can find usage examples in `examples/` directory.
You can find usage examples in [`examples/`](examples/) directory.


### Code documentation
Expand Down
2 changes: 2 additions & 0 deletions examples/espidf/bridge/sdkconfig.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_CXX_EXCEPTIONS=y
2 changes: 2 additions & 0 deletions examples/espidf/client/sdkconfig.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
CONFIG_COMPILER_CXX_EXCEPTIONS=y

0 comments on commit 681af76

Please sign in to comment.