Skip to content

Commit ff34ba0

Browse files
authored
Added platformio.ini, moved test.cpp into src dir. Builds/runs (#32)
1 parent eef040d commit ff34ba0

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

example/README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## Building the example
2+
3+
### Requirements
4+
5+
1. A system running Linux or Linux running in a VM.
6+
2. gcc (`sudo apt-get install build-essential` or equivalent).
7+
3. gpiod and libgpiod-dev library (`sudo apt-get install gpiod libgpiod-dev` or equivalent).
8+
4. libbluetooth-dev library (`apt-get install libbluetooth-dev` or equivalent).
9+
5. PlatformIO. See https:/platformio.org/install for instruction instructions.
10+
11+
Once all of the requirements have been met go into the example subdirectory
12+
and run platform IO to build the example.
13+
14+
For example:
15+
16+
```
17+
skip@Dell-7040:~../resources/framework-portduino$ cd example/
18+
skip@Dell-7040:~../resources/framework-portduino/example$ git submodule init
19+
Submodule 'libraries/WiFi' (https:/github.com/Meshtastic/WiFi.git) registered for path '../libraries/WiFi'
20+
skip@Dell-7040:~../resources/framework-portduino/example$ git submodule update
21+
Cloning into '/home/skip../resources/framework-portduino/libraries/WiFi'...
22+
Submodule path '../libraries/WiFi': checked out 'b885b9595d54ee6eae59696eeae98f631eb27a23'
23+
skip@Dell-7040:~../resources/framework-portduino/example$ pio run
24+
Processing native (platform: https:/github.com/meshtastic/platform-native.git; framework: arduino; board: linux_hardware)
25+
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
26+
Verbose mode can be enabled via `-v, --verbose` option
27+
CONFIGURATION: https:/docs.platformio.org/page/boards/native/linux_hardware.html
28+
PLATFORM: Native (1.2.1+sha.04435d0) > Portduino
29+
HARDWARE: 95.37MB RAM, 95.37MB Flash
30+
PACKAGES:
31+
- framework-portduino @ 0.0.1+sha.de3548f
32+
LDF: Library Dependency Finder -> https:/bit.ly/configure-pio-ldf
33+
LDF Modes: Finder ~ chain, Compatibility ~ soft
34+
[nanopb] Installing Protocol Buffers dependencies
35+
Requirement already satisfied: protobuf>=3.19.1 in /home/skip/.platformio/penv/lib/python3.8/site-packages (4.25.2)
36+
37+
... (lots of output deleted) ...
38+
39+
Compiling .pio/build/native/FrameworkArduino/portduino/simulated/SimHardwareSPI.cpp.o
40+
Archiving .pio/build/native/libFrameworkArduino.a
41+
Indexing .pio/build/native/libFrameworkArduino.a
42+
Linking .pio/build/native/program
43+
================================================================================== [SUCCESS] Took 1.99 seconds ==================================================================================
44+
skip@Dell-7040:~../resources/framework-portduino/example$
45+
```
46+

example/platformio.ini

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[platformio]
2+
default_envs = native
3+
4+
[env:native]
5+
platform = https://github.com/meshtastic/platform-native.git
6+
build_flags = ${env.build_flags} -O0
7+
framework = arduino
8+
board = linux_hardware
9+
10+
11+
12+
File renamed without changes.

0 commit comments

Comments
 (0)