Are you ready to start programming your BuddyKit 51 Mini with ease? This guide walks you through everything you need — from setting up the development environment to building and flashing your first project using SDCC and VSCode.
📁 Project Overview
We’re using a well-organized project template designed for SDCC (Small Device C Compiler). It includes:
- Source folder for your
.c
and.h
files - Prebuilt libraries for common modules (LCD, EEPROM, RTC, Keypad, etc.)
- Scripts to build and clean your project
- Output-ready HEX files
1 2 3 4 5 6 7 8 9 10 11 | 📂 Project ├── src/ # Your source code files ├── library/ # Reusable libraries (LCD, I2C, RTC, etc.) ├── object/ # Compiled object files ├── release/ # Output HEX files ├── build.bat # Build script for Windows ├── build.sh # Build script for Linux/Mac ├── clean.bat # Clean script for Windows ├── clean.sh # Clean script for Linux/Mac └── README.md # Documentation |
⚙️ Step 1: Install SDCC
🔹 Windows
🔹 Linux (Ubuntu/Debian)
1 2 3 | sudo apt update sudo apt install sdcc sdcc --version |
🔹 macOS (Using Homebrew)
1 2 | brew install sdcc sdcc --version |
⚙️ Step 2: Install Nuvoton ISP Tool
You’ll need Nuvoton ISP to flash the HEX file to the BuddyKit 51 Mini.
- Download Nuvoton 8051 ISP.
- Install and verify the tool works on your PC.
✏️ Step 3: Install Visual Studio Code (VSCode)
- Download from the official website.
- Install and add extensions:
- C/C++ IntelliSense
- (Optional) Makefile Tools
🧪 Step 4: Build Your Project
🔹 On Windows
1 | build.bat |
🔹 On Linux & macOS
First time only:
1 | chmod +x build.sh |
Then run:
1 | ./build.sh |
After building, your final .hex
file will appear in the release/
folder.
🧹 Step 5: Clean the Build Files
🔹 On Windows
1 | clean.bat |
🔹 On Linux/macOS
1 | ./clean.sh |
🚀 Flashing to BuddyKit 51 Mini
- Connect your BuddyKit to your PC via USB.
- Open the Nuvoton ISP software.
- Select the correct COM port.
- Choose the HEX file from the
release/
folder. - Click Start to flash.
✅ Tips & Notes
- Always save your C source files inside the
src/
folder. - The libraries support modules like LCD, EEPROM, MPU6050, etc.
- Make sure
sdcc
is accessible via your system PATH.
📺 Watch the Video Tutorial
🎉 Happy Coding with BuddyKit!
If this guide helped you, feel free to share it and star the GitHub repo!
Leave Your Reply
You must be logged in to post a comment.