preenfm Forum

PreenFM => preenfm2 and preenfm3 => Topic started by: solipsvs on April 06, 2015, 09:22:06 AM

Title: cerb40 flashing
Post by: solipsvs on April 06, 2015, 09:22:06 AM
gnu monks is down.  trying to flash my cerb40.  anyone have the files i need for winxp?
Title: Re: cerb40 flashing
Post by: solipsvs on April 06, 2015, 11:51:38 AM
ok i got dfu-util and command line utils from apple installed.  im stumped.  i think im supposed to have a directory on the thumb drive called pfm2 with the bootloader and firmware in it and when i try to CD over to that folder it says no such directory. 

i can also hook up USB to the cerb40 and flash directly right?  how do i do that?  i need it spelled out my apologies but i just dont ever do this or anything remotely similar...  the instructions are like french to me.  no pun intended.  well ok pun intended  ;D.  i only speak english

when i plugged the unit into my xp machine it wanted a driver so that means it works right?

also, when i plug usb or 9v power into the unit and the jmp3 is not closed, the LED lights light up dimly.  is this a bad sign?  the screen has never come on once yet.  i wish there was another indication that something was working.
Title: Re: cerb40 flashing
Post by: Xavier on April 06, 2015, 09:04:23 PM
Hi,

Please try to make it clear... you're hard to follow .  :o
You read this page right ?
http://ixox.fr/preenfm2/build-it/burn-firmware/
Looks like dfu-util moved to http://dfu-util.sourceforge.net/
I just updated the page with correct links.


ok i got dfu-util and command line utils from apple installed.  im stumped.  i think im supposed to have a directory on the thumb drive called pfm2 with the bootloader and firmware in it and when i try to CD over to that folder it says no such directory. 

OK so you flashed it with the dfu-util command ? 
Did 'dfu-util -l' list any device ?
Did the dfu-util show a progress bar while flashing ?
You flashed both firmware and bootlader ?


i can also hook up USB to the cerb40 and flash directly right?  how do i do that?  i need it spelled out my apologies but i just dont ever do this or anything remotely similar...  the instructions are like french to me.  no pun intended.  well ok pun intended  ;D.  i only speak english

When flashing the CERB40 for the first time, you don't have any choice.
Put on JMP3 and plug the CERB40 directly to your computer with a mini-USB cable....

when i plugged the unit into my xp machine it wanted a driver so that means it works right?

I would say that's rather a good sign.

also, when i plug usb or 9v power into the unit and the jmp3 is not closed, the LED lights light up dimly.  is this a bad sign?  the screen has never come on once yet.  i wish there was another indication that something was working.

Yes if it makes some sounds, it works  :)
Do you hear a small pop when switching on ?
Any picture of your PCB both side, to see if anything is OK with the Display.... What display do you use ?

Xavier
Title: Re: cerb40 flashing
Post by: solipsvs on April 06, 2015, 11:58:08 PM
display is OLED

nothing has been flashed.  i need step by step instructions.

Quote
2. MacOS X

dfu-util is available from MacPort or brews.

MacPort : Install MacPort. With Macport install dfu-util and you’re ready to run the dfu-util command.

Breaws : run the installation command at the bootom of the brews home page… Then ‘brews install dfu-util’.

Boot microcontroller in DFU mode.

    Have you preenFM unpluged
    Shortcut the Jmp3 connection.
    Power up with the USB connector
    Nothing on the LCD is normal. The STM32F4 is in DFU mode.

Downlad the last PreenFM2 firmwares from the download page.

Then  goto 4 to run the commands.

it says download firmware...  but to where?

dfu-util -l lists UNKNOWN, @Device Feature, @OTP Memory, @Option Bytes, @Internal Flash

so im sorry, did you say you need to directly hook up the cerb40 to the computer from its USB port?  ok did that.  still when i run "dfu-util -a0 -d 0x0483:0xdf11 -D p2_boot_1.10.bin -R -s 0x8000000" it says "could not open file p2_boot_1.10.bin for reading:  No such file or directory"

what format does the thumb drive need?  fat32 or fat16?

also, should these files be in /pfm2/ or some other direcory?

thanks

(https://dl.dropboxusercontent.com/u/123999/20150406_170948.jpg)

(https://dl.dropboxusercontent.com/u/123999/20150406_171122.jpg)

(https://dl.dropboxusercontent.com/u/123999/20150406_171158.jpg)
Title: Re: cerb40 flashing
Post by: solipsvs on April 07, 2015, 01:56:11 AM
ok im about to look kinda stupid here (again?) and ask:  bootloader...  does it reside on the computer or the cerb40?  bootloader is what i need to load the firmware?  i know the firmware resides on the cerb40.  bootloader is what looks for firmware in /pfm2? 

when i run "dfu-util -a0 -d 0x0483:0xdf11 -D p2_boot_1.10.bin -R -s 0x8000000" it says "could not open file p2_boot_1.10.bin for reading:  No such file or directory"  is this because the cerb40 cant find the thumb drive?
Title: Re: cerb40 flashing
Post by: solipsvs on April 07, 2015, 02:03:02 AM
looking at my soldering close up i see it looks sloppy haha can you tell its my first?
Title: Re: cerb40 flashing
Post by: Xavier on April 07, 2015, 10:04:32 AM
You flash the firmware and bootlader from your computer to the CERB40... the USB drive has nothing to do at this point. The USB drive can be accessed by the CERB40 when the bootloader and firmware are flashed.

when i run "dfu-util -a0 -d 0x0483:0xdf11 -D p2_boot_1.10.bin -R -s 0x8000000" it says "could not open file p2_boot_1.10.bin for reading:  No such file or directory"  is this because the cerb40 cant find the thumb drive?

OK... here your computer (which runs the dfu-util command) cannot find the bootloader you're trying to flash.
I assume you downloaded a zip file... "pfm2_1.06.zip" ?
Where is it ? in your "Download" folder ? You have to unzip it...

Here is an exemple of command list you should enter :
> cd
> cd Downloads
> unzip pfm2_1.06.zip
> cd build
> ls p2_boot_1.11.bin
[Check you don't have error and that your bootloader is in the current directory]
> dfu-util -a0 -d 0x0483:0xdf11 -D p2_boot_1.11.bin -s 0x8000000
.....
> dfu-util -a0 -d 0x0483:0xdf11 -D p2_106o.bin -s 0x8040000
.....


Once both booloader and firmware are flashed.. Unplug the preenfm2, remove JM3 and plug it back.
You screen should not be black anymore.

Let me know,

Xavier
Title: Re: cerb40 flashing
Post by: Xavier on April 07, 2015, 10:08:24 AM

Just noticed that... Those 2 pins are not connected ? Right ?
(They must not).
Title: Re: cerb40 flashing
Post by: solipsvs on April 07, 2015, 03:44:51 PM
ok that worked.  thank you!

i now have a screen that says '2'

tuned it off and on again and this is what the screen shows

(https://dl.dropboxusercontent.com/u/123999/20150407_094734.jpg)

off and on again and it shows nothing on the screen

what next?
Title: Re: cerb40 flashing
Post by: solipsvs on April 07, 2015, 03:52:00 PM
now when i plug it in the LEDs flash but nothing on the screen.
Title: Re: cerb40 flashing
Post by: solipsvs on April 07, 2015, 03:56:15 PM
ok i got it to do this:

looks korean or something

(https://dl.dropboxusercontent.com/u/123999/20150407_095318.jpg)
Title: Re: cerb40 flashing
Post by: solipsvs on April 07, 2015, 04:01:52 PM
ok seems like nonsense on the screen now.  its never the same.
Title: Re: cerb40 flashing
Post by: Xavier on April 07, 2015, 05:33:22 PM
ok seems like nonsense on the screen now.  its never the same.

This happens when there are soldering problems with the screen.
Check the soldering points on your 16 pins header on the PCB and on the header on the OLED.
Title: Re: cerb40 flashing
Post by: solipsvs on April 07, 2015, 06:05:59 PM
doh!  i figured it was something like this.  can you tell im a soldering pro?  :)
Title: Re: cerb40 flashing
Post by: lokki on August 04, 2015, 03:01:48 PM
just to bring this up since i had the same problem...

it does not have to be bad soldering. if you have hooked up the preenfm2 to a usb port for power, try a different computer.

when i had hooked up my preenfm2 to a macbook air, i got flaky display issues (writing from right to left, only row one and three, nothing, scrolling text all over the display...) i soldered headers again and checked continuity with the multimeter. the issue stayed. at one point i switched the usb connector to my macbook pro, and voila! it worked perfectly! seems the macbook air had not enough "current" for the preenfm2....
Title: Re: cerb40 flashing
Post by: solipsvs on November 23, 2015, 11:32:43 AM
xavier,

do i need something in these 3 places for an oled to work? 

'RV1' is not in the step by step instructions.  i opened my other preenfm2 up and it has one.  its also using an oled.  the PCB seems to be another color though, perhaps an older revision?

thanks

(https://dl.dropboxusercontent.com/u/123999/20151123_052434.jpg)
Title: Re: cerb40 flashing
Post by: Xavier on November 23, 2015, 12:07:58 PM

The 2 resistors are only usefull when you use a LCD.
But does not hurt at all with an OLED.

The third one is a external connector that would allow to read voltage (connected to ADC) if it was used. But it's not :) So also useless.

Best


Title: Re: cerb40 flashing
Post by: solipsvs on November 23, 2015, 01:49:35 PM
cool.  i figured out what the problem was.  i accidentally destroyed a trace so i jumped it.  works great now.  thanks!
Title: Re: cerb40 flashing
Post by: pauto on December 27, 2015, 01:03:13 PM
Hi, I have just build the preen and I am trying to flash the cerb40 with no succes, I try to follow the steps but I am totally lost.

I am using Macbook with Mavericks, and I had downloaded and installed dfu util with brews, now when I plug the preen with the jump3 conected and run the bootloader command it says that

Last login: Sun Dec 27 12:42:15 on ttys001
MacBook-Pro-de-pau:~ pau$ /Users/pau/Desktop/bootloader/install_bootloader.cmd ; exit;
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

dfu-util: Could not open file p2_boot_1.11.bin for reading: No such file or directory
logout

[Proceso completado]

I also tried to take out the cerb40 and plug it directly to the computer with mini usb but same message, what am I doing wrong?

I soldered the mini-usb according this http://i.imgur.com/RqPxH1ih.jpg is that right?

As said before if I disconnect jump3 the leds are working so I suppose I did no mistake with the soldering.

Hope someone can help me out!!

Cheers!!



Title: Re: cerb40 flashing
Post by: Xavier on December 27, 2015, 07:13:54 PM
Hi,

You execute the install_bootloader.cmp from an other folder, so it does not find the firmware file.
Instead of :
> /Users/pau/Desktop/bootloader/install_bootloader.cmd ; exit;
Try
> cd /Users/pau/Desktop/bootloader/
> install_bootloader.cmd

Soldering the CERB40 mini USB cable is explained at the bottom of this page :
http://ixox.fr/preenfm2/build-it/the-pcb/

Best,

Xavier
Title: Re: cerb40 flashing
Post by: pauto on December 28, 2015, 10:37:44 AM
It's a bit weird but without changing anything, just the place where "bootloader" folder was I managed to install the bootloader, the most weird is that I had allready checked that before and did not work but all is good, now I have a working PreenFM unit  :)

Thanks!!!