<commit_before>OpenMote-CC2538 platform
========================
The OpenMote-CC2538 is based on TI's CC2538 SoC (System on Chip), featuring an ARM Cortex-M3 running at 16/32 MHz and with 32 kbytes of RAM and 512 kbytes of FLASH. It has the following key features:

  * Standard Cortex M3 peripherals (NVIC, SCB, SysTick)
  * Sleep Timer (underpins rtimers)
  * SysTick (underpins the platform clock and Contiki's timers infrastructure)
  * RF (2.4 GHz)
  * UART
  * Watchdog (in watchdog mode)
  * USB (in CDC-ACM)
  * uDMA Controller (RAM to/from USB and RAM to/from RF)
  * Random number generator
  * Low Power Modes
  * General-Purpose Timers
  * ADC
  * Cryptoprocessor (AES-ECB/CBC/CTR/CBC-MAC/GCM/CCM-128/192/256, SHA-256)
  * Public Key Accelerator (ECDH, ECDSA)
  * Flash-based port of Coffee
  * PWM
  * Built-in core temperature and battery sensor

Requirements
============
To start using Contiki with the OpenMote-CC2538, the following is required:

 * An OpenMote-CC2538 board.
 * A toolchain to compile Contiki for the CC2538.
 * Drivers so that your OS can communicate with your hardware.
 * Software to upload images to the CC2538.

Install a Toolchain
-------------------
The toolchain used to build contiki is arm-gcc, also used by other arm-based Contiki ports. If you are using Instant Contiki, you may have a version pre-installed in your system.

The platform is currently being used/tested with "GNU Tools for ARM Embedded Processors" (<https://launchpad.net/gcc-arm-embedded>). The current recommended version and the one being used by Contiki's regression tests on Travis is shown below.

    $ arm-none-eabi-gcc --version
    arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.2.1 20151202 (release) [ARM/embedded-5-branch revision 231848]
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Software to Program the Nodes
-----------------------------
The OpenMote-CC2538 can be programmed via the jtag interface or via the serial boot loader on the chip.

The OpenMote-CC2538 has a mini JTAG 10-pin male header, compatible with the `SmartRF06` development board, which can be used to flash and debug the platforms. Alternatively one could use the `JLink` programmer with a 20-to-10 pin converter like the following: <https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/>.

The serial boot loader on the chip is exposed to the user via the USB interface. To activate the bootloader short the ON/SLEEP pin to GND and then press the reset button.

Instructions to flash for different OS are given below.

* On Windows:
    * Nodes can be programmed with TI's ArmProgConsole or the SmartRF Flash Programmer 2. The README should be self-explanatory. With ArmProgConsole, upload the file with a `.bin` extension.
    * Nodes can also be programmed via the serial boot loader in the cc2538. In `tools/cc2538-bsl/` you can find `cc2538-bsl.py` python script, which can download firmware to your node via a serial connection. If you use this option you just need to make sure you have a working version of python installed. You can read the README in the same directory for more info.

* On Linux:
    * Nodes can be programmed with TI's [UniFlash] tool. With UniFlash, use the file with `.elf` extension.
    * Nodes can also be programmed via the serial boot loader in the cc2538. No extra software needs to be installed.

* On OSX:
    * The `cc2538-bsl.py` script in `tools/cc2538-bsl/` is the only option. No extra software needs to be installed.

Use the Port
============
The following examples are intended to work off-the-shelf:

* Examples under `examples/openmote-cc2538`
* MQTT example `examples/cc2538dk/mqtt-demo`
* Border router: `examples/ipv6/rpl-border-router`
* Webserver: `examples/webserver-ipv6`
* CoAP example: `examples/er-rest-example`

Build your First Examples
-------------------------
It is recommended to start with the `openmote-demo`, it is a simple example that demonstrates the OpenMote-CC2538 features, such as the built-in sensors, LEDs, user button and radio (using RIME broadcast).

The `Makefile.target` includes the `TARGET=` argument, predefining which is the target platform to compile for, it is automatically included at compilation.

To generate or override an existing one, you can run:

`make TARGET=openmote-cc2538 savetarget`

Then you can just run `make` to compile an application, otherwise you will need to do `make TARGET=openmote-cc2538`.

If you want to upload the compiled firmware to a node via the serial boot loader you need first to either manually enable the boot loader.

Then use `make openmote-demo.upload`. 

The `PORT` argument could be used to specify in which port the device is connected, in case we have multiple devices connected at the same time.
<commit_msg>Updated OpenMote-CC2538 README.md file with new features.<commit_after>OpenMote-CC2538 platform
========================
The OpenMote-CC2538 is based on TI's CC2538 SoC (System on Chip), featuring an ARM Cortex-M3 running at 16/32 MHz and with 32 kbytes of RAM and 256/512 kbytes of FLASH. It has the following key features:

  * Standard Cortex M3 peripherals (NVIC, SCB, SysTick)
  * Sleep Timer (underpins rtimers)
  * SysTick (underpins the platform clock and Contiki's timers infrastructure)
  * RF (2.4 GHz)
  * UART
  * Watchdog (in watchdog mode)
  * USB (in CDC-ACM)
  * uDMA Controller (RAM to/from USB and RAM to/from RF)
  * Random number generator
  * Low Power Modes
  * General-Purpose Timers
  * ADC
  * Cryptoprocessor (AES-ECB/CBC/CTR/CBC-MAC/GCM/CCM-128/192/256, SHA-256)
  * Public Key Accelerator (ECDH, ECDSA)
  * Flash-based port of Coffee
  * PWM
  * Built-in core temperature and battery sensor

Requirements
============
To start using Contiki with the OpenMote-CC2538, the following is required:

 * An OpenMote-CC2538 board with a OpenUSB, OpenBase or OpenBattery carrier boards.
 * A toolchain to compile Contiki for the CC2538.
 * Drivers so that your OS can communicate with your hardware.
 * Software to upload images to the CC2538.

Install a Toolchain
-------------------
The toolchain used to build contiki is arm-gcc, also used by other arm-based Contiki ports. If you are using Instant Contiki, you may have a version pre-installed in your system.

The platform is currently being used/tested with "GNU Tools for ARM Embedded Processors" (<https://launchpad.net/gcc-arm-embedded>). The current recommended version and the one being used by Contiki's regression tests on Travis is shown below.

    $ arm-none-eabi-gcc --version
    arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.2.1 20151202 (release) [ARM/embedded-5-branch revision 231848]
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Software to Program the Nodes
-----------------------------
The OpenMote-CC2538 can be programmed via the jtag interface or via the serial boot loader on the chip.

The OpenMote-CC2538 has a mini JTAG 10-pin male header, compatible with the `SmartRF06` development board, which can be used to flash and debug the platforms. Alternatively one could use the `JLink` programmer with a 20-to-10 pin converter like the following: <https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/>.

The serial boot loader on the chip is exposed to the user via the USB interface of both the OpenUSB and the OpenBase carrier boards. The OpenUSB carrier board is capable to automatically detect the boot loader sequence and flash the CC2538 without user intervention. The OpenBase carrier board does not have such feature, so to activate the bootloader the user needs to short the ON/SLEEP pin to GND and then press the reset button. 

Instructions to flash for different OS are given below.

* On Windows:
    * Nodes can be programmed with TI's ArmProgConsole or the SmartRF Flash Programmer 2. The README should be self-explanatory. With ArmProgConsole, upload the file with a `.bin` extension.
    * Nodes can also be programmed via the serial boot loader in the cc2538. In `tools/cc2538-bsl/` you can find `cc2538-bsl.py` python script, which can download firmware to your node via a serial connection. If you use this option you just need to make sure you have a working version of python installed. You can read the README in the same directory for more info.

* On Linux:
    * Nodes can be programmed with TI's [UniFlash] tool. With UniFlash, use the file with `.elf` extension.
    * Nodes can also be programmed via the serial boot loader in the cc2538. No extra software needs to be installed.

* On OSX:
    * The `cc2538-bsl.py` script in `tools/cc2538-bsl/` is the only option. No extra software needs to be installed.

Use the Port
============
The following examples are intended to work off-the-shelf:

* Examples under `examples/openmote-cc2538`
* MQTT example `examples/cc2538dk/mqtt-demo`
* Border router: `examples/ipv6/rpl-border-router`
* Webserver: `examples/webserver-ipv6`
* CoAP example: `examples/er-rest-example`

Build your First Examples
-------------------------
It is recommended to start with the `openmote-demo`, it is a simple example that demonstrates the OpenMote-CC2538 features, such as the built-in sensors, LEDs, user button and radio (using RIME broadcast).

The `Makefile.target` includes the `TARGET=` argument, predefining which is the target platform to compile for, it is automatically included at compilation.

To generate or override an existing one, you can run:

`make TARGET=openmote-cc2538 savetarget`

Then you can just run `make` to compile an application, otherwise you will need to do `make TARGET=openmote-cc2538`.

If you want to upload the compiled firmware to a node via the serial boot loader you need first to either manually enable the boot loader.

Then use `make openmote-demo.upload`. 

If you are compiling for the OpenMote-CC2538 Rev.A1 board (CC2538SF53, 256 KB Flash) you have to pass `BOARD_REVISION=REV_A1` in all your `make` commands to ensure that the linking stage configures the linker script with the appropriate parameters. If you are compiling for older OpenMote-CC2538 revisions (CC2538SF53, 512 KB Flash) you can skip this parameter since the default values are already correct.

The `PORT` argument could be used to specify in which port the device is connected, in case we have multiple devices connected at the same time.

{'fraction_non_alphanumeric': 0.08234519104084322, 'fraction_numerical': 0.030397139092791268, 'mean_word_length': 3.832651205093224, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6940673', 'n_tokens_mistral': 3285, 'n_tokens_neox': 2947, 'n_words': 1474}