deluxetiky / xmegaduino

Automatically exported from code.google.com/p/xmegaduino
Other
0 stars 0 forks source link

Nothing to tell me how to get sparkfun board working; java problems. #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. get a sparkfun xmega100 breakout
2. download anything here.
3. become completely stuck.

What is the expected output? What do you see instead?

At least the basic walkthrough.  Which pins on the sparkfun do I need to
use to program?  Can I use the AVR Dragon?  A 

What version of the product are you using? On what operating system?
0.18, linux where it says:
falling back to Metal Look and Feel
java.lang.UnsatisfiedLinkError: librxtxSerial: librxtxSerial.so: cannot
open shared object file: No such file or directory thrown while loading
gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: librxtxSerial:
librxtxSerial.so: cannot open shared object file: No such file or directory

No prerequisites, installation guide, etc.

Please provide any additional information below.

All I want to do is get the bootloader into the breakout board and maybe do
a simple hello world sketch.  But nothing anywhere here has details on
getting started between the unboxing and downloading and actually getting
"hello world" on the serial port.

I think I could get an Xplain board working since you give some details
there, but not the sparkfun board.

If it isn't really supported - if there is no way to get it working, it
should say so.  If it can be made to work, a paragraph telling me how - I
can figure most things out but you don't even say if I need a Dragon or how
to hook it up I can't begin to guess about the first step.

And java isn't even working properly - The original (non-xmega) 0.18
./arduino works fine and doesn't ask for that library.  Maybe it would be
clear if I got it working, but I can't right now, but I'm trying to build
it from source.

Original issue reported on code.google.com by tz2026 on 8 Apr 2010 at 1:44

GoogleCodeExporter commented 8 years ago
The sparkfun board is *very* barebone so its not the easiest hardware to start 
with
(No JTAG header, no On-Board USB2Serial chip, needs an external power supply) 
but can
be made to work I'm sure.
I would recommend starting with the XPlain-board, which is much easier to 
handle.  

Anyway a few hints :

I use the project with the Ubuntu-package for Arduino-0018#
http://https://launchpad.net/~arduino-ubuntu-team
which installs AvrDude Version 5.10 I think is needed to upload code using PDI.

What Linux distribution and version are you on?

"Can I use the AVR-Dragon"?
We all do but using the JTAG-interface. I think PDI is 'terra incognita' in this
project but should be able to use it, by creating a new entry in 
programmers.txt. 
---------
dragon.name=dragon pdi
dragon.communication=usb
dragon.protocol=dragon_pdi
----------

And an entry for your board in boards.txt
----------------
##############################################################
sparkfun_pdi.name=Sparkfun using PDI

sparkfun_pdi.upload.using=dragon_pdi
sparkfun_pdi.upload.maximum_size=131072

sparkfun_pdi.bootloader.path=xplain
sparkfun_pdi.bootloader.file=ATmegaBOOT_xplain.hex
sparkfun_pdi.bootloader.unlock_bits=0x3F
sparkfun_pdi.bootloader.lock_bits=0x3F
# FUSE BITS
# fuse0: JTAGUSERID
# fuse1: WDWP=0xF WDP=0xF
# fuse2: Boot Loader Reset
# fuse4: JTAGEN
# fuse5: BODLVL=2.1V
xplain_serial.bootloader.fuse0=0xFF
xplain_serial.bootloader.fuse1=0xFF
xplain_serial.bootloader.fuse2=0xBF
xplain_serial.bootloader.fuse4=0xFE
xplain_serial.bootloader.fuse5=0xFD

sparkfun_pdi.build.mcu=atxmega128a1
sparkfun_pdi.build.f_cpu=32000000L
sparkfun_pdi.build.core=xmega
---------------------

I _think_ the bootloader code for the XPlain should also work on the sparkfun 
board.
But I would start with uploading a few sketches with the  dargon.

I guess you know you need a FDTI-USB2Serial (3.3V!)cable to make use of the
bootloader-uploading feature.

Eberhard

Original comment by eberhard...@gmail.com on 8 Apr 2010 at 3:38

GoogleCodeExporter commented 8 years ago
I will give that a try, the only thing I don't know is how to hook up the 
Dragon - do
I just use the ISP connector, or does the PDI use different pins like in the 
HVSP area?

I can't seem to find anything telling me which wires even though there are only 
six.

I can write assembly, even the lowest level stuff and read data sheets, but I 
need a
way to do the first things.

Original comment by tz2026 on 8 Apr 2010 at 4:31

GoogleCodeExporter commented 8 years ago
I'm currently working on adding support for the sfe xmega100, but it isn't 
ready yet. I'd stick with the xplain 
for now. Apologies for the confusion, I thought the "home page" was clear on 
this. I'll change it to make it 
very clear. Once I've got it working, I'll add complete documentation.

I hope to have sfe xmega100 support soon. Unfortunately, my xmega100 board 
seems to be bad. I'm 
getting it replaced.

Most of the work I'm doing is on the bootloader, which has some small hacks 
that make it work only on the 
xplain. It will almost certainly not work, unless you add switches on the right 
pins, and wires running all 
over to get Vcc,Gnd,Rx,Tx on USARTC0 or D0 or D1. The xmega100 bootloader will 
probably use USARTF1, 
which is adjacent to a ground pin, and use an external power supply. You will 
need a 3.3v usb to serial 
board. Sparkfun sells one.

I'm expecting to use pdi to burn the bootloader. I've got both a dragon and 
avrispmkii which is supposed to 
be able to do pdi. We'll see.

I'll check on Linux tonight. I don't recall having any problems.

Original comment by GorillaCoder on 8 Apr 2010 at 7:10

GoogleCodeExporter commented 8 years ago
I probably misread the sparkfun BoB support.  Sometimes it is hard to tell 
without a
chart saying 0%/50%/100% done.

AVR Studio 4 doesn't do PDI on the Dragon (yet, from the release notes).  It 
does
work JTAG, but you need to set the fuse bit which needs PDI.

I'll have to take a look at the bootloader.  I can usually hook up anything.

Thanks.

Original comment by tz2026 on 9 Apr 2010 at 12:34

GoogleCodeExporter commented 8 years ago
"AVR Studio 4 doesn't do PDI on the Dragon"
Did you check the latest service packs to AVR studio4? 
Revision 4.18 Service Pack 1 says in the release notes:
"AVR Dragon support for XMEGA PDI mode"

I think this is the normal way to upgrade the programmers firmware.
Install the latest  AVR Studio 4;Run the upgrades for the programmer; go back to
linux and AVRDude

Eberhard

Original comment by eberhard...@gmail.com on 9 Apr 2010 at 11:33

GoogleCodeExporter commented 8 years ago
Hello people!  I would like to express my greatest appreciation for all of the 
work 
you are doing...I was hoping someone, someday would tackle this!!  I was one of 
the 
first downloads of windows version.  I recently got may xplain board and am 
ready to 
have some fun.  I do have a question though, the application I'm eventually 
targeting may be more suitable to the 64pin version of the x128 , i know your 
extremely busy getting the standard barebones processor support ready, and 
having 
read over the pinout code and not feeling comfortable playing around with 
changes 
like that myself..Is it relatively easy to change the pinout support files 
and/or 
bootloader to support the atxmega128a3, is it close enough the 128a1?  Thanks :)

Original comment by mike.zaf...@gmail.com on 9 Apr 2010 at 6:54

GoogleCodeExporter commented 8 years ago
The code is kind of hacked now, so it'll take a bit of close reading to change 
the necessary places. I hope to 
make it considerably easier with the next drop. Most of the changes for the sfe 
xmega100 are exactly to make 
board level changes easy. That said, it's not that hard to change now, you've 
just got to look around.

Once I've finished the sfe xmega100 port, I'm hoping to tackle one of the 
boston android boards, which are 
a3 based. If you get to it first, would love to have any patch you can send.

Original comment by GorillaCoder on 9 Apr 2010 at 7:29

GoogleCodeExporter commented 8 years ago
In the release notes for AVR studio 4.18 SP3 it says that Dragon PDI support 
isn't
there though it shows as supported.  And I tried it and it doesn't appear to 
work
(wired in any way where the jtagice-mk2 does support PDI).

Original comment by tz2026 on 12 Apr 2010 at 12:40