|
|
|
|
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
November 20, 2009, 09:16:15 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
SoR Robot Chat every friday night. Join us!
http://www.societyofrobots.com/robotforum/chat/
Robot Forum
72,665
Posts in
9,267
Topics by
5,290
Members
Latest Member:
robertelson
Robot Forum
>
Software
>
Software
>
HOW-TO Axon with Ubuntu
0 Members and 1 Guest are viewing this topic.
Pages:
[
1
]
Author
Topic: HOW-TO Axon with Ubuntu (Read 706 times)
smani
Beginner
Helpful? 1
Offline
Posts: 4
HOW-TO Axon with Ubuntu
«
on:
June 14, 2009, 05:33:51 AM »
Here is a quick how-to for working with the Axon on Ubuntu (and any other distributions, just use the according packages). I prefer to work with minimalistic tools, i.e. text editor and command line, hence this "development environment" does not make use of AVR studios or similar, although AVR studios exists for linux, and therefore should not be too much of a problem to install.
Enjoy, smani
**************************************************
* Axon on Ubuntu Linux (tested with 9.04 and up) *
**************************************************
* INSTALLATION
- Base packages:
sudo apt-get install build-essential gcc-avr gdb-avr binutils-avr avr-libc simulavr minicom
- Compile the bootloader
Download the bootloader [1]
cd <bootloader_dir>
make
* WORKING WITH THE CONTROLLER
- Plug the controller in a USB port, recent kernels already contain the driver.
- Check if the BAUD rate of the serial port is correct [2]:
stty -F /dev/ttyUSB0 (use /dev/ttyUSB<n> according to your particular system)
The BAUD should be 115200, else set it:
stty -F /dev/ttyUSB0 115200
- Connect to ttyUSB0 via minicom [3]:
- run
minicom -s
choose Serial port setup and select the correct serial device node (here /dev/ttyUSB0)
- Save configuration as def[ault] (optional)
- run minicom, you should now be connected
- To quit minicom, CTRL+A, then Z and finally Q
* PROGRAMMING
- Download Axon source files
- Edit the source files as you need
- Run make
- Assure your Axon is turned OFF! (i.e. battery disconnected, but still connected to USB clearly)
- Upload the program to the device (make sure minicom is not active!):
./bootloader -d /dev/ttyUSB0 -b 115200 -p file.hex
where file.hex is your program (run bootloader without arguments for help)
- Turn on your Axon (i.e. connect power), programming should start (make sure there is no minicom instance running as it will lock the device!)
- Once programming is complete, your done.
* REFERENCES
[1]
http://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_type=project&item_id=1927
[2]
http://embedded.seattle.intel-research.net/wiki/index.php?title=Using_other_UARTs_in_Linux
[3]
http://www.cyberciti.biz/tips/connect-soekris-single-board-computer-using-minicom.html
Logged
awally88
Robot Overlord
Helpful? 0
Offline
Posts: 191
Re: HOW-TO Axon with Ubuntu
«
Reply #1 on:
June 14, 2009, 08:36:00 PM »
<3 , I've been looking to buy an Axon however I am a big Ubuntu fan and don't want to have to run Vista for all my microcontroller needs. I've been holding off buying one until I have enough time to properly get it working, this makes it so much easier for me!
Thanks for the tip!
Logged
smani
Beginner
Helpful? 1
Offline
Posts: 4
Re: HOW-TO Axon with Ubuntu
«
Reply #2 on:
June 15, 2009, 01:51:55 PM »
I also wrote a simplier makefile that includes only the essential rules, allowing easier editing and also including a rule to program the device (note that bootloader needs to be in your PATH, otherwise change the path below, i.e. to ./bootloader):
# Simple Makefile for Axon
# Written by Sandro Mani, version 20.06.2009
#
# Rules:
# all -> build
# build build the program
# clean clean built files
# program program the device
# Project settings
# MCU type, i.e. atmega640
MCU = atmega640
# dev node of the controller, i.e. /dev/ttyUSB0
DEVNODE = ttyUSB0
# Name of the project
NAME = Axon
# List of needed object files
OBJFILES=a2d.o main.o buffer.o rprintf.o timer640.o uart4.o
# Compiler flags settings
CC = avr-gcc
CFLAGS = -mmcu=$(MCU) -Os -Wall -Wstrict-prototypes -std=gnu99
LDFLAGS = -lm
all: build
build: $(NAME).bin
@echo Creating program $(NAME).hex...
@avr-objcopy -O ihex -R .eeprom $(NAME).bin $(NAME).hex
@echo
@echo Done!
@avr-size --target=ihex $(NAME).hex
$(NAME).bin: $(OBJFILES)
@echo Linking $(OBJFILES) to $(NAME).bin...
@$(CC) $(CFLAGS) $(LDFLAGS) $(OBJFILES) -o $(NAME).bin
%.o: %.c
@echo Compiling $<...
@$(CC) -c $(CFLAGS) $< -o $@
clean:
@echo Cleaning up...
@rm -f *.o $(NAME).bin $(NAME).hex
program: build
./bootloader -d /dev/$(DEVNODE) -b 115200 -p $(NAME).hex
.PHONY: all build clean program
«
Last Edit: June 20, 2009, 04:31:29 AM by smani
»
Logged
Resilient
Full Member
Helpful? 2
Offline
Posts: 63
Re: HOW-TO Axon with Ubuntu
«
Reply #3 on:
June 15, 2009, 05:43:52 PM »
Is this using just the standard USB cable attached directly to the Axon? Or is it using some other hardware to attach to the Axon?
Logged
smani
Beginner
Helpful? 1
Offline
Posts: 4
Re: HOW-TO Axon with Ubuntu
«
Reply #4 on:
June 16, 2009, 09:15:04 AM »
Nono, standard USB cable. Just Plug-n-Play.
Logged
Admin
Administrator
Supreme Robot
Helpful? 62
Offline
Posts: 8,610
Re: HOW-TO Axon with Ubuntu
«
Reply #5 on:
June 17, 2009, 02:47:45 PM »
Cool! One less reason for me to use Windows. Now if only my CAD software were to work in Linux, I'd probably swap
Anyway, I linked this up in step 2 here:
http://www.societyofrobots.com/axon/axon_getting_started_software.shtml
Logged
subscribe to SoR's YouTube account
smani
Beginner
Helpful? 1
Offline
Posts: 4
Re: HOW-TO Axon with Ubuntu
«
Reply #6 on:
June 18, 2009, 01:57:18 PM »
Just wait, the more M$ releases garbage that is only designed to look fancy but is totally useless for anything else than playing, the more CAD manufacturers will realize where to focus development on
And Wine is getting better at an extremely fast rate, just in case
Logged
Trumpkin
Supreme Robot
Helpful? 5
Offline
Posts: 1,154
Re: HOW-TO Axon with Ubuntu
«
Reply #7 on:
June 18, 2009, 07:19:09 PM »
Quote
And Wine is getting better at an extremely fast rate, just in case
Yeah, I'm able to get just about anything working with Wine now.
Logged
Robots are awesome!
Pages:
[
1
]
Jump to:
Please select a destination:
-----------------------------
General Misc
-----------------------------
=> Misc
=> Robot Videos
-----------------------------
Software
-----------------------------
=> Software
-----------------------------
Electronics
-----------------------------
=> Electronics
-----------------------------
Mechanics and Construction
-----------------------------
=> Mechanics and Construction
Related Topics
Subject
Started by
Replies
Views
Last post
joystick, ubuntu, control robot.
Electronics
offy
18
1265
March 18, 2009, 07:22:27 AM
by
offy
BlueSMiRF setup - brand new - Ubuntu or Windows
Electronics
offy
3
380
May 08, 2009, 12:40:42 PM
by
offy
arduino duemilanove instalation in ubuntu 8.04
Software
blackbeard
6
176
November 08, 2009, 08:17:16 PM
by
awally88
Axon port Output and Compiling hex file in Ubuntu
Software
taba93
0
37
Yesterday
at 07:25:29 AM
by
taba93
Advertise on this Forum
Loading...