-DMG_ENABLE_TCPIP=1 - enables the built-in TCP/IP stack. -DMG_ENABLE_CUSTOM_RANDOM=1 - lets the firmware code override mg_random() to use the device hardware RNG.-DMG_ENABLE_CUSTOM_MILLIS=1 - lets the firmware code override mg_millis().-DMG_ARCH=MG_ARCH_NEWLIB - configures Mongoose to work with the Newlib runtime library.You should see a login screen as in the image aboveįrom here on, if you want to try the dashboard features please go to the device dashboard tutorial and follow some of the steps depicted there. Now start a browser on where IP_ADDRESS is the board's IP address printed on the serial console. To connect to the board, in this example we'll be using picocom we configure it for 115200bps. If we used DHCP, as it is the default, we can check our DHCP server logs or see the device logs. We now need to know the IP address of the board to connect to it. When the firmware is flashed, the board should signal its state by blinking the blue LED. In order to flash this recently built firmware to your board, plug it in a USB port and execute: make flashĪs long as there is only one board plugged in, stlink will find it though we need to know the serial port device to be able to get the log information. The project directory for each board is listed in the table above git clone Ĭd mongoose/examples/stm32/nucleo-f746zg-make-baremetal-builtin Start a terminal in the project directory clone the Mongoose Library repo, and run the make build command. Open your web browser and navigate to the board IP address, you should see a nice device dashboardįollow the Build Tools tutorial to setup your development environment.Once the blue LED starts blinking, the example is ready.After initialization, the application starts Mongoose's event loop and blinks a blue LED.Build the example (see below) and run it on a development board.If you want to set a static configuration, set IP address, network mask and gateway in main.c see below The board IP addressing will be provided by a DHCP server.startup_stm32f746xx.s - part of STM32 CMSIS, used for startup code and IRQ vector table.packed_fs.c - part of device dashboard example, embeds the Web UI used by the dashboard.net.c, net.h - part of the device dashboard example, contains the Web functionality.mongoose.c, mongoose.h - Mongoose Library.Makefile - a GNU Makefile for building, flashing and testing the project.link.ld - a GNU linker script file, used for building the firmware binary.syscalls.c - provides low level functions expected by the ARM GCC C library.sysinit.c - provides the SystemInit() function with system clock setup, SysTick setup, etc.hal.h - provides a simple API on top of the CMSIS API, like gpio_write(), uart_init(), etc.main.c - provides the main() entry point with hardware init, LED blinking and network init.This example is a plain GCC make-based project with the following files: Though we specifically link to the files for a NUCLEO-F746ZG implementation, most references in this tutorial are valid for any supported board:Įxamples/stm32/nucleo-f429zi-make-baremetal-builtinĮxamples/stm32/nucleo-f746zg-make-baremetal-builtinĮxamples/stm32/nucleo-h563zi-make-baremetal-builtinĮxamples/stm32/nucleo-h723zg-make-baremetal-builtinĮxamples/stm32/nucleo-h743zi-make-baremetal-builtinĮxamples/stm32/stm32h573i-dk-make-baremetal-builtin Here, we concentrate on the features specific to this embedded platform. Take your time to navigate and study the Device Dashboard tutorial. That means: all functionality related to networking can be developed and debugged on a workstation, and then run as-is on an embedded device - and this example is a demonstration of that. Mongoose Library, being cross-platform, allows to develop and run the same code on different platforms. This example is a hardware adaptation of the Device Dashboard that can run on Mac/Linux/Windows. The web UI is fully embedded into the firmware binary, and does not need a filesystem to serve it, making it resilient.Logged users can view/change device settings.The web UI is optimised for size and for TLS usage.User Authentication: login protection with multiple permission levels.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |