This page describes an easy to use framework for developing software for small microcontrollers.
There is a mailing list for discussion about this project. Allowed languages are Czech and English. The address for sending to the list is email@example.com. You can write there without subscribing but you will have to wait for moderator approval.
To get the sources from our Git repository use the following command:
git clone git://rtime.felk.cvut.cz/sysless.git
You will also need a toolchain (compiler, linker, etc.) for your architecture. You can get some from the following pages:
The downloaded packages must be configured for a particular board you plan to use. For h8canusb board execute the following commands from sysless directory:
ln -s board/h8300/h8canusb/config.h8canusb config.target make default-config
Then, you can override default configuration of what is compiled and how. The list of variables available for modification is config.omk-default. Put your own settings to config.omk since the values here override those from config.omk-default and config.target.
everything is going to compile and if the compilation is completed without errors, you can use this build environment for building your own applications.
If there are some build errors, you may try to compile it by
This command tries to build everyting even if there are some errors.
Compiling one application only
To compile only a part of sources (e.g. your own application), change the directory to where your applications resides and run
This will (re)compile everything in current directory and all subdirectories. The result of compilation can be found under the _compiled direcotry (located at the root of sysless directory structure). The structure of _compiled directory is as follows:
- binary programs for target system
- binary programs for host system (PC) (note: This will probably change in future)
- header files which are used when compiling for target
- compiled libraries for target
There is another directory called _build where are stored intermediate products of compilation such as object files, linker maps and dependency descriptions. You can delete files in _build corresponding to your current directory (and its subdirectories) by issuing
If you want to delete both _compiled and _build directories, run
If your board has it's default link variant set for example to ram and you want to link your application for loading into flash memory, you can use the following command to compile another variant of your program:
You can use more variant at once by
make link_VARIANTS="flash ram"
Loading and running an application
To load an application to the target processor, run
This loads the application from the current directory to either RAM or FLASH memory. Which one is selected depends on the value of DEFAULT_LD_SCRIPT_VARIANT variable. This variable can be set globally in config.target or locally in Makefile.omk and the first word of this variable value determines the default memory location for loading (and running).
If you want to load an application to a different memory region, use one of
make load-flash make load-ram
If there are more programs to load in the current directory, and you want to load a non-default one, run
make load-<progname>-ram make load-<progname>-flash
After loading your application, you can run it by running one of the following
make run make run-ram make run-flash
You can also combine loading and running into a signle step and use
make load run
Using KDevelop for development
If you want to use KDevelop for development, follow theese points:
- Import project to KDevelop (from menu choose Project -> Import existing project). Select the type of project to Generic C Application (Custom Makefile)
- (Optional) Populate your project with source files by anwering yes to the dialog.
- Open Project Options dialog (menu Project -> Project Options) and choose Run Options. Select Run from the BUILD directory, to Main Program editbox write /usr/local/bin/make (you may have your make in a different directory) and as Program Arguments write load run.
- Now you can compile your application by pressing F8 and if there are some errors, you can quickly jump the place in source whre the error is by pressing F4.
- After successfull compilation you can run your application by clicking Execute program icon. I recomend you to create shortcut key F9 for this action. If you change your sources, you can booth recompile and execute your application by simply pressing F9.
If you run make TAGS in any direcotry, the file TAGS in the toplevel directory of the project will be created. This file can be used by various editors (such as Emacs) for quick searching of symbols in source files.
Writing your own application
Contributing to System-Less Framework
You are encouraged to send us fixes, enhancements and other contribution to the mailing list. You can use git format-patch and/or git send-email to automate it a little bit.
git send-email HOWTO
To send the last two commits together with an introductory letter use one of the following commands:
git send-email --compose HEAD~2 # you will be asked for destination address git send-email --compose --firstname.lastname@example.org HEAD~2
If the commit messages are descriptive enough so that it is not necessary to write the introductory e-mail, simply omit --compose option.
If you do not have working sendmail on your system, you need to configure git to send via SMTP server. The following works with our faculty IMAP server:
git config --global sendemail.smtpserver imap.feld.cvut.cz git config --global sendemail.smtpuser sojkam1 git config --global sendemail.smtpssl true
You can also use Gmail to send the patches.
- OMK make system
- Stanislav Marek's Diploma thesis - Documentation to OMK build system in Czech (obsolete).