Contributed by WildboarG, organized by Ai-Thinker
[Ai-WB2] Cloud Compilation
AI-Thinker-WB2 Cloud Compilation
Steps
Use github action to compile ai-Thinker-wb2 in the cloud and publish the generated binary bin files. No need to consume your own computer resources — you only need a terminal with internet access to make it work.
- Write the code locally
- Upload the local project to github — here we use the previous radar sentry as a demo
- Trigger the workflow to compile via
tag, instead of compiling right after push/upload.

- After the commit, you can see that the workflow has already been triggered.


- It takes about 5 minutes from pulling and downloading the SDK to finishing the compilation and publishing.
- The compiled bin file of release V0.0.1 is already visible in the sidebar. Open the details


Download this bin file and flash it to your own microcontroller.
Go ahead and try fork now
Extensions
Cloud update via Release versions:
Use OTA for cloud updates. The source code provides a tool to add a header for OTA, and the output output.bin is already a bin with the header added. If the network allows, you can update in the cloud via OTA. Since the latest release is automatically recognized, the upgrade address can be hardcoded to "latest", and it will automatically detect new versions. Therefore, set a version number check inside the program to decide whether to update.
I compiled and tested the OTA demo from the hasal library locally, then used the provided header-adding tool to generate the bin file. It showed that the OTA upgrade succeeded, but then it froze. Is there an expert who could publish a detailed OTA upgrade tutorial?

