-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ESP32 + PlatformIO Tutorial and Example
Added tutorial page for using our stack on ESP32 with PlatformIO. Added ESP32 + PIO example files.
- Loading branch information
Showing
25 changed files
with
3,867 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
examples/virtual_terminal/esp32_platformio_object_pool/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
cmake_minimum_required(VERSION 3.16.0) | ||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
project(TestAgIsoStack) | ||
|
||
target_add_binary_data(TestAgIsoStack.elf "src/object_pool/object_pool.iop" | ||
BINARY) |
39 changes: 39 additions & 0 deletions
39
examples/virtual_terminal/esp32_platformio_object_pool/include/README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
This directory is intended for project header files. | ||
|
||
A header file is a file containing C declarations and macro definitions | ||
to be shared between several project source files. You request the use of a | ||
header file in your project source file (C, C++, etc) located in `src` folder | ||
by including it, with the C preprocessing directive `#include'. | ||
|
||
```src/main.c | ||
|
||
#include "header.h" | ||
|
||
int main (void) | ||
{ | ||
... | ||
} | ||
``` | ||
|
||
Including a header file produces the same results as copying the header file | ||
into each source file that needs it. Such copying would be time-consuming | ||
and error-prone. With a header file, the related declarations appear | ||
in only one place. If they need to be changed, they can be changed in one | ||
place, and programs that include the header file will automatically use the | ||
new version when next recompiled. The header file eliminates the labor of | ||
finding and changing all the copies as well as the risk that a failure to | ||
find one copy will result in inconsistencies within a program. | ||
|
||
In C, the usual convention is to give header files names that end with `.h'. | ||
It is most portable to use only letters, digits, dashes, and underscores in | ||
header file names, and at most one dot. | ||
|
||
Read more about using header files in official GCC documentation: | ||
|
||
* Include Syntax | ||
* Include Operation | ||
* Once-Only Headers | ||
* Computed Includes | ||
|
||
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html |
36 changes: 36 additions & 0 deletions
36
examples/virtual_terminal/esp32_platformio_object_pool/include/objectPoolObjects.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// This is a file that will be auto-generated by your object pool designer application. | ||
// These are the object IDs for the objects in the object pool | ||
#define UNDEFINED 65535 //0xFFFF | ||
#define example_WorkingSet 0 //0x0000 | ||
#define mainRunscreen_DataMask 1000 //0x03E8 | ||
#define example_AlarmMask 2000 //0x07D0 | ||
#define exampleNumberInc_Container 3000 //0x0BB8 | ||
#define mainRunscreen_SoftKeyMask 4000 //0x0FA0 | ||
#define alarm_SKeyMask 4001 //0x0FA1 | ||
#define alarm_SoftKey 5000 //0x1388 | ||
#define acknowledgeAlarm_SoftKey 5001 //0x1389 | ||
#define Plus_Button 6000 //0x1770 | ||
#define Minus_Button 6001 //0x1771 | ||
#define Title_OutStr 11000 //0x2AF8 | ||
#define MainDescription_OutStr 11001 //0x2AF9 | ||
#define temp_OutStr_ID_11002 11002 //0x2AFA | ||
#define temp_OutStr_ID_11003 11003 //0x2AFB | ||
#define AlarmMaskTitle_OutStr 11004 //0x2AFC | ||
#define exampleOutput_OutNum 12000 //0x2EE0 | ||
#define Title_OutRect 14000 //0x36B0 | ||
#define MainRunscreenBackground_OutRect 14001 //0x36B1 | ||
#define avatar_OutPict 20000 //0x4E20 | ||
#define warningIcon_OutPict 20001 //0x4E21 | ||
#define redAlert_OutPict 20002 //0x4E22 | ||
#define greenCheck_OutPict 20003 //0x4E23 | ||
#define ButtonExampleNumber_VarNum 21000 //0x5208 | ||
#define title_OutStr 22000 //0x55F0 | ||
#define MainDescription_VarStr 22001 //0x55F1 | ||
#define alarmMaskTitle_OutStr 22002 //0x55F2 | ||
#define ExampleAlarmMask_VarStr 22003 //0x55F3 | ||
#define temp_FontAttr_ID_23000 23000 //0x59D8 | ||
#define temp_FontAttr_ID_23001 23001 //0x59D9 | ||
#define black48x64_FontAttr 23002 //0x59DA | ||
#define solidBlack_LineAttr 24000 //0x5DC0 | ||
#define solidWhite_FillAttr 25000 //0x61A8 | ||
#define exampleNumberInc_ObjPtr 27000 //0x6978 |
46 changes: 46 additions & 0 deletions
46
examples/virtual_terminal/esp32_platformio_object_pool/lib/README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
This directory is intended for project specific (private) libraries. | ||
PlatformIO will compile them to static libraries and link into executable file. | ||
|
||
The source code of each library should be placed in a an own separate directory | ||
("lib/your_library_name/[here are source files]"). | ||
|
||
For example, see a structure of the following two libraries `Foo` and `Bar`: | ||
|
||
|--lib | ||
| | | ||
| |--Bar | ||
| | |--docs | ||
| | |--examples | ||
| | |--src | ||
| | |- Bar.c | ||
| | |- Bar.h | ||
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html | ||
| | | ||
| |--Foo | ||
| | |- Foo.c | ||
| | |- Foo.h | ||
| | | ||
| |- README --> THIS FILE | ||
| | ||
|- platformio.ini | ||
|--src | ||
|- main.c | ||
|
||
and a contents of `src/main.c`: | ||
``` | ||
#include <Foo.h> | ||
#include <Bar.h> | ||
|
||
int main (void) | ||
{ | ||
... | ||
} | ||
|
||
``` | ||
|
||
PlatformIO Library Dependency Finder will find automatically dependent | ||
libraries scanning project source files. | ||
|
||
More information about PlatformIO Library Dependency Finder | ||
- https://docs.platformio.org/page/librarymanager/ldf.html |
24 changes: 24 additions & 0 deletions
24
examples/virtual_terminal/esp32_platformio_object_pool/platformio.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; PlatformIO Project Configuration File | ||
; | ||
; Build options: build flags, source filter | ||
; Upload options: custom upload port, speed and extra flags | ||
; Library options: dependencies, extra library storages | ||
; Advanced options: extra scripting | ||
; | ||
; Please visit documentation for the other options and examples | ||
; https://docs.platformio.org/page/projectconf.html | ||
[env] | ||
build_type = debug | ||
upload_protocol = esptool | ||
monitor_speed = 115200 | ||
monitor_rts = 0 | ||
monitor_dtr = 0 | ||
monitor_filters = esp32_exception_decoder | ||
|
||
lib_deps = https://github.com/Open-Agriculture/AgIsoStack-plus-plus.git | ||
|
||
[env:denky32] | ||
platform = espressif32 | ||
board = denky32 | ||
framework = espidf | ||
board_build.embed_txtfiles = src/object_pool/object_pool.iop |
Oops, something went wrong.