-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Draft for TLS Hello Server with Zephyr
- Loading branch information
night1rider
committed
Jun 18, 2024
1 parent
56d5dad
commit 177a614
Showing
32 changed files
with
473 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
**/build | ||
**/__repo__ | ||
**/.vscode | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,91 @@ | ||
# nxp-appcodehub | ||
This Repo is currently a work in progress. | ||
# wolfSSL NXP Application Code Hub | ||
|
||
<div style="display: flex; justify-content: space-between; align-items: center;"> | ||
<a href="https://www.nxp.com"> | ||
<img src="https://mcuxpresso.nxp.com/static/icon/nxp-logo-color.svg" width="100"/> | ||
</a> | ||
<a href="https://www.wolfssl.com/"> | ||
<img src="Images/wolfssl_logo_300px.png" width="100"/> | ||
</a> | ||
</div> | ||
|
||
This Repo is currently a work in progress and some items are placeholders. | ||
|
||
## How to Use | ||
The projects in this repo are intended to be used with NXP's [MCUXpresso for VS-code plugin](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc800-arm-cortex-m0-plus-/mcuxpresso-for-visual-studio-code:MCUXPRESSO-VSC?cid=wechat_iot_303216). | ||
|
||
To use a demo project simply use the provided `setup.sh` or `setup.bat` on the given project you want to run. | ||
|
||
### 1. Setup | ||
|
||
#### Example | ||
MacOS and Linux: | ||
``` | ||
cd \path\to\nxp-appcodehub | ||
./setup.sh dm-wolfssl-tls-hello-server-with-zephyr | ||
``` | ||
Expected Output: | ||
``` | ||
nxp-appcodehub % ./setup.sh dm-wolfssl-tls-hello-server-with-zephyr | ||
Created .vscode directory in dm-wolfssl-tls-hello-server-with-zephyr. | ||
cmake-kits.json created. | ||
cmake-variants.json created. | ||
launch.json created. | ||
mcuxpresso-tools.json created. | ||
settings.json created. | ||
``` | ||
|
||
This creates the necassary base files that the plugin needs to import the project correctly. | ||
|
||
### 2. Import the Project | ||
|
||
Assuming you have the necassary software describe in the readme for the given | ||
project, you simple need to go to the MCUXpresso plugin menu and select `Import Project` as seen in the figure below. | ||
|
||
[<img src="Images/Plugin-Menu.png" width="200"/>](Images/Plugin-Menu.png) | ||
|
||
Once you select `Import Project` select the path for the desired project you want to run. This will then detect the type of Project it. You will need to setup any repositories and SDK's through the plugin options. | ||
|
||
In the figure below the imported project is of the type `Zephyr` and this means it needs to point to the Zephyr SDK and Repository. These need can be install via the `Import Repository` and the `MCUXpresso Installer` options seen in the previous menu | ||
|
||
[<img src="Images/Import-Menu.png" width="500"/>](Images/Import-Menu.png) | ||
|
||
Once you select the `Repository` and `SDK` you want to use with the imported project hit the `Import` button. | ||
|
||
## Setting Up wolfSSL, wolfMQTT, and wolfSSH | ||
|
||
Currently with the way the projects are setup you will need to add wolfSSL, wolfSSH, wolfMQTT, ect to the `west.yml` file inside the Zephyr Repo thats specified during the importation of the project. | ||
|
||
``` | ||
manifest: | ||
remotes: | ||
# <your other remotes> | ||
- name: wolfssl | ||
url-base: https://github.com/wolfssl | ||
- name: wolfssh | ||
url-base: https://github.com/wolfssl | ||
- name: wolfmqtt | ||
url-base: https://github.com/wolfssl | ||
projects: | ||
# <your other projects> | ||
- name: wolfssl | ||
path: modules/crypto/wolfssl | ||
revision: master | ||
remote: wolfssl | ||
- name: wolfssh | ||
path: modules/lib/wolfssh | ||
revision: master | ||
remote: wolfssh | ||
- name: wolfmqtt | ||
path: modules/lib/wolfmqtt | ||
revision: master | ||
remote: wolfmqtt | ||
``` | ||
|
||
For more Zephyr Specific examples look at the following README's: | ||
- [wolfSSL](https://github.com/wolfSSL/wolfssl/tree/master/zephyr) | ||
- [wolfSSH](https://github.com/wolfSSL/wolfshh/tree/master/zephyr) | ||
- [wolfMQTT](https://github.com/wolfSSL/wolfmqtt/tree/master/zephyr) | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added
BIN
+9.92 KB
dm-wolfssl-tls-hello-server-with-zephyr/Images/wolfssl_logo_300px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
@echo off | ||
if "%~1"=="" ( | ||
echo Usage: %0 [subfolder] | ||
echo Please specify a subfolder path. | ||
pause | ||
exit /b | ||
) | ||
|
||
set "subfolder=%~1" | ||
set "baseDir=%~dp0" | ||
set "targetDir=%baseDir%\%subfolder%\.vscode" | ||
|
||
if not exist "%baseDir%\%subfolder%\" ( | ||
echo The specified subfolder does not exist in the base directory. | ||
pause | ||
exit /b | ||
) | ||
|
||
if exist "%targetDir%" ( | ||
echo Folder "%targetDir%" already exists. | ||
) else ( | ||
mkdir "%targetDir%" | ||
echo .vscode folder created at "%targetDir%" | ||
) | ||
|
||
rem Create cmake-kits.json | ||
echo Creating cmake-kits.json... | ||
> "%targetDir%\cmake-kits.json" ( | ||
echo [ | ||
echo { | ||
echo "name": "Zephyr build tool", | ||
echo "environmentVariables": { | ||
echo "ZEPHYR_BASE": "", | ||
echo "ZEPHYR_SDK_INSTALL_DIR": "" | ||
echo }, | ||
echo "cmakeSettings": { | ||
echo "BOARD": "frdm_mcxn947/mcxn947/cpu0" | ||
echo }, | ||
echo "keep": true | ||
echo } | ||
echo ] | ||
) | ||
echo cmake-kits.json created. | ||
|
||
rem Create cmake-variants.json | ||
echo Creating cmake-variants.json... | ||
> "%targetDir%\cmake-variants.json" ( | ||
echo { | ||
echo "build_type": { | ||
echo "default": "debug", | ||
echo "choices": { | ||
echo "debug": { | ||
echo "short": "debug", | ||
echo "buildType": "debug" | ||
echo }, | ||
echo "release": { | ||
echo "short": "release", | ||
echo "buildType": "release" | ||
echo } | ||
echo } | ||
echo } | ||
echo } | ||
) | ||
echo cmake-variants.json created. | ||
|
||
rem Create launch.json | ||
echo Creating launch.json... | ||
> "%targetDir%\launch.json" ( | ||
echo { | ||
echo "configurations": [ | ||
echo { | ||
echo "type": "cppdbg", | ||
echo "name": "Debug project configuration", | ||
echo "request": "launch", | ||
echo "cwd": "${workspaceRoot}", | ||
echo "MIMode": "gdb", | ||
echo "setupCommands": [ | ||
echo {"text": "set remotetimeout 600"}, | ||
echo {"text": "set debug-file-directory"} | ||
echo ], | ||
echo "program": "", | ||
echo "miDebuggerServerAddress": "", | ||
echo "variables": { | ||
echo "mcuxStopAtSymbol": "main", | ||
echo "mcuxSerialNumber": "", | ||
echo "mcuxAttach": "false", | ||
echo "mcuxRemoteProbeType": "" | ||
echo }, | ||
echo "logging": { | ||
echo "engineLogging": false | ||
echo } | ||
echo } | ||
echo ] | ||
echo } | ||
) | ||
echo launch.json created. | ||
|
||
rem Create mcuxpresso-tools.json | ||
echo Creating mcuxpresso-tools.json... | ||
> "%targetDir%\mcuxpresso-tools.json" ( | ||
echo { | ||
echo "version": "1.1", | ||
echo "toolchainPath": "", | ||
echo "toolchainVersion": "", | ||
echo "linkedProjects": [], | ||
echo "trustZoneType": "none", | ||
echo "multicoreType": "none", | ||
echo "debug": { | ||
echo "linkserver": {}, | ||
echo "pemicro": {}, | ||
echo "segger": {} | ||
echo }, | ||
echo "projectType": "zephyr-workspace", | ||
echo "sdk": { | ||
echo "boardId": "frdm_mcxn947/mcxn947/cpu0", | ||
echo "version": "", | ||
echo "path": "" | ||
echo } | ||
echo } | ||
) | ||
echo mcuxpresso-tools.json created. | ||
|
||
rem Create settings.json | ||
echo Creating settings.json... | ||
> "%targetDir%\settings.json" ( | ||
echo { | ||
echo "cmake.configureOnOpen": false, | ||
echo "C_Cpp.errorSquiggles": "disabled", | ||
echo "cmake.preferredGenerators": [ | ||
echo "Ninja", | ||
echo "Unix Makefiles", | ||
echo "MinGW Makefiles" | ||
echo ], | ||
echo "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", | ||
echo "cmake.sourceDirectory": "${workspaceFolder}" | ||
echo } | ||
) | ||
echo settings.json created. | ||
|
||
pause |
Oops, something went wrong.