Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: LoRaWAN TTN controller RN2384 [Experimental] #2539

Merged
merged 23 commits into from Aug 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c88bf66
[TTN] Add RN2483-Arduino-Library
TD-er Aug 6, 2019
847f353
[TTN] Skeleton for C018 TTN RN2xx3 controller
TD-er Aug 6, 2019
39f8d40
Improve RN2xx3 LoRo TTN library
TD-er Aug 8, 2019
e0689f6
[LoRa TTN] Add some statistics to the controller info page
TD-er Aug 8, 2019
5e9be55
[RN2384 lib] Only use const String& in function parameters
TD-er Aug 8, 2019
39de02c
[LoRa plugin] Use separate object for C018 data
TD-er Aug 8, 2019
94f66e3
[LoRa TTN] Create special interface for LoRa TTN controller
TD-er Aug 9, 2019
29ac2df
[Controller page] Restructure Controller rendering page
TD-er Aug 9, 2019
25ec44c
Missing break; statement in controllers function switch statement
TD-er Aug 9, 2019
9bff07f
[Cleanup] Split Webserver.ino is separate files per page
TD-er Aug 9, 2019
49012df
[Cleanup] Uncrustify of all WebServer_*.ino files
TD-er Aug 9, 2019
50fea57
[Cleanup] Split handle_controllers() function into separate functions
TD-er Aug 9, 2019
d1c7e3f
[Cleanup] Split handle_devices() function into separate functions
TD-er Aug 9, 2019
8e2f4f3
[Cleanup] Stop using global declared dummyString
TD-er Aug 9, 2019
b5e9784
[LoRa TTN] Show Dev Addr in controller overview page as host
TD-er Aug 9, 2019
7d54a43
[LoRa TTN] Send data to the TTN network + decoder
TD-er Aug 10, 2019
13e6b94
[LoRa TTN] Start working on the interpreter of decoded data
TD-er Aug 10, 2019
472d004
[Encoder] ICACHE_RAM_ATTR added for encoder plugin
TD-er Aug 10, 2019
49ce799
[LoRa TTN] Add basic decoder for all plugins
TD-er Aug 10, 2019
1d2c3ef
[Docs] Building ESPeasy using PlatformIO in VS-Code
TD-er Aug 11, 2019
716ead2
[LoRa TTN] Add decoder types
TD-er Aug 11, 2019
16bcd62
[LoRa TTN] Make settings configurable & add support ABP
TD-er Aug 12, 2019
74d790f
[LoRa TTN] Add documentation stubs for C018-LoRaTTN and C017-Zabbix
TD-er Aug 12, 2019
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

[Docs] Building ESPeasy using PlatformIO in VS-Code

  • Loading branch information...
TD-er committed Aug 11, 2019
commit 1d2c3ef87b4ed4ee244f03b1d80bee7ca9509096
@@ -0,0 +1,112 @@
PlatformIO
**********

ESP easy can be built using the Arduino IDE or PlatformIO (PIO).
Arduino IDE is not being used during development, so it may take some more effort to get it setup for building ESPeasy.

We advice to use PlatformIO as build environment.

PlatformIO is just the build, test and upload environment for many micro controllers like the ESP8266 and ESP32 we use.

On top of that you need to use an editor, or so called IDE in which PlatformIO will be used.

The two main choices are:

* Atom
* Microsoft Visual Studio Code. (MS VS-Code)

Both are free to use and are available for Windows, MacOS and Linux.

Apart from these two, there are more available, like Eclipse and probably more.

PlatformIO with Atom
====================



PlatformIO with VS-Code
=======================

install
-------

For development of ESPeasy, a number of extensions has to be installed in VS-Code:

* PlatformIO IDE (by PlatformIO)
* C/C++ IntelliSense (by Microsoft)
* Arduino for Visual Studio Code (by Microsoft)
* Uncrustify (by Laurent Tréguier)

Uncrustify
----------

The extension Uncrustify is mainly to format the code using a standard code format definition.
This code format standard is defined in the file uncrustify.cfg in the main directory of this repository.
For new code contributions, it is highly appreciated if the code is formatted using this tool.

To do so:

* Right click mouse in editor
* "Format Document"

The first time (after installing uncrustify) it must be confirmed to use Uncrustify as formatter and using the default suggested config file.


Load a project using PlatformIO
-------------------------------

If you have PIO installed and the source tree cloned to your hard drive, then you can open the main dir of the repository.
The main directory of the repository is the level with platformio.ini in it.

Then in a few moments after opening the directory, on the left there will appear an alien logo, the logo of PlatformIO.
If you click that one, you will get a tree with lots and lots of project tasks and environments.

It is important to note that PlatformIO does everything based on environments, which are defined in the platformio.ini file.
In the PlatformIO menu (on the left) everything is grouped per environment.

An environment entry has several tasks, like:

* Build
* Upload
* Monitor
* Upload and Monitor
* ... many more.

Some of these options only are available when you have registered with PlatformIO and some are only for paid subscriptions.
At least the basic ones used for almost any user are available with the free account.

The environment definitions all have at least the used micro controller in the name and the amount of flash memory used.

For example:

* ..._ESP8266_4M -> ESP8266 has external flash, which can vary in size from 512 kB to 16 MB.
* ..._ESP8285_1M -> ESP8285 has the flash internal, so is always 1 MB.
* ..._ESP32_1M8_partition -> ESP32 with 4 MB flash and a 1.8 MB partition for the sketch.

Make a custom build using PlatformIO
------------------------------------

The easiest is to go for the environment "env:custom_ESP8266_4M" and unfold that one.
Then select "Build" to see if it will start building.

If that's working, you can open the file "pre_extra_script.py" and add or remove the plugins and controllers you need.
That Python file is used in the "env:custom_ESP8266_4M" to define what should be embedded and what not.

For example to have only the controller "C014", you can remove "CONTROLLER_SET_ALL", and just add "USES_C014",
The same for the plugins you need.

The file is built in the ".pio/build/...." directory right under the main repository directory (the one with the platformio.ini in it)

All builds will be made in a directory with the same name as the environment used.



Upload to ESP
=============



Linux
-----

For Linux, you may need to install 99-platformio-udev.rules to make PlatformIO upload tools work in vscode.
@@ -27,6 +27,7 @@ Welcome to ESP Easy's documentation!
:maxdepth: 2
:caption: Appendix

Participate/PlatformIO.rst
Participate/Documentation.rst
Reference/Safety.rst
Reference/Command.rst
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.