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

ATCMD Config APIs + new API structure + scripting for webserver blob & certs #2

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
efa634b
Change HS300X sensor data from float to double, just to make sure
wtk-evoirin Aug 7, 2024
d8d6966
Add support for the new IOTC configuration structures & API
wtk-evoirin Aug 7, 2024
417f16e
Remove extraneous da16k source file (moved to atcmd lib)
wtk-evoirin Aug 7, 2024
1e96b3e
Update docs
wtk-evoirin Aug 7, 2024
c133edf
Adjust project for new universal configuration structures.
wtk-evoirin Aug 8, 2024
e7ca5e1
Formatting fixes
wtk-evoirin Aug 8, 2024
a125679
Add mechanism to provide device certificate and key at compile time.
wtk-evoirin Aug 8, 2024
f346dbf
Update DA16K submodule
wtk-evoirin Aug 9, 2024
80409fa
Fix pre-build cert gen lacking newlines.
wtk-evoirin Aug 9, 2024
7c6708e
Update DA16K submodule
wtk-evoirin Aug 9, 2024
16a60de
Replace Windows-only EmbedFS tool with python script.
wtk-evoirin Aug 12, 2024
e0daae9
Update atcmd lib submodule.
wtk-evoirin Aug 14, 2024
a433f7a
Warning comment & emit compiler warning when using client cert/key.
wtk-evoirin Aug 14, 2024
88b6c8f
Add client cert/key transmission insecurity warning to README
wtk-evoirin Aug 15, 2024
b72eeb9
Fix printing error on missing command parameters
wtk-evoirin Aug 15, 2024
c12dc5d
Update atcmd library submodule
wtk-evoirin Aug 15, 2024
b32d0f5
Update to latest atcmd lib, use multiple k/v methods
wtk-evoirin Sep 11, 2024
921a2fb
Update binaries
wtk-evoirin Sep 11, 2024
0090969
Restore fswebsite blob functionality and fix file naming
wtk-evoirin Sep 11, 2024
b3476f7
Update atcmd library submodule
wtk-evoirin Sep 11, 2024
d8d5595
Add missing cert folder
wtk-evoirin Sep 11, 2024
450ea9d
Update atcmd library submodule.
wtk-evoirin Sep 11, 2024
6ab83fb
Update atcmd library submodule & binary
wtk-evoirin Sep 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Quickstart

## **Note:** The Quickstart procedure requires the DA16xxx PMOD device to be *fully set up and configured for IoTConnect, WiFi and your device-specific info (certificate/key)*

### Following the [build guide](README.md) - i.e. manually building and flashing the firmware, you can specifiy custom IoTConnect and WiFi settings to avoid having to set the DA16xxx PMOD device manually.

---

## Initial setup

The binary image is located at `./e2studio/Debug` (`.hex` extension).

To flash the image, please download the [Renesas Flash Programmer](https://www.renesas.com/us/en/software-tool/renesas-flash-programmer-programming-gui#downloads).
Expand Down
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,44 @@ Follow the [Renesas CK-RA6M5 v2 Quick Start Guide](https://www.renesas.com/us/en

# Building & Development

Install the [Flexible Software Package with e² Studio IDE](https://www.renesas.com/us/en/software-tool/flexible-software-package-fsp).
* Install **Python 3.8 or higher**
* Install the [Flexible Software Package with e² Studio IDE](https://www.renesas.com/us/en/software-tool/flexible-software-package-fsp).

The project is tested and built with FSP version 5.0.0, but it may work with later 5.x.x versions.

You can now open / import, build and debug the project as per the Renesas Quick Start guide.
You can now open / import, build and debug the project as per the Renesas Quick Start guide.

## Enabling Automatic IoTConnect / Device Configuration

The underlying ATCMD library can configure the device automatically using certain APIs.

**This allows you to skip manual configuration of the DA16xxx PMOD device** (you are, however, still required to flash the firmware on it.)

The file `iotc_demo_thread_entry.c` contains definitions for these:

* Define `DA16K_IOTC_CONFIG_USED` in the project to use custom IoTConnect configuration parameters
* Define `DA16K_WIFI_CONFIG_USED` in the project to use custom WiFi configuration parameters

`DA16K_IOTC_AWS` may be replaced with `DA16K_IOTC_AZURE` to fit your environment.

![](assets/cfgdef.png)

### Adding a Device Client Certificate / Private Key for Testing

**NOTE: This requires a custom IOTC Configuration via `DA16K_IOTC_CONFIG_USED` to work (see above)!**

You may place device client certificate and private key files in the PEM format into the **`e2studio/cert/`** directory.

The file names must be:

* `device_cert.pem` (client cert)
* `device_key.pem` (private key)

There is an automatic pre-build step in the form of a python script, `/util/pre_build.py`. which generates a header file from these.

---
***WARNING:***

***CLIENT CERTIFICATE TRANSMISSION IS INSECURE AND THE FUNCTIONALITY IS ONLY PROVIDED FOR TESTING PURPOSES.***

---
4 changes: 1 addition & 3 deletions e2studio/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.1050801130" name="Debug" parent="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug" preannouncebuildStep="Creating Web resources" prebuildStep="..\util\dos_scripts\Build_Compiletime_Script.bat">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.1050801130" name="Debug" parent="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug" preannouncebuildStep="Creating Web resources &amp; Device Cert Include" prebuildStep="../util/pre_build.py">
<folderInfo id="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.1050801130." name="/" resourcePath="">
<toolChain id="com.renesas.cdt.managedbuild.gnuarm.toolchain.elf.debug.545611967" name="GCC ARM Embedded" superClass="com.renesas.cdt.managedbuild.gnuarm.toolchain.elf.debug">
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1859574891" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" useByScannerDiscovery="false" value="true" valueType="boolean"/>
Expand Down Expand Up @@ -130,8 +130,6 @@
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1051079408" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
<listOptionValue builtIn="false" value="DA16K_CONFIG_FILE='&quot;da16k_comm_config.h&quot;'"/>
<listOptionValue builtIn="false" value="DA16K_CONFIG_RENESAS_SCI_UART_CHANNEL=9"/>
<listOptionValue builtIn="false" value="DA16K_CONFIG_CK_RA6M5"/>
<listOptionValue builtIn="false" value="_RA_CORE=CM33"/>
<listOptionValue builtIn="false" value="_RA_ORDINAL=1"/>
</option>
Expand Down
Loading