Author Topic: [Fixed] Flashing the Bootloader in a Mac with Mavericks  (Read 49453 times)

Varthdader

  • Team member
  • *
  • Posts: 24
    • View Profile
[Fixed] Flashing the Bootloader in a Mac with Mavericks
« on: January 02, 2014, 05:09:10 PM »
Hi!

I read your interactions on flashing the Bootloader, and for a complete noob like me, it is not immediately clear what and how to have everything set up in my Mac.

I have X code, and downloaded Macports too. Installed both.
Guess Macports is not a windowed program, because I see no Macports Icon.

I downloaded latest dfu util, unzipped the .tar file, and now I am stuck as to how to install dfu util with Macports.

Another question is how you know what boot loader version you have in your PreenFM2.

The whole point for me upgrading the boot loader is to be able to manage my USB stick without having to open the case every time in case anyone wonders why a noob would want to mess with a bootloader!
« Last Edit: January 03, 2014, 06:33:39 PM by Xavier »

6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #1 on: January 02, 2014, 06:19:33 PM »
Do it with the Brew mechanism, it was dead easy.

http://brew.sh/index.html

Run the script.

Once it's all done

'brew install dfu-util'

Then run DFU util as per instructions.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2260
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #2 on: January 03, 2014, 12:10:24 PM »

Thanks 6581punk.
Yes it seems that installing dfu-util with brews is easier.

Varthdader, you don't need X-code to install a new firmware, and you should not have
And my documentation is not clear for OsX, you don't have to manually download dfu-util.
MacPorts or Brews will do it for you.

I haven't tried brews but from what i read :
The scipt to install is at the bottom of the brew page.
Open a terminal and copy and past :
Code: [Select]
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"Then
Code: [Select]
brew install dfu-util
The you should be able to run and dfu-util command.

Xavier

6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #3 on: January 03, 2014, 02:38:52 PM »
It does prompt you to install some command line utils which it downloads from Apple. So ensure you accept that and wait for it to finish installing before continuing with the command line script.

Varthdader

  • Team member
  • *
  • Posts: 24
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #4 on: January 03, 2014, 03:08:05 PM »
Thanks both Xavier and 6581punk for holding my hand through this.

Ok, first tried and I guess succeeded in installing macports.

Then after reading the first reply, went ahead and installed with the brew method.

I now see that I can enter the dfu-util commands in the terminal window.

I have shorted the JP3 and have connected only the usb from the PreenFM2 to my mac.

I only see blocks on the screen (must be the contrast or brightness) but I guess that is normal as per the description.

I don´t see the orange led flashing and the dfu-util does not list the device when I perform the dfu-util -l command. Nor does it perform the boot loader update with the command described in the instructions because it says there is no dfu device.

Any pointers as to where to go from here?

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2260
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #5 on: January 03, 2014, 03:23:08 PM »
I don´t see the orange led flashing

Normal because you used the JMP3 solution. The PreenFM2 direcly entered DFU mode.

and the dfu-util does not list the device when I perform the dfu-util -l command. Nor does it perform the boot loader update with the command described in the instructions because it says there is no dfu device.
Any pointers as to where to go from here?

Be sure your dfu-util version is at least 0.6.
If dfu-util does not see your device, it can be a problem from your internal PCB->CERB40 cable.

To know if your cable is OK, let me know if you have midi over usb working ? (must be enable in the setup).


6581punk

  • Team Member
  • ***
  • Posts: 110
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #6 on: January 03, 2014, 04:03:14 PM »
I had a bit of trouble with my own USB cable.

For flashing I connected a cable directly to the CERB.

Varthdader

  • Team member
  • *
  • Posts: 24
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #7 on: January 03, 2014, 04:09:06 PM »
My dfu-util is the latest, 0.7. It was downloaded yesterday.

I enabled and saved the option to USB midi in/out in the PreenFM2´s´menu.

Is there an easy way to test USB midi? Or directly test the cable?

I am not a big usb midi user. Mostly had this usb to DIN midi adapter for my synths. I do have a mac with Garageband if it is any use, and an iPhone with the usb accessory (which works ok with the usb to din adapter).

As an aside, I followed the JP3 way because that is how it is explained in the instructions. If there is another, easyer way, please do explain and I could try. Of course I would like to have a fully functional, usb-midi enabled PreenFM2 so I would like to fix my cable if it is faulty.

I am kinda in the dark when it comes to usb and flashing with the command line, so please be patient with me!

Varthdader

  • Team member
  • *
  • Posts: 24
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #8 on: January 03, 2014, 05:35:35 PM »
Ok, I just checked my internal usb cable and had soldered a terminal wrong (soldered terminals 2 and 4 instead of 3!)+

Now my Mac sees the dfu PreenFM2.

All I need now is to issue the dfu-util commands to flash the boot loader first and firmware second.

Problem is, the .cmd files in my download are set to popen in windows notepad (from my virtualised Windows install) and I have no clue how to just tell dfu-util to flash from the boot loader file I have.

From the instructions, it just says to "run install_bootloader.cmd from the firmware zip file", well I do not know how to do that...

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2260
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #9 on: January 03, 2014, 05:45:00 PM »
Good... One step furhter ;-)

When your PreenFM is visible in DFU mode with 'dfu-util -l'
You just have to copy and past the content of the cmd iles in your terminal.

Or copy the following :
Code: [Select]
dfu-util -a0 -d 0x0483:0xdf11 -D p2_boot_1.10.bin -R -s 0x8000000for the bootloader...

And :
Code: [Select]
dfu-util -a0 -d 0x0483:0xdf11 -D p2_09no.bin -R -s 0x8040000for the firmware.

Xavier

Varthdader

  • Team member
  • *
  • Posts: 24
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #10 on: January 03, 2014, 05:54:30 PM »
Thanks for all the patience!

Where should I have the respective .bin files? Because I tried this and the terminal says it can´t find the files.

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2260
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #11 on: January 03, 2014, 05:59:03 PM »
The link to the last firmware is at the top right of this page.
Direct download to the last firmware :
https://dl.dropboxusercontent.com/u/41654198/preenfm2/firmwares/pfm2_0.9n.zip
Unzip the file.

In the terminal, move to the directory where you extracted the files (using cd command).
Run the dfu-util commands from this directory.

Xavier



Varthdader

  • Team member
  • *
  • Posts: 24
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #12 on: January 03, 2014, 06:14:29 PM »
Ok, now this feels embarrassing, but I have close to zero terminal skills...

I managed to move to the appropriate directory, and flashed both boot loader and over clocked firmware!

My PreenFM2 now boots into the new firmware!

But, if I plug the usb cable to my Mac, I should be seeing the usb stick appear as removable media right?

I see no such thing, am I missing something?

Thanks!

Xavier

  • Administrator
  • Hero Member
  • *
  • Posts: 2260
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #13 on: January 03, 2014, 06:22:42 PM »

Congrats it's done  ;)

To enter bootloader, you must press one of the button while powering on the PreenFM.
Release the button when you see "BootLoader v1.10" on the LCD.
You have then several  choices :

1. Press "Eng"  and your USB stick will appear on your computer after a couple of second.
You can then copy the future firmware on the USB stick that way (copy them in the '/pfm2/' firmware).

2. Press 'Op' and you can select one of the firmware from the USB stick to flash.

So you won't have never agin to fight with dfu-util :-)


Xavier

Varthdader

  • Team member
  • *
  • Posts: 24
    • View Profile
Re: Flashing the Bootloader in a Mac with Mavericks
« Reply #14 on: January 03, 2014, 06:29:28 PM »
Super!

All is wonderful now!

I can see the usb stick in my Mac and also the beautiful orange led on the pcb finally lighted telling me I soldered it properly! :D

Thank you Xavier and also 6581punk for all the help!