blob: cdce2538b010f0b90ea7b39ec8d0e447452762d7 [file] [log] [blame]
<!--
Documentation/_templates/layout.html
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership. The
ASF licenses this file to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
-->
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>xedge_demo a lightweight Lua-based web framework for building secure, real-time IoT applications &mdash; NuttX latest documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/sphinx_collapse.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css" />
<link rel="stylesheet" type="text/css" href="../../../_static/custom.css" />
<link rel="shortcut icon" href="../../../_static/favicon.ico"/>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script data-url_root="../../../" id="documentation_options" src="../../../_static/documentation_options.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/sphinx_highlight.js"></script>
<script src="../../../_static/clipboard.min.js"></script>
<script src="../../../_static/copybutton.js"></script>
<script src="../../../_static/design-tabs.js"></script>
<script src="../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../genindex.html" />
<link rel="search" title="Search" href="../../../search.html" />
<link rel="next" title="xmlrpc XML-RPC Server" href="../xmlrpc/index.html" />
<link rel="prev" title="xbc_test XBox Controller Example" href="../xbc_test/index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../../index.html" class="icon icon-home"> NuttX
</a>
<!-- this version selector is quite ugly, should be probably replaced by something
more modern -->
<div class="version-selector">
<select onchange="javascript:location.href = this.value;">
<option value="../../../../latest" selected="selected">latest</option>
<option value="../../../../10.0.0" >10.0.0</option>
<option value="../../../../10.0.1" >10.0.1</option>
<option value="../../../../10.1.0" >10.1.0</option>
<option value="../../../../10.2.0" >10.2.0</option>
<option value="../../../../10.3.0" >10.3.0</option>
<option value="../../../../11.0.0" >11.0.0</option>
<option value="../../../../12.0.0" >12.0.0</option>
<option value="../../../../12.1.0" >12.1.0</option>
<option value="../../../../12.2.0" >12.2.0</option>
<option value="../../../../12.2.1" >12.2.1</option>
<option value="../../../../12.3.0" >12.3.0</option>
<option value="../../../../12.4.0" >12.4.0</option>
<option value="../../../../12.5.0" >12.5.0</option>
<option value="../../../../12.5.1" >12.5.1</option>
<option value="../../../../12.6.0" >12.6.0</option>
<option value="../../../../12.7.0" >12.7.0</option>
<option value="../../../../12.8.0" >12.8.0</option>
<option value="../../../../12.9.0" >12.9.0</option>
<option value="../../../../12.10.0" >12.10.0</option>
<option value="../../../../12.11.0" >12.11.0</option>
</select>
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Table of Contents</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../index.html">Home</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../introduction/index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../quickstart/index.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../contributing/index.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../introduction/inviolables.html">The Inviolable Principles of NuttX</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../platforms/index.html">Supported Platforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../components/index.html">OS Components</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../index.html">Applications</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../audioutils/index.html">Audio Utility libraries</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../boot/index.html">Bootloader Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../benchmarks/index.html">Benchmark Applications</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../canutils/index.html">CAN Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../crypto/index.html">Cryptography Library Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../fsutils/index.html">File System Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../games/index.html">Games</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../graphics/index.html">Graphics Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../industry/index.html">Industrial Applications</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../inertial/index.html">Inertial Libraries Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../interpreters/index.html">Interpreters</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../logging/index.html">Logging Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../lte/index.html">LTE Libraries and NSH Add-Ons</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../math/index.html">Math Library Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../mlearing/index.html">Machine Learning Support</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../netutils/index.html">Network Utilities</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../nsh/index.html">NuttShell (NSH)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../sdr/index.html">Software Defined Radio Libraries</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../system/index.html">System Libraries and NSH Add-Ons</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../testing/index.html">Testing</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../tools/index.html">Host Side Tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../wireless/index.html">Wireless Libraries and NSH Add-Ons</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html">Examples</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="../index.html#selecting-examples">Selecting Examples</a></li>
<li class="toctree-l3"><a class="reference internal" href="../index.html#built-in-functions">Built-In Functions</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="../index.html#supported-examples">Supported examples</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="../abntcodi/index.html"><code class="docutils literal notranslate"><span class="pre">abntcodi</span></code> ABNT CODI example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../adc/index.html"><code class="docutils literal notranslate"><span class="pre">adc</span></code> Read from ADC</a></li>
<li class="toctree-l4"><a class="reference internal" href="../adjtime/index.html"><code class="docutils literal notranslate"><span class="pre">adjtime</span></code> Ajdtime function example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../adxl372_test/index.html"><code class="docutils literal notranslate"><span class="pre">adxl372_test</span></code> ADXL372 test program</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ajoystick/index.html"><code class="docutils literal notranslate"><span class="pre">ajoystick</span></code> Analog Joystick</a></li>
<li class="toctree-l4"><a class="reference internal" href="../alarm/index.html"><code class="docutils literal notranslate"><span class="pre">alarm</span></code> RTC Alarm</a></li>
<li class="toctree-l4"><a class="reference internal" href="../apa102/index.html"><code class="docutils literal notranslate"><span class="pre">apa102</span></code> Rainbow on <code class="docutils literal notranslate"><span class="pre">APA102</span></code> LED Strip</a></li>
<li class="toctree-l4"><a class="reference internal" href="../apds9960/index.html"><code class="docutils literal notranslate"><span class="pre">apds9960</span></code> APDS-9960 test application</a></li>
<li class="toctree-l4"><a class="reference internal" href="../audio_rttl/index.html"><code class="docutils literal notranslate"><span class="pre">audio_rttl</span></code> Audio tone generator</a></li>
<li class="toctree-l4"><a class="reference internal" href="../bastest/index.html"><code class="docutils literal notranslate"><span class="pre">bastest</span></code> Bas BASIC Interpreter</a></li>
<li class="toctree-l4"><a class="reference internal" href="../battery/index.html"><code class="docutils literal notranslate"><span class="pre">battery</span></code> Battery monitor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../bme680/index.html"><code class="docutils literal notranslate"><span class="pre">bme680</span></code> BME680 sensor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../bmi160/index.html"><code class="docutils literal notranslate"><span class="pre">bmi160</span></code> BMI160 sensor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../bmp180/index.html"><code class="docutils literal notranslate"><span class="pre">bmp180</span></code> BMP180 Barometer sensor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../bmp280/index.html"><code class="docutils literal notranslate"><span class="pre">bmp280</span></code> BMP280 Barometer sensor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../bridge/index.html"><code class="docutils literal notranslate"><span class="pre">bridge</span></code> Network Bridge</a></li>
<li class="toctree-l4"><a class="reference internal" href="../buttons/index.html"><code class="docutils literal notranslate"><span class="pre">buttons</span></code> Read GPIO Buttons</a></li>
<li class="toctree-l4"><a class="reference internal" href="../calib_udelay/index.html"><code class="docutils literal notranslate"><span class="pre">calib_udelay</span></code> Calibration tool for udelay</a></li>
<li class="toctree-l4"><a class="reference internal" href="../camera/index.html"><code class="docutils literal notranslate"><span class="pre">camera</span></code> Camera Snapshot</a></li>
<li class="toctree-l4"><a class="reference internal" href="../can/index.html"><code class="docutils literal notranslate"><span class="pre">can</span></code> CAN Device Test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../capture/index.html"><code class="docutils literal notranslate"><span class="pre">capture</span></code> PWM Capture example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cbortest/index.html"><code class="docutils literal notranslate"><span class="pre">cbortest</span></code> TinyCBOR Test Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cctype/index.html"><code class="docutils literal notranslate"><span class="pre">cctype</span></code> Verify C++ cctype operations</a></li>
<li class="toctree-l4"><a class="reference internal" href="../chat/index.html"><code class="docutils literal notranslate"><span class="pre">chat</span></code> AT over TTY</a></li>
<li class="toctree-l4"><a class="reference internal" href="../chrono/index.html"><code class="docutils literal notranslate"><span class="pre">chrono</span></code> Chronometer example to use with STM32LDiscover</a></li>
<li class="toctree-l4"><a class="reference internal" href="../configdata/index.html"><code class="docutils literal notranslate"><span class="pre">configdata</span></code> Config Data example / unit test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cordic/index.html"><code class="docutils literal notranslate"><span class="pre">cordic</span></code> CORDIC driver example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cpuhog/index.html"><code class="docutils literal notranslate"><span class="pre">cpuhog</span></code> Keep CPU Busy</a></li>
<li class="toctree-l4"><a class="reference internal" href="../cromfs/index.html"><code class="docutils literal notranslate"><span class="pre">cromfs</span></code> CROMFS Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../dac/index.html"><code class="docutils literal notranslate"><span class="pre">dac</span></code> Write to DAC</a></li>
<li class="toctree-l4"><a class="reference internal" href="../dhcpd/index.html"><code class="docutils literal notranslate"><span class="pre">dhcpd</span></code> DHCP Server</a></li>
<li class="toctree-l4"><a class="reference internal" href="../discover/index.html"><code class="docutils literal notranslate"><span class="pre">discover</span></code> UDP Discover Daemon</a></li>
<li class="toctree-l4"><a class="reference internal" href="../djoystick/index.html"><code class="docutils literal notranslate"><span class="pre">djoystick</span></code> Discrete Joystick</a></li>
<li class="toctree-l4"><a class="reference internal" href="../dronecan/index.html"><code class="docutils literal notranslate"><span class="pre">dronecan</span></code> DroneCAN example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../elf/index.html"><code class="docutils literal notranslate"><span class="pre">elf</span></code> ELF loader</a></li>
<li class="toctree-l4"><a class="reference internal" href="../embedlog/index.html"><code class="docutils literal notranslate"><span class="pre">embedlog</span></code> embedlog example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../esp32_himem/index.html"><code class="docutils literal notranslate"><span class="pre">esp32_himem</span></code> ESP32 HIMEM Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../etl/index.html"><code class="docutils literal notranslate"><span class="pre">etl</span></code> Embedded Template Library (ETL) C++ example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../fb/index.html"><code class="docutils literal notranslate"><span class="pre">fb</span></code> Framebuffer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../fboverlay/index.html"><code class="docutils literal notranslate"><span class="pre">fboverlay</span></code> Framebuffer overlay test tool</a></li>
<li class="toctree-l4"><a class="reference internal" href="../flash_test/index.html"><code class="docutils literal notranslate"><span class="pre">flash_test</span></code> SMART Flash test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../flowc/index.html"><code class="docutils literal notranslate"><span class="pre">flowc</span></code> Serial Hardware Flow Control</a></li>
<li class="toctree-l4"><a class="reference internal" href="../fmsynth/index.html"><code class="docutils literal notranslate"><span class="pre">fmsynth</span></code> FM Synthesizer examples</a></li>
<li class="toctree-l4"><a class="reference internal" href="../foc/index.html"><code class="docutils literal notranslate"><span class="pre">foc</span></code> FOC motor controller example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ft80x/index.html"><code class="docutils literal notranslate"><span class="pre">ft80x</span></code> FT80x GUI Chip</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ftpc/index.html"><code class="docutils literal notranslate"><span class="pre">ftpc</span></code> FTP Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ftpd/index.html"><code class="docutils literal notranslate"><span class="pre">ftpd</span></code> FTP daemon</a></li>
<li class="toctree-l4"><a class="reference internal" href="../fxos8700cq_test/index.html"><code class="docutils literal notranslate"><span class="pre">fxos8700cq_test</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../gpio/index.html"><code class="docutils literal notranslate"><span class="pre">gpio</span></code> GPIO Read and Write</a></li>
<li class="toctree-l4"><a class="reference internal" href="../gps/index.html"><code class="docutils literal notranslate"><span class="pre">gps</span></code> GPS example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../hall/index.html"><code class="docutils literal notranslate"><span class="pre">hall</span></code> Hall effect sensor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../hdc1008_demo/index.html"><code class="docutils literal notranslate"><span class="pre">hdc1008_demo</span></code> HDC1008 driver example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../hello/index.html"><code class="docutils literal notranslate"><span class="pre">hello</span></code> Hello World</a></li>
<li class="toctree-l4"><a class="reference internal" href="../hello_nim/index.html"><code class="docutils literal notranslate"><span class="pre">hello_nim</span></code> Hello World in Nim</a></li>
<li class="toctree-l4"><a class="reference internal" href="../hello_wasm/index.html"><code class="docutils literal notranslate"><span class="pre">hello_wasm</span></code> Hello World in WASM</a></li>
<li class="toctree-l4"><a class="reference internal" href="../hello_zig/index.html"><code class="docutils literal notranslate"><span class="pre">hello_zig</span></code> Hello World in Zig</a></li>
<li class="toctree-l4"><a class="reference internal" href="../helloxx/index.html"><code class="docutils literal notranslate"><span class="pre">helloxx</span></code> Hello World in C++</a></li>
<li class="toctree-l4"><a class="reference internal" href="../hidkbd/index.html"><code class="docutils literal notranslate"><span class="pre">hidkbd</span></code> USB Host HID keyboard</a></li>
<li class="toctree-l4"><a class="reference internal" href="../hts221_reader/index.html"><code class="docutils literal notranslate"><span class="pre">hts221_reader</span></code> <code class="docutils literal notranslate"><span class="pre">HTS221</span></code> Humidity Sensor</a></li>
<li class="toctree-l4"><a class="reference internal" href="../i2cchar/index.html"><code class="docutils literal notranslate"><span class="pre">i2cchar</span></code> Transfer Through I2C</a></li>
<li class="toctree-l4"><a class="reference internal" href="../i2sloop/index.html"><code class="docutils literal notranslate"><span class="pre">i2sloop</span></code> I2S loopback test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../igmp/index.html"><code class="docutils literal notranslate"><span class="pre">igmp</span></code> Trivial IGMP</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ina219/index.html"><code class="docutils literal notranslate"><span class="pre">ina219</span></code> Current/Power Monitor INA219</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ina226/index.html"><code class="docutils literal notranslate"><span class="pre">ina226</span></code> Current/Power Monitor INA226</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ini_dumper/index.html"><code class="docutils literal notranslate"><span class="pre">ini_dumper</span></code> ini dumper example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ipcfg/index.html"><code class="docutils literal notranslate"><span class="pre">ipcfg</span></code> IP Configuration file example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ipforward/index.html"><code class="docutils literal notranslate"><span class="pre">ipforward</span></code> IP Forwarding Using TUN</a></li>
<li class="toctree-l4"><a class="reference internal" href="../json/index.html"><code class="docutils literal notranslate"><span class="pre">json</span></code> cJSON</a></li>
<li class="toctree-l4"><a class="reference internal" href="../keyboard/index.html"><code class="docutils literal notranslate"><span class="pre">keyboard</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../leds/index.html"><code class="docutils literal notranslate"><span class="pre">leds</span></code> Toggle LEDs</a></li>
<li class="toctree-l4"><a class="reference internal" href="../leds_rust/index.html"><code class="docutils literal notranslate"><span class="pre">leds_rust</span></code> Toggle LEDs in Rust</a></li>
<li class="toctree-l4"><a class="reference internal" href="../leds_zig/index.html"><code class="docutils literal notranslate"><span class="pre">leds_zig</span></code> Toggle LEDs in Zig</a></li>
<li class="toctree-l4"><a class="reference internal" href="../libtest/index.html"><code class="docutils literal notranslate"><span class="pre">libtest</span></code> Static Library Test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../lis3dsh_reader/index.html"><code class="docutils literal notranslate"><span class="pre">lis3dsh_reader</span></code> <code class="docutils literal notranslate"><span class="pre">LIS3DSH</span></code> Accelerometer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../lp503x/index.html"><code class="docutils literal notranslate"><span class="pre">lp503x</span></code> LP503X PWM LED example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../lsm303_reader/index.html"><code class="docutils literal notranslate"><span class="pre">lsm303_reader</span></code> <code class="docutils literal notranslate"><span class="pre">LSM303</span></code> Accelerometer/Magnetometer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../lsm6dsl_reader/index.html"><code class="docutils literal notranslate"><span class="pre">lsm6dsl_reader</span></code> <code class="docutils literal notranslate"><span class="pre">LSM6DSL</span></code> Accelerometer/Gyroscope</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ltr308/index.html"><code class="docutils literal notranslate"><span class="pre">ltr308</span></code> LTR308 ambient light sensor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../lua_module/index.html"><code class="docutils literal notranslate"><span class="pre">lua_module</span></code> Hello World Lua module</a></li>
<li class="toctree-l4"><a class="reference internal" href="../lvgldemo/index.html"><code class="docutils literal notranslate"><span class="pre">lvgldemo</span></code> LVGL Demo</a></li>
<li class="toctree-l4"><a class="reference internal" href="../lvglterm/index.html"><code class="docutils literal notranslate"><span class="pre">lvglterm</span></code> LVGL Terminal for NuttShell (NSH)</a></li>
<li class="toctree-l4"><a class="reference internal" href="../max31855/index.html"><code class="docutils literal notranslate"><span class="pre">max31855</span></code> max31855 example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../mcuboot/index.html"><code class="docutils literal notranslate"><span class="pre">mcuboot</span></code> MCUboot examples</a></li>
<li class="toctree-l4"><a class="reference internal" href="../media/index.html"><code class="docutils literal notranslate"><span class="pre">media</span></code> Media test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../mld/index.html"><code class="docutils literal notranslate"><span class="pre">mld</span></code> MLD example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../mlx90614/index.html"><code class="docutils literal notranslate"><span class="pre">mlx90614</span></code> MLX90614 Test Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../mml_parser/index.html"><code class="docutils literal notranslate"><span class="pre">mml_parser</span></code> MML parser example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../modbus/index.html"><code class="docutils literal notranslate"><span class="pre">modbus</span></code> FreeModbus demo example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../modbusmaster/index.html"><code class="docutils literal notranslate"><span class="pre">modbusmaster</span></code> Modbus Master example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../module/index.html"><code class="docutils literal notranslate"><span class="pre">module</span></code> Loadable Module</a></li>
<li class="toctree-l4"><a class="reference internal" href="../mount/index.html"><code class="docutils literal notranslate"><span class="pre">mount</span></code> Mount Filesystem</a></li>
<li class="toctree-l4"><a class="reference internal" href="../mqttc/index.html"><code class="docutils literal notranslate"><span class="pre">mqttc</span></code> MQTT-C Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../mtdpart/index.html"><code class="docutils literal notranslate"><span class="pre">mtdpart</span></code> MTD Partition Test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../mtdrwb/index.html"><code class="docutils literal notranslate"><span class="pre">mtdrwb</span></code> MTD Read-ahead and Write Buffering</a></li>
<li class="toctree-l4"><a class="reference internal" href="../netlink_route/index.html"><code class="docutils literal notranslate"><span class="pre">netlink_route</span></code> Netlink NETLINK_ROUTE test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../netloop/index.html"><code class="docutils literal notranslate"><span class="pre">netloop</span></code> Network loopback device</a></li>
<li class="toctree-l4"><a class="reference internal" href="../netpkt/index.html"><code class="docutils literal notranslate"><span class="pre">netpkt</span></code> <code class="docutils literal notranslate"><span class="pre">AF_PACKET</span></code> Raw Sockets</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nettest/index.html"><code class="docutils literal notranslate"><span class="pre">nettest</span></code> Client/Server Over TCP</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nimble/index.html"><code class="docutils literal notranslate"><span class="pre">nimble</span></code> NimBLE example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nng_test/index.html"><code class="docutils literal notranslate"><span class="pre">nng_test</span></code> NNG pubsub program</a></li>
<li class="toctree-l4"><a class="reference internal" href="../noteprintf/index.html"><code class="docutils literal notranslate"><span class="pre">noteprintf</span></code> “Note printf!” example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nrf24l01_btle/index.html"><code class="docutils literal notranslate"><span class="pre">nrf24l01_btle</span></code> Emulates a nRF8001 temperature beacon with nRF24L01</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nrf24l01_term/index.html"><code class="docutils literal notranslate"><span class="pre">nrf24l01_term</span></code> NRF24L01 Wireless Connection</a></li>
<li class="toctree-l4"><a class="reference internal" href="../null/index.html"><code class="docutils literal notranslate"><span class="pre">null</span></code> NULL example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nunchuck/index.html"><code class="docutils literal notranslate"><span class="pre">nunchuck</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../nx/index.html"><code class="docutils literal notranslate"><span class="pre">nx</span></code> NX graphics example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nxdemo/index.html"><code class="docutils literal notranslate"><span class="pre">nxdemo</span></code> NX Demo “Graphic test” example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nxflat/index.html"><code class="docutils literal notranslate"><span class="pre">nxflat</span></code> NXFLAT Binary</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nxhello/index.html"><code class="docutils literal notranslate"><span class="pre">nxhello</span></code> NX graphics “Hello, World!” example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nximage/index.html"><code class="docutils literal notranslate"><span class="pre">nximage</span></code> Display NuttX Logo</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nxlines/index.html"><code class="docutils literal notranslate"><span class="pre">nxlines</span></code> NX Line Drawing</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nxscope/index.html"><code class="docutils literal notranslate"><span class="pre">nxscope</span></code> NxScope library example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nxterm/index.html"><code class="docutils literal notranslate"><span class="pre">nxterm</span></code> Display NuttShell (NSH) as NX Console</a></li>
<li class="toctree-l4"><a class="reference internal" href="../nxtext/index.html"><code class="docutils literal notranslate"><span class="pre">nxtext</span></code> Display NX Text</a></li>
<li class="toctree-l4"><a class="reference internal" href="../obd2/index.html"><code class="docutils literal notranslate"><span class="pre">obd2</span></code> OBD-II application example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../oneshot/index.html"><code class="docutils literal notranslate"><span class="pre">oneshot</span></code> Oneshot Timer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../opencyphal/index.html"><code class="docutils literal notranslate"><span class="pre">opencyphal</span></code> OpenCyphal Cyphal/CAN example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pca9635/index.html"><code class="docutils literal notranslate"><span class="pre">pca9635</span></code> <code class="docutils literal notranslate"><span class="pre">PCA9635PW</span></code> LED</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pdcurses/index.html"><code class="docutils literal notranslate"><span class="pre">pdcurses</span></code> pdcurses demos</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pf_ieee802154/index.html"><code class="docutils literal notranslate"><span class="pre">pf_ieee802154</span></code> PF_IEEE802154 example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pipe/index.html"><code class="docutils literal notranslate"><span class="pre">pipe</span></code> Pipe example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../poll/index.html"><code class="docutils literal notranslate"><span class="pre">poll</span></code> Poll example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../popen/index.html"><code class="docutils literal notranslate"><span class="pre">popen</span></code> popen() example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../posix_spawn/index.html"><code class="docutils literal notranslate"><span class="pre">posix_spawn</span></code> posix_spawn Unit Test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../powerled/index.html"><code class="docutils literal notranslate"><span class="pre">powerled</span></code> Powerled driver example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../powermonitor/index.html"><code class="docutils literal notranslate"><span class="pre">powermonitor</span></code> LTC4151 powermonitor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pppd/index.html"><code class="docutils literal notranslate"><span class="pre">pppd</span></code> pppd client example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pty_test/index.html"><code class="docutils literal notranslate"><span class="pre">pty_test</span></code> Pseudo-Terminals</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pwfb/index.html"><code class="docutils literal notranslate"><span class="pre">pwfb</span></code> NX Per-Window Framebuffer Text Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pwlines/index.html"><code class="docutils literal notranslate"><span class="pre">pwlines</span></code> NX Per-Window Framebuffer Graphics Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../pwm/index.html"><code class="docutils literal notranslate"><span class="pre">pwm</span></code> General PWM Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../qencoder/index.html"><code class="docutils literal notranslate"><span class="pre">qencoder</span></code> Quadrature Encoder</a></li>
<li class="toctree-l4"><a class="reference internal" href="../random/index.html"><code class="docutils literal notranslate"><span class="pre">random</span></code> Random Numbers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../relays/index.html"><code class="docutils literal notranslate"><span class="pre">relays</span></code> Relays</a></li>
<li class="toctree-l4"><a class="reference internal" href="../rfid_readuid/index.html"><code class="docutils literal notranslate"><span class="pre">rfid_readuid</span></code> RFID example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../rgbled/index.html"><code class="docutils literal notranslate"><span class="pre">rgbled</span></code> RGB LED Using PWM</a></li>
<li class="toctree-l4"><a class="reference internal" href="../romfs/index.html"><code class="docutils literal notranslate"><span class="pre">romfs</span></code> File System</a></li>
<li class="toctree-l4"><a class="reference internal" href="../rpmsgsocket/index.html"><code class="docutils literal notranslate"><span class="pre">rpmsgsocket</span></code> Rpmsg socket example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../rust/index.html">Rust Examples</a></li>
<li class="toctree-l4"><a class="reference internal" href="../sendmail/index.html"><code class="docutils literal notranslate"><span class="pre">sendmail</span></code> SMTP Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../serialblaster/index.html"><code class="docutils literal notranslate"><span class="pre">serialblaster</span></code> Serial Blaster example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../serialrx/index.html"><code class="docutils literal notranslate"><span class="pre">serialrx</span></code> Serial RX example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../serloop/index.html"><code class="docutils literal notranslate"><span class="pre">serloop</span></code> Serial Loopback</a></li>
<li class="toctree-l4"><a class="reference internal" href="../shm_test/index.html"><code class="docutils literal notranslate"><span class="pre">shm_test</span></code> SHM example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../sht3x/index.html"><code class="docutils literal notranslate"><span class="pre">sht3x</span></code> SHT3x sensor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../slcd/index.html"><code class="docutils literal notranslate"><span class="pre">slcd</span></code> Alphanumeric Segment LCD</a></li>
<li class="toctree-l4"><a class="reference internal" href="../smps/index.html"><code class="docutils literal notranslate"><span class="pre">smps</span></code> Switched-Mode Power Supply</a></li>
<li class="toctree-l4"><a class="reference internal" href="../sotest/index.html"><code class="docutils literal notranslate"><span class="pre">sotest</span></code> Shared Library Module Test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../spislv_test/index.html"><code class="docutils literal notranslate"><span class="pre">spislv</span></code> SPI slave example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../stat/index.html"><code class="docutils literal notranslate"><span class="pre">stat</span></code> Test of stat(), fstat(), and statfs()</a></li>
<li class="toctree-l4"><a class="reference internal" href="../sx127x_demo/index.html"><code class="docutils literal notranslate"><span class="pre">sx127x_demo</span></code> SX127X Radio</a></li>
<li class="toctree-l4"><a class="reference internal" href="../system/index.html"><code class="docutils literal notranslate"><span class="pre">system</span></code> System() example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../tcp_ipc_client/index.html"><code class="docutils literal notranslate"><span class="pre">tcp_ipc_client</span></code> Client for TCP IPC NuttX</a></li>
<li class="toctree-l4"><a class="reference internal" href="../tcp_ipc_server/index.html"><code class="docutils literal notranslate"><span class="pre">tcp_ipc_server</span></code> Server for TCP IPC NuttX</a></li>
<li class="toctree-l4"><a class="reference internal" href="../tcpblaster/index.html"><code class="docutils literal notranslate"><span class="pre">tcpblaster</span></code> TCP Performance Test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../tcpecho/index.html"><code class="docutils literal notranslate"><span class="pre">tcpecho</span></code> TCP Echo Server</a></li>
<li class="toctree-l4"><a class="reference internal" href="../telnetd/index.html"><code class="docutils literal notranslate"><span class="pre">telnetd</span></code> Simple Telnet Shell</a></li>
<li class="toctree-l4"><a class="reference internal" href="../termios/index.html"><code class="docutils literal notranslate"><span class="pre">termios</span></code> Simple Termios interface test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../thttpd/index.html"><code class="docutils literal notranslate"><span class="pre">thttpd</span></code> THTTPD server</a></li>
<li class="toctree-l4"><a class="reference internal" href="../tiff/index.html"><code class="docutils literal notranslate"><span class="pre">tiff</span></code> TIFF file generation example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../timer/index.html"><code class="docutils literal notranslate"><span class="pre">timer</span></code> Timer example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../timer_gpio/index.html"><code class="docutils literal notranslate"><span class="pre">timer_gpio</span></code> Timer GPIO example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../touchscreen/index.html"><code class="docutils literal notranslate"><span class="pre">touchscreen</span></code> Touchscreen Events</a></li>
<li class="toctree-l4"><a class="reference internal" href="../udgram/index.html"><code class="docutils literal notranslate"><span class="pre">udgram</span></code> Unix domain datagram example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../udp/index.html"><code class="docutils literal notranslate"><span class="pre">udp</span></code> Client/Server Over UDP</a></li>
<li class="toctree-l4"><a class="reference internal" href="../udpblaster/index.html"><code class="docutils literal notranslate"><span class="pre">udpblaster</span></code> UDP blaster example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../uid/index.html"><code class="docutils literal notranslate"><span class="pre">uid</span></code> UID/GID example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../unionfs/index.html"><code class="docutils literal notranslate"><span class="pre">unionfs</span></code> Union File System</a></li>
<li class="toctree-l4"><a class="reference internal" href="../usbserial/index.html"><code class="docutils literal notranslate"><span class="pre">usbserial</span></code> USB Serial Hello World</a></li>
<li class="toctree-l4"><a class="reference internal" href="../userfs/index.html"><code class="docutils literal notranslate"><span class="pre">userfs</span></code> UserFS File System</a></li>
<li class="toctree-l4"><a class="reference internal" href="../usrsocktest/index.html"><code class="docutils literal notranslate"><span class="pre">usrsocktest</span></code> USRSOCK test example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ustream/index.html"><code class="docutils literal notranslate"><span class="pre">ustream</span></code> Unix Stream Sockets</a></li>
<li class="toctree-l4"><a class="reference internal" href="../veml6070/index.html"><code class="docutils literal notranslate"><span class="pre">veml6070</span></code> VEML6070 UltraViolet sensor example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../watchdog/index.html"><code class="docutils literal notranslate"><span class="pre">watchdog</span></code> Watchdog Timer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../watcher/index.html"><code class="docutils literal notranslate"><span class="pre">watcher</span></code> Watcher &amp; Watched</a></li>
<li class="toctree-l4"><a class="reference internal" href="../webserver/index.html"><code class="docutils literal notranslate"><span class="pre">webserver</span></code> Simple Webserver</a></li>
<li class="toctree-l4"><a class="reference internal" href="../wget/index.html"><code class="docutils literal notranslate"><span class="pre">wget</span></code> Web Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../wgetjson/index.html"><code class="docutils literal notranslate"><span class="pre">wgetjson</span></code> GET JSON Using <code class="docutils literal notranslate"><span class="pre">wget</span></code></a></li>
<li class="toctree-l4"><a class="reference internal" href="../wiegand/index.html"><code class="docutils literal notranslate"><span class="pre">wiegand</span></code> Wiegand example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ws2812/index.html"><code class="docutils literal notranslate"><span class="pre">ws2812</span></code> ws2812 Demo</a></li>
<li class="toctree-l4"><a class="reference internal" href="../ws2812esp32rmt/index.html"><code class="docutils literal notranslate"><span class="pre">ws2812esp32rmt</span></code> ws2812 Demo using ESP32_RMT</a></li>
<li class="toctree-l4"><a class="reference internal" href="../xbc_test/index.html"><code class="docutils literal notranslate"><span class="pre">xbc_test</span></code> XBox Controller Example</a></li>
<li class="toctree-l4 current"><a class="current reference internal" href="#"><code class="docutils literal notranslate"><span class="pre">xedge_demo</span></code> a lightweight Lua-based web framework for building secure, real-time IoT applications</a><ul>
<li class="toctree-l5"><a class="reference internal" href="#why-use-lua-and-xedge-in-embedded-systems">Why Use Lua and Xedge in Embedded Systems</a></li>
<li class="toctree-l5"><a class="reference internal" href="#getting-started">Getting Started</a></li>
<li class="toctree-l5"><a class="reference internal" href="#setting-up-the-filesystem-mount-point">Setting up the filesystem mount point</a></li>
<li class="toctree-l5"><a class="reference internal" href="#running-xedge">Running Xedge</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="#further-reading">Further Reading</a></li>
<li class="toctree-l4"><a class="reference internal" href="../xmlrpc/index.html"><code class="docutils literal notranslate"><span class="pre">xmlrpc</span></code> XML-RPC Server</a></li>
<li class="toctree-l4"><a class="reference internal" href="../zerocross/index.html"><code class="docutils literal notranslate"><span class="pre">zerocross</span></code> Zero Crossing Device</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../implementation/index.html">Implementation Details</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../reference/index.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../faq/index.html">FAQ</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../debugging/index.html">Debugging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../guides/index.html">Guides</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../standards/index.html">Standards</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary.html">Glossary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../logos/index.html">NuttX Logos</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../_tags/tagsindex.html">Tags</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../../index.html">NuttX</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="../../index.html">Applications</a></li>
<li class="breadcrumb-item"><a href="../index.html">Examples</a></li>
<li class="breadcrumb-item active"><code class="docutils literal notranslate"><span class="pre">xedge_demo</span></code> a lightweight Lua-based web framework for building secure, real-time IoT applications</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/apache/nuttx/blob/master/Documentation/applications/examples/xedge_demo/index.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="xedge-demo-a-lightweight-lua-based-web-framework-for-building-secure-real-time-iot-applications">
<h1><code class="docutils literal notranslate"><span class="pre">xedge_demo</span></code> a lightweight Lua-based web framework for building secure, real-time IoT applications<a class="headerlink" href="#xedge-demo-a-lightweight-lua-based-web-framework-for-building-secure-real-time-iot-applications" title="Permalink to this heading"></a></h1>
<p><a class="reference external" href="https://realtimelogic.com/products/xedge/">Xedge</a> is a robust IoT and web framework that is designed for microcontrollers. It is based on the industrial-grade Barracuda Application Server, designed for seamless OEM integration. Xedge accelerates embedded firmware development by providing a flexible, Lua-based environment and a full stack of industrial-strength protocols, including:</p>
<ul class="simple">
<li><p>OPC UA</p></li>
<li><p>Modbus</p></li>
<li><p>MQTT</p></li>
<li><p>SMQ</p></li>
<li><p>WebSockets</p></li>
<li><p>HTTP/HTTPS</p></li>
</ul>
<p>This Xedge port for NuttX comes pre-configured and requires:</p>
<ul class="simple">
<li><p>TCP/IP v4 and v6 support</p></li>
<li><p>File System support</p></li>
<li><p>2 MB RAM allocated statically in <code class="docutils literal notranslate"><span class="pre">xedge_demo/xedge_main.c</span></code></p></li>
<li><p>QEMU</p></li>
<li><p>Toolchain aarch64-none-elf (gcc-arm-11.2-2022.02 or higher)</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>These instructions set up Xedge in <strong>development mode</strong>. Xedge supports many configuration options that differ between development and production builds. For production settings and optimization, refer to the general Xedge build instructions (details below).</p>
</div>
<section id="why-use-lua-and-xedge-in-embedded-systems">
<h2>Why Use Lua and Xedge in Embedded Systems<a class="headerlink" href="#why-use-lua-and-xedge-in-embedded-systems" title="Permalink to this heading"></a></h2>
<p>Great Lua developers don’t treat it as a “better C”; they treat it as a complement. Lua is an extension language, which means it’s designed to work alongside C, not replace it. Smart embedded programmers use C for performance-critical, low-level code and Lua for high-level business logic, such as processing sensor data and managing secure cloud connectivity.</p>
<p>Writing embedded business logic purely in C often means hundreds of lines of boilerplate code to manage memory, handle complex APIs, and handle errors. Lua, especially when paired with a framework like Xedge, lifts that burden. It provides high-level libraries and modules out of the box for protocols, networking, file systems, and more.</p>
<p>This shift doesn’t just make development easier; it makes it faster. What used to take weeks in C can now be done in days. Lua’s simplicity encourages rapid prototyping and quick iteration, which is essential in modern IoT and embedded development, where both time-to-market and security are critical. For a conceptual overview of why this hybrid development model is so powerful, check out the tutorial <a class="reference external" href="https://realtimelogic.com/articles/Using-Lua-for-Embedded-Development-vs-Traditional-C-Code">Why Smart C Coders Love Lua</a>.</p>
</section>
<section id="getting-started">
<h2>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this heading"></a></h2>
<p>To compile Xedge for NuttX, follow these steps:</p>
<p><strong>1. Configure NuttX for Xedge.</strong></p>
<p>For this example, we’re using <strong>QEMU</strong> and <strong>aarch64-none-elf-gcc</strong> with the <strong>qemu-armv8a</strong> board. You can use any NuttX-supported board,
but Xedge requires boards with external RAM since it defines a 2MB static array in xedge_main.c. We recommend at least 2MB RAM for stable performance.</p>
<p>To install and configure <strong>QEMU</strong> and <strong>aarch64-none-elf-gcc</strong>, follow the instructions in the <a class="reference external" href="https://nuttx.apache.org/docs/latest/quickstart/quickstart.html">NuttX Getting Started Guide</a>.</p>
<p><strong>2. Build NuttX.</strong></p>
<blockquote>
<div><p>Run xedge example with qemu-armv8a board</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ ./tools/configure.sh qemu-armv8a:xedge_demo
$ make
</pre></div>
</div>
<dl class="simple">
<dt>Running with QEMU::</dt><dd><p>$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -chardev stdio,id=con,mux=on -serial chardev:con -netdev user,id=u1,hostfwd=tcp:127.0.0.1:8080-10.0.2.15:80,hostfwd=tcp:127.0.0.1:8443-10.0.2.15:443,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23 -device virtio-net-device,netdev=u1 -fsdev local,security_model=none,id=fsdev0,path=/mnt/xxx -device virtio-9p-device,id=fs0,fsdev=fsdev0,mount_tag=host -mon chardev=con,mode=readline -kernel ./nuttx</p>
</dd>
</dl>
</div></blockquote>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Replace <strong>/mnt/xxx</strong> with your actual host directory path. This directory will be shared between your host system and the NuttX environment.</p>
</div>
</section>
<section id="setting-up-the-filesystem-mount-point">
<h2>Setting up the filesystem mount point<a class="headerlink" href="#setting-up-the-filesystem-mount-point" title="Permalink to this heading"></a></h2>
<p>Before running Xedge, you need to create and mount a filesystem that Xedge will use for storing configuration files and web content:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>nsh&gt; mkdir mnt
nsh&gt; mount -t v9fs -o trans=virtio,tag=host mnt
nsh&gt; mkdir /mnt/lfs
</pre></div>
</div>
</section>
<section id="running-xedge">
<h2>Running Xedge<a class="headerlink" href="#running-xedge" title="Permalink to this heading"></a></h2>
<p>Running Xedge in NuttX terminal:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>nsh&gt; xedge_demo
[ 18.490000] [CPU0] Xedge: Server listening on IPv4 port 80
[ 18.500000] [CPU0] Xedge: SharkSSL server listening on IPv4 port 443
[ 18.510000] [CPU0] Xedge: Configuration file: /mnt/lfs/xcfg.bin: enoent
[ 38.240000] [CPU1] 10.0.2.2 GET &quot;rtl/&quot;
[ 38.240000] [CPU1] Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138
[ 38.240000] [CPU1] .0.0.0 Safari/537.36
[ 38.240000] [CPU1] Host: 127.0.0.1:8080
[ 38.240000] [CPU1] Connection: keep-alive
[ 38.240000] [CPU1] sec-ch-ua: &quot;Not)A;Brand&quot;;v=&quot;8&quot;, &quot;Chromium&quot;;v=&quot;138&quot;, &quot;Google Chrome&quot;;v=&quot;138&quot;
[ 38.240000] [CPU1] sec-ch-ua-mobile: ?0
[ 38.240000] [CPU1] sec-ch-ua-platform: &quot;Linux&quot;
[ 38.240000] [CPU1] Upgrade-Insecure-Requests: 1
[ 38.240000] [CPU1] User-Agent: c
[ 38.240000] [CPU1] Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138
[ 38.240000] [CPU1] .0.0.0 Safari/537.36
[ 38.240000] [CPU1] Sec-Purpose: prefetch;prerender
[ 38.240000] [CPU1] Purpose: prefetch
[ 38.240000] [CPU1] Accept:
[ 38.240000] [CPU1] text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image
[ 38.240000] [CPU1] /apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
[ 38.240000] [CPU1] Sec-Fetch-Site: none
[ 38.240000] [CPU1] Sec-Fetch-Mode: navigate
[ 38.240000] [CPU1] Sec-Fetch-User: ?1
[ 38.240000] [CPU1] Sec-Fetch-Dest: document
[ 38.240000] [CPU1] Accept-Encoding: gzip, deflate, br, zstd
[ 38.240000] [CPU1] Accept-Language: pt,en-US;q=0.9,en;q=0.8
[ 38.240000] [CPU1]
[ 38.240000] [CPU0] 10.0.2.2 Response:
,
[ 38.240000] [CPU0] no-store, no-cache, must-revalidate, max-age=0
Transfer-Encoding: chunked
Keep-
[ 38.240000] [CPU0] Alive: Keep-Alive
</pre></div>
</div>
<p>Launch your web browser and access 127.0.0.1:8080</p>
<p>You should see the Xedge IDE, which is enabled in developer mode:</p>
<figure class="align-center">
<img alt="../../../_images/xedge_example.png" src="../../../_images/xedge_example.png" />
</figure>
</section>
</section>
<section id="further-reading">
<h1>Further Reading<a class="headerlink" href="#further-reading" title="Permalink to this heading"></a></h1>
<p>To learn more about Xedge and how to work with it effectively, see the following resources:</p>
<ul>
<li><p><strong>Using Xedge in Developer Mode:</strong>
Learn how to configure and work with Xedge during development, including dynamic Lua scripting, file system layout, and runtime behavior.</p>
<p><a class="reference external" href="https://realtimelogic.com/ba/doc/en/Xedge.html">How to use Xedge when in developer mode</a></p>
</li>
<li><p><strong>Building Xedge for Developer or Production Mode:</strong>
Understand the differences between development and production builds, and follow detailed instructions for compiling Xedge appropriately for your target environment.</p>
<p><a class="reference external" href="https://realtimelogic.com/ba/examples/xedge/readme.html">How to compile Xedge for developer or production mode</a></p>
</li>
</ul>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../xbc_test/index.html" class="btn btn-neutral float-left" title="xbc_test XBox Controller Example" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../xmlrpc/index.html" class="btn btn-neutral float-right" title="xmlrpc XML-RPC Server" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2023, The Apache Software Foundation.</p>
</div>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>