The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

Re: New CPU Project

by guest on Sat Dec 29, 2012 11:58 am

i came across this thread while searching for oml related stuff
glad to see that the new micro is finally out

hows it been going around here

the first thing to check is wether the bootloader
is actually loaded onto the micro correctly
it seems like it is
as it does something different in bootload mode
but just to make sure
power it on in bootload mode
and let it set for ten minutes or so
and see if it pops out of bootload mode
there should be a timeout period in there
i think its five minutes

next make sure you have the right comport for avrdude
take a look at your device manager
and check that the ftdi usb device is showing up
and that its comport matches the one in the avrdude call

avrdude can be a bit tricky
sometimes its default preference file is in the wrong place
and it fails miserably

if we cant get that to work
the icsp is the next cheapest option
and then there is the jtag
the jtag should just work fine
but the icsp will take some wiring up
as it uses different pins
guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 4:35 am

Re: New CPU Project

by guest on Sat Dec 29, 2012 12:13 pm

just double checked the bootloader code
and it looks like its a 24 minute timeout

if you start up the x0x in bootload mode
turning the function knob shouldnt change the function
until the timeout expires
and then it should change to a different function
so if you power it on in bootload mode
wait a minute
then change it to pattern play mode
it should do nothing
until 24 minutes expire
and then it will switch to patern play mode
guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 4:35 am

Re: New CPU Project

by Altitude on Sat Dec 29, 2012 12:42 pm

hey hey, welcome back. what do u recommend for a jtag software wise? i have that chinese clone on the way specifically to work on this
User avatar
Altitude
 
Posts: 971
Joined: Wed May 11, 2005 4:17 pm

Re: New CPU Project

by antto on Sat Dec 29, 2012 1:13 pm

guest \o/
while you weren't here, i managed to build my control app and it runs on windows and osx, so there is a more stable alternative to c0ntr0l now (here)

on the subject: when i restart the x0xb0x in bootload mode - it loads the firmware
here's exactly what happens:
1) power ON
2) initially there are some random LEDs lit up, but after a few milliseconds they are cleared and only BANK1 LED remains lit, it stays like that afterwards
3) if i switch to any other mode - it responds accordingly (it's the firmware)

of course my port is correct and the usb-serial driver is correct, my control app is able to connect to the new cpu and get/set TEMPO, so the connection works like always

guest: x0xb0x2.hex on your website - it only contains the firmware, but not the bootloader, right?
if so, i suspect that maybe the new cpu has only that flashed on
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. http://forums.adafruit.com/viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: http://forums.adafruit.com/viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1329
Joined: Thu Apr 15, 2010 2:21 pm
Location: 127.0.0.1

Re: New CPU Project

by guest on Sat Dec 29, 2012 1:24 pm

i use avrstudio to do programming
the cool thing about that if you are using jtag
is that it has all the registers and ports in a graphical format
so you can stop the program with breakpoints
and see all of the internals changing

if you power it on in bootloader mode
and it switches to a single led being on after a few milliseconds
then the bootloader is not loaded
and the fuses arent set for that feature

you can either use jtag or icsp to load the bootloader
or just program it with it
jtag is usually really expensive
atmel sells it for 300$
but if the one altitude picks up does the trick
then that might be a good choice
otherwise an icsp programmer is 30$
but it doesnt allow all the debugging features

the code up on my site is broken into two sections
the first is the main code
and the other is the boot code
and they are loaded seperately
it is possible to make one single .hex file that has it all
but id have to look up how to do that

congrats on the new control app
guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 4:35 am

Re: New CPU Project

by antto on Sat Dec 29, 2012 1:39 pm

i haven't had a way to debug the firmware while i was working on the normal cpu, so i won't miss anything
but if it's supposed to be used with JTAG - so be it
i'm very unfamiliar with these things, but google returned this site https://www.olimex.com/Products/AVR/Programmers/ which seems to have kind of similar things, and it's a local company, will one of these things work for the new cpu?
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. http://forums.adafruit.com/viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: http://forums.adafruit.com/viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1329
Joined: Thu Apr 15, 2010 2:21 pm
Location: 127.0.0.1

Re: New CPU Project

by Altitude on Sat Dec 29, 2012 2:43 pm

The USB one looks good
User avatar
Altitude
 
Posts: 971
Joined: Wed May 11, 2005 4:17 pm

Re: New CPU Project

by guest on Sat Dec 29, 2012 2:44 pm

i havent used any of their products
but they are a reputable company
so im guessing they will work

i would suggest the jtag connector anyways
considering it is cheap
and has way more functionality
once you use jtag you will never go back
it makes things so much easier
https://www.olimex.com/Products/AVR/Pro ... TAG-USB-A/

it says you need avrstudio4.13 or earlier
probably earlier versions are better
you need windows to run avrstudio
guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 4:35 am

Re: New CPU Project

by Altitude on Sat Dec 29, 2012 2:48 pm

I just noticed something, how new is the 2561? Would these MK1 JTAG ICE clones work or would we need the mkII
User avatar
Altitude
 
Posts: 971
Joined: Wed May 11, 2005 4:17 pm

Re: New CPU Project

by antto on Sat Dec 29, 2012 2:48 pm

Altitude wrote:The USB one looks good

AVR-JTAG-USB-A <- this one, right? it should work?
Image
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. http://forums.adafruit.com/viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: http://forums.adafruit.com/viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1329
Joined: Thu Apr 15, 2010 2:21 pm
Location: 127.0.0.1

Re: New CPU Project

by antto on Sat Dec 29, 2012 2:55 pm

old version of avrstudio? hm.. so avrdude won't work?

i don't need many features, i want to get a bootloader on the cpu, so that i can implement support for the bootloader in my control app (so that i can flash .hex via usb without specialized software and complicated command line instructions)

i'm very glad that there's C code for the bootloader this time :mrgreen: THANKS
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. http://forums.adafruit.com/viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: http://forums.adafruit.com/viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1329
Joined: Thu Apr 15, 2010 2:21 pm
Location: 127.0.0.1

Re: New CPU Project

by Altitude on Sat Dec 29, 2012 3:15 pm

i'm a bit more concerned about the chip being supported under avrstudio 4

*edit

looks like the 2561 is supported under studio 4

i dont think that avrdude even supports the JTAG programmer. Its more of a debugging device that can also flash code
User avatar
Altitude
 
Posts: 971
Joined: Wed May 11, 2005 4:17 pm

Re: New CPU Project

by antto on Sat Dec 29, 2012 3:36 pm

ah, so avrstudio is the only way
btw, you are highly welcome at the irc channel :mrgreen:
We are here too: irc.freenode.net >>> #x0xb0x
..:: c0nb0x v1.00 ::.. http://forums.adafruit.com/viewtopic.php?f=7&t=29282 (new control app - win/osx)
VCO Tuning: http://forums.adafruit.com/viewtopic.php?f=12&t=24759 (do it the EASY way)
User avatar
antto
 
Posts: 1329
Joined: Thu Apr 15, 2010 2:21 pm
Location: 127.0.0.1

Re: New CPU Project

by Altitude on Tue Jan 15, 2013 8:59 pm

Just an update about where we are at:

I was able to get everything up and running via AVRdude from a blank chip but the bootloader functionality appears broken, it does stay in BL mode and just reverts to the firmware
User avatar
Altitude
 
Posts: 971
Joined: Wed May 11, 2005 4:17 pm

Re: New CPU Project

by guest on Wed Jan 16, 2013 10:58 pm

how did you attempt bootloading
the old bootloader wont work

did avrdude give any errors

if you have arduino installed
you can try the arduino bootloader as well
guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 4:35 am