New CPU Project

Discuss mods, hacks, tweaks, etc.

Moderators: altitude, adafruit_support_bill, adafruit, phono, hamburgers

Please be positive and constructive with your questions and comments.
Locked
guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 5:35 am

Re: New CPU Project

Post by guest »

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 5:35 am

Re: New CPU Project

Post by guest »

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

User avatar
altitude
 
Posts: 995
Joined: Wed May 11, 2005 5:17 pm

Re: New CPU Project

Post by altitude »

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
antto
 
Posts: 1636
Joined: Thu Apr 15, 2010 3:21 pm

Re: New CPU Project

Post by antto »

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

guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 5:35 am

Re: New CPU Project

Post by guest »

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

User avatar
antto
 
Posts: 1636
Joined: Thu Apr 15, 2010 3:21 pm

Re: New CPU Project

Post by antto »

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?

User avatar
altitude
 
Posts: 995
Joined: Wed May 11, 2005 5:17 pm

Re: New CPU Project

Post by altitude »

The USB one looks good

guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 5:35 am

Re: New CPU Project

Post by guest »

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

User avatar
altitude
 
Posts: 995
Joined: Wed May 11, 2005 5:17 pm

Re: New CPU Project

Post by altitude »

I just noticed something, how new is the 2561? Would these MK1 JTAG ICE clones work or would we need the mkII

User avatar
antto
 
Posts: 1636
Joined: Thu Apr 15, 2010 3:21 pm

Re: New CPU Project

Post by antto »

Altitude wrote:The USB one looks good
AVR-JTAG-USB-A <- this one, right? it should work?
Image

User avatar
antto
 
Posts: 1636
Joined: Thu Apr 15, 2010 3:21 pm

Re: New CPU Project

Post by antto »

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

User avatar
altitude
 
Posts: 995
Joined: Wed May 11, 2005 5:17 pm

Re: New CPU Project

Post by altitude »

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
antto
 
Posts: 1636
Joined: Thu Apr 15, 2010 3:21 pm

Re: New CPU Project

Post by antto »

ah, so avrstudio is the only way
btw, you are highly welcome at the irc channel :mrgreen:

User avatar
altitude
 
Posts: 995
Joined: Wed May 11, 2005 5:17 pm

Re: New CPU Project

Post by altitude »

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

guest
 
Posts: 3155
Joined: Fri Feb 17, 2006 5:35 am

Re: New CPU Project

Post by guest »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “x0xm0dz”