0

New CPU Project
Moderators: altitude, adafruit_support_bill, adafruit, phono, hamburgers

Please be positive and constructive with your questions and comments.

Re: New CPU Project

by antto on Wed Jun 26, 2013 8:01 am

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)

antto
 
Posts: 1618
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: New CPU Project

by antto on Sat Jul 06, 2013 6:07 pm

so, i did some modifications to the bootloader...
firmware can now be updated both via avrdude (stk500v2) and via MIDI-SYSEX
i sacrificed the timeout mechanism which served to jump to the firmware if there's no data on the serial port for too long

this version of the bootloader enables MIDI interrupt and waits for data on both the serial port (usb) and MIDI
the stk500v2 stuff is the same (only that i've disabled the silly Monitor function, bleh)
the MIDI interrupt listens for specific sysex messages, such that contain [7D 03 03 7F 7F 7F]
if there is no other data after those bytes - it's an "empty" packet, and the bootloader quits waiting for data on the serial port, and goes to the SYSEX programming mode
after that, the same sort of packets start coming but with data, 512 bytes of data, the bootloader puts them together into 256 bytes of binary data (one flash page) and writes them to the flash
this repeats until another "empty" packet comes, which means to leave programming mode
then, the bootloader jumps to the firmware
flashing FW via sysex is slightly slower than via usb/avrdude

x0xb00t2.1.zip
this contains both the source code and the pre-built hex file
*DO* lock the chip after flashing, use something like this: -U flash:w:x0xb00t2.hex -U lock:w:0x0F:m because each time you erase the chip - the lock bits become reset (0x3F)

to convert the firmware from .hex to .syx i wrote a small console app, it doesn't use anything fancy, just std::cout, fstream and such.. so it can be built on most platforms
Usage: as_hex2syx <filename.hex>
on windows, you can drag'n'drop a .hex file onto the app - it'll spit out a .syx in the same directory
there's also an option to convert the .hex into raw binary instead (as_hex2syx -r <filename.hex>) which might be useful some day
as_hex2syx_src.zip (source code with C::B project)
Last edited by antto on Sat Oct 05, 2013 4:23 pm, edited 1 time in total.
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)

antto
 
Posts: 1618
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: New CPU Project

by altitude on Wed Jul 10, 2013 5:06 am

nice. I'm getting sucked back into the x0x world for some reason so I think u have a beta tester if you want one..

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

Re: New CPU Project

by antto on Wed Jul 10, 2013 5:53 am

yeah, the new bootloader has to be tested first, because that's the thing that should work solid in all cases
currently, it has been tested only by me, and it worked, but that's not enough
the stk500 part of it works, since that's what i use, and i will probably never use the sysex part myself (because my midi cables go elsewhere)

i haven't "published" the firmware anywhere yet, because it's still under construction (even that the most important features are already there) and i'm recompiling and reuploading it constantly
it'd be nice if you can join us at IRC
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)

antto
 
Posts: 1618
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Re: New CPU Project

by antto on Mon Jul 15, 2013 8:33 am

okay, two other people tested the sysex part of the bootloader
it appears to not work with those inexpensive USB-MIDI interfaces, but i guess they just generally have trouble working with sysex at all

otherwise, it works with "proper" interfaces, so i guess x0xb00t2.1 can be considered usable
it was tested on windows/osx/linux with different MIDI-sysex apps
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)

antto
 
Posts: 1618
Joined: Thu Apr 15, 2010 3:21 pm
Location: 127.0.0.1

Please be positive and constructive with your questions and comments.