Skip to content

Commit

Permalink
docs: convert to .rst and add readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed May 14, 2017
1 parent 5c7247b commit 283eb97
Show file tree
Hide file tree
Showing 81 changed files with 7,191 additions and 6,324 deletions.
22 changes: 10 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ language: bash
os:
- linux

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
dist: trusty

install:
- pip install --user -r doc/requirements.txt

script:
- set -e
- export CXX="g++-4.8" CC="gcc-4.8" GCOV="gcov-4.8"
- echo -e "travis_fold:start:docs"
- pushd $TRAVIS_BUILD_DIR/doc
- SPHINXOPTS="-W" make html
- popd
- echo -e "travis_fold:end:docs"
- echo -e "travis_fold:start:host_tests"
- pushd $TRAVIS_BUILD_DIR/tests/host
- make
- make clean-objects
- popd
- echo -e "travis_fold:end:host_tests"
- echo -e "travis_fold:start:sketch_test_env_prepare"
- popd
- wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
- tar xf arduino.tar.xz
- mv arduino-nightly $HOME/arduino_ide
Expand All @@ -42,10 +44,6 @@ script:
- cat size.log
- echo -e "travis_fold:end:size_report"

after_success:
- pushd $TRAVIS_BUILD_DIR/tests/host
- bash <(curl -s https://codecov.io/bash) -X gcov

notifications:
email:
on_success: change
Expand Down
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = ESP8266ArduinoCore
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
102 changes: 0 additions & 102 deletions doc/Troubleshooting/debugging.md

This file was deleted.

107 changes: 107 additions & 0 deletions doc/Troubleshooting/debugging.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
Debugging
=========

Introduction
------------

Since 2.1.0-rc1 the core includes a Debugging feature that is
controllable over the IDE menu.

The new menu points manage the real-time Debug messages.

Requirements
~~~~~~~~~~~~

For usage of the debugging a Serial connection is required (Serial or
Serial1).

The Serial Interface need to be initialized in the ``setup()``.

Set the Serial baud rate as high as possible for your Hardware setup.

Minimum sketch to use debugging:

.. code:: cpp
void setup() {
Serial.begin(115200);
}
void loop() {
}
Usage
~~~~~

1. Select the Serial interface for the Debugging messages: |Debug-Port|

2. Select which type / level you want debug messages for: |Debug-Level|

3. Check if the Serial interface is initialized in ``setup()`` (see
`Requirements <#requirements>`__)

4. Flash sketch

5. Check the Serial Output

Informations
------------

It work with every sketch that enables the Serial interface that is
selected as debug port.

The Serial interface can still be used normal in the Sketch.

The debug output is additional and will not disable any interface from
usage in the sketch.

For Developers
~~~~~~~~~~~~~~

For the debug handling uses defines.

The defined are set by command line.

Debug Port
^^^^^^^^^^

The port has the define ``DEBUG_ESP_PORT`` possible value: - Disabled:
define not existing - Serial: Serial - Serial1: Serial1

Debug Level
^^^^^^^^^^^

All defines for the different levels starts with ``DEBUG_ESP_``

a full list can be found here in the
`boards.txt <https://github.com/esp8266/Arduino/blob/master/boards.txt#L180>`__

Example for own debug messages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The debug messages will be only shown when the Debug Port in the IDE
menu is set.

.. code:: cpp
#ifdef DEBUG_ESP_PORT
#define DEBUG_MSG(...) DEBUG_ESP_PORT.printf( __VA_ARGS__ )
#else
#define DEBUG_MSG(...)
#endif
void setup() {
Serial.begin(115200);
delay(3000);
DEBUG_MSG("bootup...\n");
}
void loop() {
DEBUG_MSG("loop %d\n", millis());
delay(1000);
}
.. |Debug-Port| image:: debug_port.png
.. |Debug-Level| image:: debug_level.png

66 changes: 0 additions & 66 deletions doc/Troubleshooting/stack_dump.md

This file was deleted.

Loading

0 comments on commit 283eb97

Please sign in to comment.