{"id":28459752,"url":"https://github.com/cesanta/keil-stm32-webui","last_synced_at":"2026-01-28T21:35:33.259Z","repository":{"id":226900494,"uuid":"760509428","full_name":"cesanta/keil-stm32-webui","owner":"cesanta","description":"Step-by-step guide on building Web UI Dashboard on STM32 Nucleo-F756ZG development board","archived":false,"fork":false,"pushed_at":"2024-03-11T07:06:56.000Z","size":5,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-02T12:48:14.045Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cesanta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-20T14:53:27.000Z","updated_at":"2025-03-26T05:14:10.000Z","dependencies_parsed_at":"2024-03-10T14:00:04.270Z","dependency_job_id":null,"html_url":"https://github.com/cesanta/keil-stm32-webui","commit_stats":null,"previous_names":["cesanta/keil-stm32-webui"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cesanta/keil-stm32-webui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesanta%2Fkeil-stm32-webui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesanta%2Fkeil-stm32-webui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesanta%2Fkeil-stm32-webui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesanta%2Fkeil-stm32-webui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cesanta","download_url":"https://codeload.github.com/cesanta/keil-stm32-webui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cesanta%2Fkeil-stm32-webui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28853044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-07T01:06:05.320Z","updated_at":"2026-01-28T21:35:33.253Z","avatar_url":"https://github.com/cesanta.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Building Web UI Dashboard on STM32 Nucleo-F756ZG\n\nThis guide is a step-by-step tutorial on how to build Web UI dashboard\non STM32 Nucleo-F756ZG development board using Keil IDE. Prerequisites:\n- Hardware: Nucleo-F756ZG, connected to the workstation and to Ethernet\n- Software: Keil uVision\n\n## General plan\n\nThe first step is to create a minimal firmware that:\n- initialises system clock to the maximum frequency\n- intialises debug UART and redirects `printf()` to the debug UART\n- outputs some debug message periodically\n\nAfter that minimal firmware is created, we'll add a minimal web server on top\nof it, and then enhance that minimal web server to a fully functional Web\nDevice Dashboard.\n\n## Minimal app\n\n**Step 1. Install necessary packs.** Start Keil, click on \"Pack Installer\"\nto start an installer. There in the search input, type \"stm32f7\", then click\non \"STM32F7 Series\". On the right side of the window, you should see\n\"Device Specific / Keil::STM32F7xx_DFP\" pack, click on \"Install\" if it is not\nyet installed. When installed, install \"Generic / Cesanta::Mongoose\" pack  \n\n**Step 2. Start a new project.** Create a new project. In the Search filter,\ntype \"stm32f756zg\", select first device. In the RTE window, check\n\"Device/Startup\", click on \"Resolve\", click OK.\n\n**Step 3. Create main.c.** Right click on \"Source group 1\", \"Add new file\",\n\"C file\", type \"main\", click \"Add\". Copy/paste the following content, then save:\n```c\nint main(void) {\n  return 0;\n}\n```\n\n**Step 4. Update settings.** Click on \"Options for target\" in the toolbar,\n- On the \"Device Target\", check \"Use multilib\"\n- On the \"User\" tab, uncheck \"Beep when complete\"\n- On the C/C++ tab, select Warnings / MISRA compatible\n- On the Debug tab, select Use / ST-Link debugger\n- Click on debugger \"Settings\", \"Flash Download\" tab, check \"Reset and Run\"\n\n**Step 5. Build project.** Click on \"Built\" toolbar button. The project should\nbe built with zero errors and warnings.\n\n**Step 6. Configure the board.** Instead of using CubeMX to configure clock,\nUART and LED, we'll copy a small HAL header and use it to achieve the same\nin a much quicker way.\n- Open [hal.h](https://mongoose.ws/demo/?board=Nucleo-F756ZG\u0026project=mqtt\u0026file=hal.h)\ncopy file contents to the clipboard.\n- Right click on \"Source Group1\", choose \"Add new file\", name it \"hal.h\",\n  paste the contents, save\n- Do the same with hal.c - copy it into the project\n- Update main.c code with the following:\n\n```c\n#include \"hal.h\"\n\nextern uint64_t mg_millis(void);\n\nint main(void) {\n  hal_init();\n\n  uint64_t timer = 0;\n  for (;;) {\n    if (timer \u003c mg_millis()) {\n      timer += 500;\n      gpio_toggle(LED1);\n      printf(\"hi! tick is %lu\\r\\n\", (unsigned long) mg_millis());\n    }\n  }\n\nreturn 0;\n}\n```\n- Click on \"Load\" toolbar button to flash this firmware\n- The green LED should start blinking\n- Open device manager, look up what COM port device corresponds to your board\n- Start putty, and open a serial port with baud 115200\n- You should see messages like this:\n  ```\n  hi! tick is 1559001\n  hi! tick is 1559501\n  hi! tick is 1560001\n  ```\n- Congratulations! We have minimal skeleton firmware working\n\n## Integrate Mongoose Library\n\n\n**Step 1. Enable Mongoose Library.** Click on \"Manage Run-Time Environment\",\nand enable \"Network Library\" / \"Mongoose\"  \n\n**Step 2. Configure Mongoose Library.** In the project view, click on\n\"Network Library\" / `mongoose_custom.h`. Click on the \"Configuration Wizard\"\ntab and make sure the following options are set:\n- Build environment - Keil MDK\n- Built-in TCP/IP stack - enabled\n- Enable STM32Fxx driver - enabled\n- TLS support - none\n- Enable custom `mg_millis()` - enabled\n- Enable custom `mg_random()` - enabled\n- Enable packed filesystem - disabled\n\nAdd this snippet to generate stable (not random) MAC address\n```c\n#include \u003cstm32f756xx.h\u003e\n#define MG_MAC_ADDRESS MG_MAC_ADDRESS_STM32_UID(UID_BASE)\n```\n\n**Step 3. Initialise Mongoose Library.** Open `main.c`, copy-paste the following:\n```c\n#include \"hal.h\"\n#include \"mongoose.h\"\n\n// In RTOS environment, run this function in a separate task with 8k stack\nstatic void run_mongoose(void) {\n  struct mg_mgr mgr;        // Mongoose Event Mangager\n  mg_mgr_init(\u0026mgr);        // Initialise Event Manager\n  mg_log_set(MG_LL_DEBUG);  // Set log level to debug\n  for (;;) {                // Run infinite event loop\n    mg_mgr_poll(\u0026mgr, 0);   // Process network events\n  }\n}\n\nint main(void) {\n  hal_init();\n  run_mongoose();\n  return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesanta%2Fkeil-stm32-webui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesanta%2Fkeil-stm32-webui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesanta%2Fkeil-stm32-webui/lists"}