Does anyone know the way to upload programs and banks to the dev board eeprom directly, without popping chips in and out, on a Mac via USB?
I'm setting up development on a resource-constrained MacBook Air. Virtual Machine is not completely happy running on it, so would like to get the full chain working in OSX. asfv1/disfv1 is fine for me.
At present, I'm using the Spin board. Would prefer, if possible, to load my assembled hex (or binary) direct to the eeprom with usb for a good workflow. I've not quite figured out how to do this.
Many thanks. I read the thread on development on Mac, but didn't this exact question addressed. Cheers.
Writing to Dev Bd EEPROM with Mac
Moderator: frank
-
- Posts: 7
- Joined: Sat Sep 20, 2014 12:01 am
- Location: Hua Hin, Thailand
Writing to Dev Bd EEPROM with Mac
Just a little eMusic hacking on the old Malay Peninsula
Re: Writing to Dev Bd EEPROM with Mac
If you can find a working firmware upload tool for the Spin development board, you could then use python+libusb to upload your programs. I've done that before - however you'll need to fetch a copy of the board firmware. In linux it works likes this:
1: program the developer board
> cycfx2prog -id=AAAA.BBBB spindev.hex run
where AAAA and BBBB are the usb vid/pid of your board. In my case it was 04B4.8613.
Now the onboard cycfx2 is running the Spin developer board code, you can read/write it in python.
dev = usb.core.find(idVendor=0xAAAA, idProduct=0xBBBB)
dev.set_configuration()
dev.ctrl_transfer(0x40, 0xa4, 0, 0)
dev.ctrl_transfer(0xC0, 0xa4,0,0,1)
dev.ctrl_transfer(0x40, 0xb2, 0, 0, [0x00])
dev.ctrl_transfer(0xC0, 0xa9,0,0,1)
dev.ctrl_transfer(0x40, 0xa9, 0, 0, ob, 4000) # write ob to device
ret = dev.ctrl_transfer(0xC0, 0xa9,0,0,4096) # read back eeprom for verify
It's probably going to be easier to get an I2C programmig tool, break the pins out and write the eeprom directly.
I'd much prefer to make a new firmware for the dev board so the cycfx2 presents the host system with a class-compliant USB-FS and a virtual FAT filesystem, then you could assemble direct into the eeprom without any need for drivers or special tools. There's an interesting open project
1: program the developer board
> cycfx2prog -id=AAAA.BBBB spindev.hex run
where AAAA and BBBB are the usb vid/pid of your board. In my case it was 04B4.8613.
Now the onboard cycfx2 is running the Spin developer board code, you can read/write it in python.
dev = usb.core.find(idVendor=0xAAAA, idProduct=0xBBBB)
dev.set_configuration()
dev.ctrl_transfer(0x40, 0xa4, 0, 0)
dev.ctrl_transfer(0xC0, 0xa4,0,0,1)
dev.ctrl_transfer(0x40, 0xb2, 0, 0, [0x00])
dev.ctrl_transfer(0xC0, 0xa9,0,0,1)
dev.ctrl_transfer(0x40, 0xa9, 0, 0, ob, 4000) # write ob to device
ret = dev.ctrl_transfer(0xC0, 0xa9,0,0,4096) # read back eeprom for verify
It's probably going to be easier to get an I2C programmig tool, break the pins out and write the eeprom directly.
I'd much prefer to make a new firmware for the dev board so the cycfx2 presents the host system with a class-compliant USB-FS and a virtual FAT filesystem, then you could assemble direct into the eeprom without any need for drivers or special tools. There's an interesting open project
-
- Posts: 7
- Joined: Sat Sep 20, 2014 12:01 am
- Location: Hua Hin, Thailand
Re: Writing to Dev Bd EEPROM with Mac
55 (That's Thai for 'lol')
Yes, I think option (b) sounds like the ticket.
(c) would be great. Let me know when you have that working...
Yes, I think option (b) sounds like the ticket.
(c) would be great. Let me know when you have that working...
Just a little eMusic hacking on the old Malay Peninsula
-
- Posts: 7
- Joined: Sat Sep 20, 2014 12:01 am
- Location: Hua Hin, Thailand
Re: Writing to Dev Bd EEPROM with Mac
... or we could write an FV-1 emulation running on ARM Cortex & cut out the middle 'noid.
Just a little eMusic hacking on the old Malay Peninsula