This example shows how to build HTTP server using Mongoose library and run it on NXP MIMXRT1020 development board with AzureRTOS. The source code for this tutorial is located at https://github.com/mongoose-examples/nxp-mimxrt1020-azurertos
In general, the most of the example is regular MCUXpresso IDE project. Mongoose related files are
Board network (e.g. IP address) configuration can be found in
First of all, set IP address, network mask and gateway suitable for your network in
source/web_server.h file. Default address is
Build the sample and run it on development board (see build and run options in Building sample section).
After initialization application starts mongoose events loop and blinks LED. Once LED started to blink - web server is ready. Open your web browser and navigate to board IP address, you should see "Hello, world" page (see below).
There are (at least) two options to build the sample:
- Make command
- Using MCUXpresso IDE software
Option 1 - make
make is pretty straightforward for whose, who familiar with this command.
- Open terminal
- Navigate to project folder
- Make sure to have docker installed on your system
- Firmware file is
firmware.binif you prefer binary format), use any suitable utility to program the board
- Done! See LEDs status to understand application status and once it starts to blink оpen your web browser and navigate to board IP address, you should see "Hello, world" page.
Option 2 - MCUXpresso IDE
MCUXpresso IDE is a standard software, provided by NXP Semiconductors. To build this sample with MCUXpresso IDE you need to do the following steps:
- Start MCUXpresso IDE
File -> Open Projects from file system
- Choose directory where example is located, make sure
MIMXRT1020-azureproject is checked, and then press
- Check if you have required SDK installed, if not
- 1 Press
Install New Plugin SDKs
- 2 In board list choose
- 3 Once wizard is complete, you should see installed SDK
Debug as -> MCUXpresso IDE LinkServer (inc. CMSIS-DAP) probesNOTE: you may prefer to debug using other interfaces, but this sample is configured to print output information in semi-host mode.
- During the process you will be asked what board to use, choose correct one
- After successful building and flashing program will pause in the beginning of
- Go to
Terminaltab and open terminal settings.
- Configure terminal as shown on picture below
- Resume program
- Done! LED should start to blink and you should see Mongoose output in terminal windows
- Open your web browser and navigate to board IP address, you should see "Hello, world" page.