Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve Azure RTOS.
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

Please also mention any information which could help others to understand
the problem you're facing:
- What target device are you using?
- Which version of Azure RTOS?
- What toolchain and environment?
- What have you tried to diagnose or workaround this issue?

**To Reproduce**
Steps to reproduce the behavior:
1. Build my project in IAR Workbench.
1. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Impact**
What impact does this issue have on your progress (e.g., annoyance, showstopper)

**Logs and console output**
If applicable, add console logs or other types of debug information like Wireshark capture as `.zip` file.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea or enhancement to existing feature for Azure RTOS.
title: ''
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/hardware-or-architecture-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Hardware or architecture support
about: Suggest adding hardware or new architecture support.
title: ''
labels: hardware
assignees: ''

---

**Is this request related to a particular hardware platform, SoC, board? Please describe.**
Describe in details the hardware support being requested and why this support benefits Azure RTOS.

**Describe why you are asking for this support?**
Describe why you are asking for this support.

If this is a new board or SoC, please state whether you are willing to maintain the Azure RTOS support together with you.

**Additional context**
Add any other context or graphics (drag-and-drop an image) about the hardware here.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)

# Set up the project
project(netxduo
VERSION 6.0.0
LANGUAGES C ASM
)

option(NXD_ENABLE_FILE_SERVERS "Includes a dependency on FileX to support 'server' protocol handlers" ON)
option(NXD_ENABLE_AZURE_IOT "Enable Azure IoT" OFF)
option(NX_AZURE_DISABLE_IOT_SECURITY_MODULE "Disable Azure IoT Security Module" OFF)

if(NOT DEFINED THREADX_ARCH)
message(FATAL_ERROR "Error: THREADX_ARCH not defined")
Expand Down Expand Up @@ -39,7 +40,11 @@ endif()
set(CUSTOM_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/custom_inc)

# Pick up the port specific stuff first
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN})
if(DEFINED NETXDUO_CUSTOM_PORT)
add_subdirectory(${NETXDUO_CUSTOM_PORT} netxduo_port)
else()
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/ports/${THREADX_ARCH}/${THREADX_TOOLCHAIN})
endif()

# Then the common files
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common)
Expand All @@ -51,6 +56,9 @@ add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/addons)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/crypto_libraries)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/nx_secure)

# Utility components
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/utility)

# If the user provided an override, copy it to the custom directory
if (NOT NX_USER_FILE)
message(STATUS "Using default nx_user.h file")
Expand Down
7 changes: 5 additions & 2 deletions LICENSED-HARDWARE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LICENSED HARDWARE LIST

Last Updated: 2020-12-15
Last Updated: 2021-04-01

Microsoft has entered into OEM Agreements with manufacturers of the following
microprocessors and microcontrollers (the “hardware”) to enable those
Expand Down Expand Up @@ -29,12 +29,15 @@ Microchip:

NXP:

NXP i.MX RT10xx series crossover MCUs
i.MX RT10xx and RT116x/7x series crossover MCUs
LPC5500 series


Renesas:

Synergy Platform
RX Family of MCUs
RA Family of MCUs
RZ Family of MPUs

--------------------------------------------------------------------------------
Expand Down
167 changes: 98 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,98 +2,127 @@

This advanced, industrial-grade TCP/IP network stack is designed specifically for deeply embedded real-time and IoT applications. Azure RTOS NetX Duo is a dual IPv4 and IPv6 network stack, while Azure RTOS NetX is the original IPv4 network stack, essentially a subset of Azure RTOS NetX Duo.

## Documentation
Here are the key features and modules of NetX Duo:

Documentation for this library can be found here: http://docs.microsoft.com/azure/rtos/netx-duo
![NetX Duo Key Features](./docs/netx-duo-features.png)

## Getting Started

## Cloning the repo
Azure RTOS NetX Duo as part of Azure RTOS has been integrated to the semiconductor's SDKs and development environment. You can develop using the tools of choice from [STMicro](https://www.st.com/content/st_com/en/campaigns/x-cube-azrtos-azure-rtos-stm32.html), [NXP](https://www.nxp.com/design/software/embedded-software/azure-rtos-for-nxp-microcontrollers:AZURE-RTOS), [Renesas](https://github.com/renesas/azure-rtos) and [Microchip](https://mu.microchip.com/get-started-simplifying-your-iot-design-with-azure-rtos).

```bash
$ git clone https://github.com/azure-rtos/netxduo.git
$ git submodule update --init
```
We also provide [getting started guide](https://github.com/azure-rtos/getting-started) and [samples](https://github.com/azure-rtos/samples) using hero development boards from semiconductors you can build and test with.

# Repository Structure and Usage
See [Overview of Azure RTOS NetX Duo](https://learn.microsoft.com/azure/rtos/netx-duo/overview-netx-duo) for the high-level overview, and all documentation and APIs can be found in: [Azure RTOS NetX Duo documentation](https://learn.microsoft.com/azure/rtos/netx-duo/).

## Branches & Releases
Also there is dedicated [learning path of Azure RTOS NetX Duo](https://learn.microsoft.com/training/paths/azure-rtos-netx-duo/) for learning systematically.

The master branch has the most recent code with all new features and bug fixes. It does not represent the latest General Availability (GA) release of the library.
## Repository Structure and Usage

## Releases
### Directory layout

Each official release (preview or GA) will be tagged to mark the commit and push it into the Github releases tab, e.g. `v6.1-rel`.
.
├── addons # NetX Duo addon modules for protocols and connectivity
├── cmake # CMakeList files for building the project
├── common # Core NetX Duo files
├── crypto_libraries # NetX Crypto files
├── nx_secure # NetX Secure files
├── ports # Architecture and compiler specific files
├── samples # Sample codes
├── utility # Test cases and utilities (e.g. iperf)
├── LICENSE.txt # License terms
├── LICENSE-HARDWARE.txt # Licensed hardware from semiconductors
├── CONTRIBUTING.md # Contribution guidance
└── SECURITY.md # Microsoft repo security guidance

## Directory layout
### Branches & Releases

```
- addons
- auto_ip, BSD, azure_iot, dhcp, cloud, dns, ftp, http, mdns, mqtt, nat, pop3, ppp, pppoe, smtp, sntp, telnet, tftp, web
- cmake
- common
- inc
- src
- crypto_libraries
- inc
- src
- nx_secure
- inc
- src
- ports
- cortex_m0/gnu
- inc
- src
- cortex_m3/gnu
- inc
- src
- cortex_m4/gnu
- inc
- src
- cortex_m7/gnu
- inc
- src
- samples
```
The master branch has the most recent code with all new features and bug fixes. It does not represent the latest General Availability (GA) release of the library. Each official release (preview or GA) will be tagged to mark the commit and push it into the Github releases tab, e.g. `v6.2-rel`.

# Azure IoT
## Protocols and connectivity

NetX Duo includes [Azure IoT Middleware for Azure RTOS](https://github.com/azure-rtos/netxduo/tree/master/addons/azure_iot), a platform specific library that acts as a binding layer between the Azure RTOS and the [Azure SDK for Embedded C](https://github.com/Azure/azure-sdk-for-c/tree/master/sdk/docs/iot).
Protocols and connectivity support are provided as addon modules within NetX Duo in `addons` folder. Some key modules are: [**azure_iot**](https://github.com/azure-rtos/netxduo/tree/master/addons/azure_iot), [**dhcp**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-dhcp-client/chapter1), [**dns**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-dns/chapter1), [**ftp**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-dns/chapter1), [**http**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-http/chapter1), [**mqtt**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-mqtt/chapter1), [**pop3**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-pop3-client/chapter1), [**lwm2m**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-lwm2m/chapter1), [**ppp**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-ppp/chapter1), [**sntp**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-sntp-client/chapter1), and [**web**](https://learn.microsoft.com/azure/rtos/netx-duo/netx-duo-web-http/chapter1). For a full list of NetX Duo addons, you can find in the same [Azure RTOS NetX Duo documentation](https://learn.microsoft.com/azure/rtos/netx-duo/).

Additional APIs supporting Azure IoT Plug and Play can be found on the [feature/iot_pnp](https://github.com/azure-rtos/netxduo/tree/v6.1_beta.1) branch, with sample projects in the [Beta Release](https://github.com/azure-rtos/netxduo/releases/tag/v6.1_beta.1).
### Samples

# Security
We provide sample codes about how to use various addons in the [`samples`](./samples/) folder.

Azure RTOS provides OEMs with components to secure communication and to create code and data isolation using underlying
MCU/MPU hardware protection mechanisms. It is ultimately the responsibility of the device builder to ensure the device
fully meets the evolving security requirements associated with its specific use case.
### Azure IoT Middleware for Azure RTOS

## Azure Defender for IoT security module
[Azure IoT Middleware for Azure RTOS](https://github.com/azure-rtos/netxduo/tree/master/addons/azure_iot) (a.k.a IoT Middleware) is a platform specific library that acts as a binding layer between the Azure RTOS and the [Azure SDK for Embedded C](https://github.com/Azure/azure-sdk-for-c). It simplifies building device application that connects to Azure IoT services.

The Azure Defender for IoT security module provides a comprehensive security solution for Azure RTOS devices. Azure RTOS now ships with the Defender for IoT security module built-in and provides coverage for common threats and potential malicious activities. The security module is part of the Azure IoT Middleware for Azure RTOS (addons/azure_iot/). As the device connects to Azure IoT hub, Defender for IoT collectors gather network connectivity information and sends it to the Defender for IoT service for analysis. For details on how the security module works and the type of information it collects, refer to [Azure Defender for IoT security module](https://github.com/azure-rtos/netxduo/tree/v6.1_rel/addons/azure_iot/docs#azure-defender-for-iot-module) section in the Azure IoT document.
The IoT Middleware also includes built-in support for:

# Licensing
- **[Device Update for IoT Hub](https://learn.microsoft.com/azure/iot-hub-device-update/device-update-azure-real-time-operating-system)**: an Azure service for IoT devices to enable the over-the-air (OTA) updates easily.
- **[Microsoft Defender for IoT](https://learn.microsoft.com/azure/defender-for-iot/device-builders/iot-security-azure-rtos)**: an Azure service makes IoT devices visibility into security posture management and threat detection, and integrates with other Microsoft tools for unified security management.

License terms for using Azure RTOS are defined in the LICENSE.txt file of this repo. Please refer to this file for all
definitive licensing information. No additional license fees are required for deploying Azure RTOS on hardware defined
in the LICENSED-HARDWARE.txt file. If you are using hardware not defined in the LICENSED-HARDWARE.txt file or have
licensing questions in general, please contact Microsoft directly at https://azure-rtos.ms-iot-contact.com/
## Component dependencies

# Contribution, feedback, issues, and professional support
The main components of Azure RTOS are each provided in their own repository, but there are dependencies between them, as shown in the following graph. This is important to understand when setting up your builds.

If you encounter any bugs, have suggestions for new features, or if you would like to become an active contributor to
this project, please follow the instructions provided in the contribution guideline for the corresponding repo.
![dependency graph](docs/deps.png)

For basic support, click Issues in the command bar or post a question to [Stack Overflow](http://stackoverflow.com/questions/tagged/azure-rtos+threadx) using the `threadx` and `azure-rtos` tags.
> You will have to take the dependency graph above into account when building anything other than ThreadX itself.

Professional support plans (https://azure.microsoft.com/en-us/support/options/) are available from Microsoft.
### Building and using the library

# Additional Resources
Instruction for building the NetX Duo as static library using Arm GNU Toolchain and CMake. If you are using toolchain and IDE from semiconductor, you might follow its own instructions to use Azure RTOS components as explained in the [Getting Started](#getting-started) section.

The following are references to additional Azure RTOS and Azure IoT in general:
| | |
|---|---|
| Azure RTOS Website: | https://azure.microsoft.com/en-us/services/rtos/ |
| Azure RTOS Sales Questions: | https://azure-rtos.ms-iot-contact.com/ |
| Microsoft Q/A for Azure IoT: | https://docs.microsoft.com/en-us/answers/products/azure?product=iot |
| Internet of Things Show: | https://aka.ms/iotshow |
| IoT Tech Community: | https://aka.ms/iottechcommunity |
1. Install the following tools:

* [CMake](https://cmake.org/download/) version 3.0 or later
* [Arm GNU Toolchain for arm-none-eabi](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads)
* [Ninja](https://ninja-build.org/)

1. Build the [ThreadX library](https://github.com/azure-rtos/threadx#building-and-using-the-library) as the dependency.

1. Cloning the repo. NetX Duo has a couple of dependencies that are included as submodules.

```bash
$ git clone --recursive https://github.com/azure-rtos/netxduo.git
```

1. Define the features and addons you need in `nx_user.h` and build together with the component source code. You can refer to [`nx_user_sample.h`](https://github.com/azure-rtos/netxduo/blob/master/common/inc/nx_user_sample.h) as an example.

1. Building as a static library

Each component of Azure RTOS comes with a composable CMake-based build system that supports many different MCUs and host systems. Integrating any of these components into your device app code is as simple as adding a git submodule and then including it in your build using the CMake `add_subdirectory()`.

While the typical usage pattern is to include NetX Duo into your device code source tree to be built & linked with your code, you can compile this project as a standalone static library to confirm your build is set up correctly.

An example of building the library for Cortex-M4:

```bash
$ cmake -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=cmake/cortex_m4.cmake .

$ cmake --build ./build
```

## Professional support

[Professional support plans](https://azure.microsoft.com/support/options/) are available from Microsoft. For community support and others, see the [Resources](#resources) section below.

## Licensing

License terms for using Azure RTOS are defined in the LICENSE.txt file of this repo. Please refer to this file for all definitive licensing information. No additional license fees are required for deploying Azure RTOS on hardware defined in the [LICENSED-HARDWARE.txt](./LICENSED-HARDWARE.txt) file. If you are using hardware not listed in the file or having licensing questions in general, please contact Microsoft directly at https://aka.ms/azrtos-license.

## Resources

The following are references to additional Azure RTOS resources:

- **Product introduction and white papers**: https://azure.com/rtos
- **General technical questions**: https://aka.ms/QnA/azure-rtos
- **Product issues and bugs, or feature requests**: https://github.com/azure-rtos/netxduo/issues
- **Licensing and sales questions**: https://aka.ms/azrtos-license
- **Product roadmap and support policy**: https://aka.ms/azrtos/lts
- **Blogs and videos**: http://msiotblog.com and https://aka.ms/iotshow
- **Azure RTOS TraceX Installer**: https://aka.ms/azrtos-tracex-installer

You can also check [previous questions](https://stackoverflow.com/questions/tagged/azure-rtos+netxduo) or ask new ones on StackOverflow using the `azure-rtos` and `netxduo` tags.

## Security

Azure RTOS provides OEMs with components to secure communication and to create code and data isolation using underlying MCU/MPU hardware protection mechanisms. It is ultimately the responsibility of the device builder to ensure the device fully meets the evolving security requirements associated with its specific use case.

## Contribution

Please follow the instructions provided in the [CONTRIBUTING.md](./CONTRIBUTING.md) for the corresponding repository.
Loading