Update to version 2014-06-13
AVR uartConfig is a set of tools running on Windows, Linux and Mac, made up or:
- a avrgcc firmware library
- a commandline utility
- a gui tool
This library prevent you to wire up a disply and buttons to configure your micro eeprom. For example is it usefull to setup PID parameters of your robot by uart/bluetooth uart, or for other small devices that doesn’t came with an output/input interface.
How does it works
Firmare side you have to setup an eeprom structure which contains all the variable you want to save on your eeprom and later you can read.
The same eeprom structure is replicated in the commandline utility config file.
So every times you want to write/read an element of your micro eeprom, you can run commandline utility which serialize your input value, prepare it to be written on eeprom, and then ask the firmware to write this parameter on eeprom.
To read a value, the commandline utility just ask firmware to return a specific eeprom byte interval, then it deserialize the value recived.
Serialization and Deserialization functions provide the way to “convert” the commandline input as a valid atmega eeprom variable input, and viceversa.
All the conversion are made client (commandline) side, firmware side we have a small footprint library.
To make this works we have setup the same struct on firmware and command line side.
- include the library in your main file
- setup eestruct on firmware and commandline config file read EESTRUCT file for further info
- init your eestruct eerpm (optional)
- in the main loop get a character from uart, and use avruartconfig main check function to check if the character you get is a library command main function also need a pointer to the eestruct variable and eeprom variable
Firmware Library, Arduino Notes
Import avruartconfig library in your libraries folder.
Make sure your serial connection is not resetting your arduino every times the serial port is open, look here for info: http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection
Using the commandline tool you can setup you atmega. Commandline utility implements the setup procol client side. Setup eestruct configuration files, read EESTRUCT file for further info.
The command line utility makes use of libconfig, so to build it, you need to add libconfig library to your linker (-lconfig for the library, -L../lib/_select_os to select the library directory).
Check that you have execution permission on commandline binary.
For more detail: AVR uartConfig – an atmega and arduino eeprom config library