This repository demonstrates configuration and usage for lwesp-fat-8266 based on stm32f769, Ai-thinker ESP8266 and FreeRTOS. lwesp-fat-8266 has already been configured properly, and lwesp_init
is called in FreeRTOS thread.
This repository contains submodule. To obtain all needed files, please add --recursive
option.
git clone https://github.com/niedong/stm32f769xx.git --recursive
A: Build & Develop on CLion
If you are a CLion user, then everything becomes easier. Open stm32f769xx.ioc
in CLion and follow CLion embedded development tutorial step by step, you can build and download your program with just a few clicks.
B: Build & Develop via CMake
Step 1: Build via CMake
To build your program with CMake, please make sure you have all required tools installed and configured properly, and avoid using version which has issue posted by CLion team.
Once you have all the required tools, you can build your program via CMake. Type the following command in current source code folder
cmake --build cmake-build-debug --target stm32f769xx.elf -- -j 3
If the build is successful, you will find the excutable stm32f769xx.elf
in cmake-build-debug
folder.
Step 2: Run/Debug via OpenOCD
Once you get the excutable stm32f769xx.elf
, you can download it to your device via OpenOCD. You can find more information about OpenOCD here.
To download your program, type the following command in current source code folder
openocd -f stm32f769i-disco.cfg -c "tcl_port disabled" -c "gdb_port disabled" -c "tcl_port disabled" -c "program cmake-build-debug/stm32f769xx.elf" -c reset -c shutdown
If nothing goes wrong, OpenOCD will give the following message
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 2000 kHz
Info : STLINK V2J37M26 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.226824
Info : stm32f7x.cpu: hardware has 8 breakpoints, 4 watchpoints
Info : gdb port disabled
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800aa3c msp: 0x20080000
** Programming Started **
Info : device id = 0x10016451
Info : flash size = 2048 kbytes
Info : Single Bank 2048 kiB STM32F76x/77x found
** Programming Finished **
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
shutdown command invoked
Congratulations! You can build and debug your program successfully.
Files generated by STM32CubeMX are all clearly marked on the top. Please refer to LICENSE for more information about statements and restrictions.