-
Notifications
You must be signed in to change notification settings - Fork 20
Getting Started
Akash Kollipara edited this page Jul 20, 2024
·
27 revisions
- Linux machine or Windows with wsl enabled.
- Click here for WSL installation process.
- User can either use VS-Code (remote) or vim/nano/etc. editors for making changes.
- Install dependencies, run following command: (Ubuntu)
These are necessary to fetch tools like make, native gcc, linting tools and other libraries needed by other tools such as qemu.
sudo apt update && sudo apt install build-essential cppcheck tree ninja-build libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev libglib2.0-dev libgcrypt20-dev python3-venv -y
- You are required to know how to use git.
- [Optional but Recommended] Add ssh key to github, click here for guide. This will let user access github without username and password. However, please do setup git cli/gui and configure your system account on your workstation.
- Run the following command to download/clone Cyancore
git clone [email protected]:VisorFolks/cyancore.git
- After cloning, run the following command:
make get_avr_tc # This will clone AVR toolchain from git repository
- We use vim for developement. But VSCode support is also added in the repo.
Disclaimer: VS-Code is open and we are not promoting it.
- Run
make list
to get the list of all projects - Choose the project you wish to build and run it as follows
make <project_name>
$ make list Available projects are : demo_avr demo_avr_cpp demo_riscv $ make demo_avr # This will build the project "demo_avr" Building Project demo_avr ------------------------------------ Platform : atmega328p Architecture : avr8-5 Cyancore Version : 0x01000302 Cyancore Codename : Beryllium Lib: Compiling printf.c ... Lib: Compiling exit.c ... Elf: Preprocessing driver.ld ... ... ... Elf: Generating demo_avr.elf ... Size of demo_avr.elf ====================================================================== S.No. Section VMA Size Load ====================================================================== 1) .text 0x00000000 13748 B * 2) .bss 0x00800100 101 B 3) .data 0x00800165 695 B * 4) .heap 0x0080041c 256 B 5) .stack 0x0080051c 256 B ====================================================================== Total Size of bin file = 14443 Bytes Flash Usage : [================= ] 44%, 14443 / 32768 B RAM Usage : [========================= ] 63%, 1308 / 2048 B < / > Done !
- Binaries will be generated at
out/<project_name>/
# For example: build directory structure of demo_avr $ tree out/ -L 2 out/ └── demo_avr # Project build directory ├── demo_avr.bin ├── demo_avr.elf ├── demo_avr.hex ├── demo_avr.lst ├── demo_avr.map └── src # Objects and libraries are present here
- Run QEMU Test
Copyrights (c) 2022, Cyancore team