diff --git a/documentation/source/quick-start/nitrogen-96-board.rst b/documentation/source/quick-start/nitrogen-96-board.rst index c5c83030ca635ce8c165786f4cd3838d2bfd282b..89e6035baa5984306e367b3872f30d7f019f95c0 100644 --- a/documentation/source/quick-start/nitrogen-96-board.rst +++ b/documentation/source/quick-start/nitrogen-96-board.rst @@ -1,7 +1,7 @@ Nitrogen 96 Board ################# -Nitrogen is a 96Boards compliant IoT Edition board which aims to provide economic and compact BLE solutions for a variety of IoT projects. This board features the nRF52832 microcontroller by Nordic, 64kb of RAM and 512kb of onboard flash storage. An easily accessible 40 pin low-speed expansion connector and onboard antenna offer a wide variety of IO on the much desired 96Boards IoT form factor. The 96Boards Nitrogen hardware provides support for the Nordic Semiconductor nRF52832 ARM Cortex-M4F CPU. +Nitrogen is a 96Boards compliant IoT Edition board which aims to provide economic and compact BLE solutions for a variety of IoT projects. This board features the nRF52832 microcontroller by Nordic, 64kb of RAM and 512kb of onboard flash storage. An easily accessible 40 pin low-speed expansion connector and onboard antenna offer a wide variety of IO on the much desired 96Boards IoT form factor. The 96Boards Nitrogen hardware provides support for the Nordic Semiconductor nRF52832 ARM Cortex-M4F CPU. .. figure:: images/nitrogen_board.jpg @@ -64,4 +64,100 @@ Addition information | | | +-------------+--------------------------------------------+ -For complete details on building and flashing applications to the Nitrogen, refer https://www.96boards.org/documentation/iot/nitrogen/. +For more details on Nitrogen 96 board, refer https://www.96boards.org/documentation/iot/nitrogen/. + +Flashing Zephyr onto 96Boards Nitrogen +************************************** + +The 96Boards Nitrogen board can be flashed via the `CMSIS DAP interface <https://os.mbed.com/handbook/CMSIS-DAP>`_, which is provided by the micro USB interface to the LPC11U35 chip. + +Using the CMSIS-DAP interface, the board can be flashed via the USB storage interface (drag-and-drop) and also via `pyOCD <https://github.com/pyocd/pyOCD>`_. + +Installing pyOCD +================ + +The latest stable version of pyOCD can be installed via pip as follows: + +.. code-block:: console + + pip install --pre -U pyocd + +To install the latest development version (master branch), do the following: + +.. code-block:: console + + pip install --pre -U git+https://github.com/mbedmicro/pyOCD.git#egg=pyOCD + +You can then verify that your board is detected by pyOCD by running: + +.. code-block:: console + + pyocd-flashtool -l + +Common Errors +************* + +No connected boards +=================== + +If you don’t use sudo when invoking pyocd-flashtool, you might get any of the following errors: + +.. code-block:: console + + No available boards are connected + No connected boards + Error: There is no board connected. + + +To fix the permission issue, simply add the following udev rule for the NXP LPC1768 interface: + +.. code-block:: console + + echo 'ATTR{idProduct}=="0204", ATTR{idVendor}=="0d28", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/50-cmsis-dap.rules + +Finally, unplug and plug the board again. + +ValueError: The device has no langid +==================================== + +As described by `pyOCD issue 259 <https://github.com/pyocd/pyOCD/issues/259>`_, you might get the **ValueError: The device has no langid** error when not running pyOCD as root (e.g. sudo). + +To fix the above error, add the udev rule shown in the previous section and install a more recent version of pyOCD. + +Flashing an Application to 96Boards Nitrogen +******************************************** + +Here is an example for the `Hello World application <https://docs.zephyrproject.org/latest/samples/hello_world/README.html#hello-world>`_. +This requires installing the `pyOCD Debug Host Tools <https://docs.zephyrproject.org/latest/guides/flash_debug/host-tools.html#pyocd-debug-host-tools>`_. + +.. code-block:: console + + From the root of the zephyr repository + west build -b 96b_nitrogen samples/hello_world + west flash + +Run your favorite terminal program to listen for output. + +.. code-block:: console + + minicom -D <tty_device> -b 115200 + +Replace **<tty_device>** with the port where the board 96Boards Nitrogen can be found. For example, under Linux, **/dev/ttyACM0**. The **-b** option sets baud rate ignoring the value from config. + +Press the Reset button and you should see the the following message in your terminal: + +.. code-block:: console + + Hello World! arm + +Debugging with GDB +****************** + +You can debug an application in the usual way. Here is an example for the Hello World application. This also requires pyOCD. + +.. code-block:: console + From the root of the zephyr repository + west build -b 96b_nitrogen samples/hello_world + west debug + +