asuro-template
This repository is a template project for coding on the ASURO roboter with CMake.
Information
This repository contains the ASURO C library, a sample program and a CMake build file to build the program.
I wanted to use CLion, so I copied and edited the CMakeLists.txt
file to build the program using CLion and CMake.
An alternative is Atmel Studio 7. Atmel Studio has an embedded AVR toolchain, a build tool and a (semi-clever) IDE. Therefore, no further installations are required to start developing.
Note: Most of the mentioned resources will be mirrored in the release as they may become unavailable.
General procedure with ASURO
- Build your ASURO (soldering and that stuff).
- Connect the programmer via USB to your PC.
- Open the ASURO flash program and flash a sample program.
- The sample program will test your sensors, lights and motor.
- Start developing your own projects, for instance moving straight forward (it's not that simple tho).
Prerequisites
The template was tested on Windows 10 using WinAVR and CLion (MinGW toolchain).
However, the template should work on Unix systems as well.
Just change the paths in CMakeLists.txt
IDE and CMake
I recommend CLion as IDE, however, every other IDE should be fine.
You have to choose a general toolchain like WSL or MinGW.
I installed MinGW to use commands like make
on Windows.
Make sure to add it to your PATH variable.
In order to build the project, you need CMake. CLion has an embedded version of CMake. Otherwise install it manually. Once again, don't forget to add it to your PATH variable to use the commands in the console.
AVR toolchain
You will need an AVR toolchain.
Meanwhile, there exists some different implementations of it.
I tested some toolchains (Atmel AVR, Prebuilt Windows Toolchain by Sysprogs, WinAVR and AVR-GCC by ZAK) and WinAVR works best for me.
However, if you use WinAVR you have to overwrite utils/bin/msys-1.0.dll
with a modified version (cf. Uni Regensburg).
Once again, don't forget to add the bin/
directory to your PATH variable.
Usage
- Click on
Use this template
. - Clone your project.
- Mark
src/
andlib/
asProject sources and headers
by right-click on the directory. - Edit and configure
CMakeLists.txt
. Note the# TODO:
comments. - Code your stuff.
- Build it (cf. Build it).
Build it
The ASURO flash tool requires a .hex
file.
Run cmake
and then make
.
The .hex
file will be built into bin/
.
If you are using Windows and MinGW, the command cmake -G "MinGW Makefiles" & mingw32-make
will build the file.
Resources
All the resources are mirrored in the release.
- asuro-lib. http://sourceforge.net/projects/asuro/
- WinAVR. https://sourceforge.net/projects/winavr/
- fixed WinAVR file. Uni Regensburg
- COM-Port driver. http://www.ftdichip.com/Drivers/VCP.htm
- ASURO manual. http://www.arexx.com/downloads/asuro/asuro_manual_de.pdf
- flash tool. (not public)
Helpful repositories
- CMake and AVR - https://github.com/toni55/Clion-AVR
- Asuro Makefile - https://gist.github.com/bradfordbarr/9182992