Help running espruino on the F401 Nucleo

Posted on
Page
of 3
/ 3
Last Next
  • Hi all,

    I was hoping I could get some help with running espruino on the nucleo.
    My setup is a mac with the web IDE which I can successfully use with my espruino board.

    I've tried this setup with 2 nucleo boards with the v171 bin file dropped on them, but see very erratic communications.
    The IDE always connects, but I get odd characters and can rarely type more than a few characters into the terminal before it seems to get stuck. Baud rate is set to 9600.

    I have got slightly further (a few more characters before stopping) using a terminal instead of the IDE.

    Are there any caveats or gotchas which are known for the nucleo?

    Cheers,

    Rob

  • It's possible it's some problem to do with the firmware on the board itself (not just Espruino). There are some firmware updates for the Nucleo that it might be worth installing.

    Looks like there may also be some problems with Yosemite

  • A firmware update fixed both boards, thanks Gordon!

  • Thanks for letting me know - I'll update the docs :)

  • Hello,

    I have no problem with Espruino on Nucleo-F401RE board from Ubuntu 14.04 LTS.

    I did upgraded its firmware but this has to be done from Windows 8.1.
    So the instructions from ST and mbed worked very well and there is no need for Windows once you upgraded your board.

    Did you checked that you could flash some mbed simple blink program for this board?
    This is a good way to isolate any potential Espruino interpreter problem from st-link connection / flashing problems.
    I for once have been unable to flash Espruino and solved this by flashing a simple blink program.

    Just in case, I join the 1.72 latest version. This is exactly my last commit's result.
    It does solve the last details I had in 1.71: a few, really just 1, characters in the input buffer after reset() or load(). It never was a problem such as you describe.

    Now that I think of it, from time to time, I have a problem while flashing Espruino on Nucleo: it doesn't reset properly and the board never takes any keystroke from console, if it ever wants to connect. Usually, this happens when I forgot to disconnect the webIDE or gtkterm before flashing the Nucleo. It even happens with mbed .bin.

    The flashing operation, when pasting a .bin file to the NUCLEO directory, gives this:

    1. the green/red led flashes for a few, 4-6, seconds,
    2. there is a 1/2 second pause,
    3. the green/red led flashes again for a few, 4-6, seconds,
    4. then there is a wait of 2-3 seconds
    5. then the small green led LD2 (just under the RESET button see page 50/56) emits a shiny green flash which means OK, this sometimes doesn't happen and this is where I have problems
    6. Then the reg/green led flashes again 1-2 seconds and ends up with beeing red
    7. the board reboots.

    If, at point 5 above, LD2 doesn't flash, I wait until the reboot, disconnect the usb cable, reconnect it and just reflash the same .bin and things go well.


    1 Attachment

  • Ok, I refreshed this thread a bit too late!
    Yet, in doubt...

    Here is a simple mbed .bin which connects to the console at 9600, N, 8, 1, displays the current Nucleo RTC time and blinks LD2 every 2 seconds.
    Try to flash this and check in a terminal to see if you have any driver/configuration problem independently of Espruino itself.

    You should see something like this in a terminal.
    Date and time are not correct!

    Time as a basic string = Mon Dec 16 10:11:42 2013
    Time as a basic string = Mon Dec 16 10:11:43 2013
    Time as a basic string = Mon Dec 16 10:11:44 2013
    Time as a basic string = Mon Dec 16 10:11:45 2013
    Time as a basic string = Mon Dec 16 10:11:47 2013
    Time as a basic string = Mon Dec 16 10:11:48 2013
    Time as a basic string = Mon Dec 16 10:11:49 2013
    Time as a basic string = Mon Dec 16 10:11:50 2013
    Time as a basic string = Mon Dec 16 10:11:51 2013
    Time as a basic string = Mon Dec 16 10:11:52 2013
    Time as a basic string = Mon Dec 16 10:11:53 2013
    Time as a basic string = Mon Dec 16 10:11:54 2013
    Time as a basic string = Mon Dec 16 10:11:55 2013
    Time as a basic string = Mon Dec 16 10:11:56 2013


    1 Attachment

  • Hi all,
    Do you know if the F401RE is still supported by espruino???
    Because I've tried to load the espruino bin using the procedure described in http://www.espruino.com/Other+Boards
    but when I upload the file on the flash memory it doesn't load the program (the led doesn't blink) even if the file is in the flash memory.
    Have you ever had this issue?
    My firmware version is V2J24M11.
    Thank you.

  • The NucleoF401RE should absolutely still be working

    What build is it that's not working?

    There are the builds from the main site, and my nightly builds ( http://drazzy.com/e/espruino - do note the bit about the version numbering change - the newest version isn't on top, but it will be once Gordon releases v81 and commits a post-v81 change)

  • Hi @DrAzzy,
    I tried your builds as well without success ( espruino_1v80_06-03_nucleof401re.bin ).
    I've also tried to upload some binaries from mbed.org and they run fine (Nucleo_display_time_NUCLEO_F401RE.bin as well).
    Is there a way to look some logs on this board?
    Could this be a problem in the permissions of the binary ( I'm using Ubuntu/Debian)?

  • Just tried the 1v80 build from the website/zip (this one) on a Nucleo F401 board and it works fine for me (on Ubuntu). When hitting reset, D2 flashes once very very briefly - you then have to connect at 9600 baud (the default for the Web IDE).

    Just a quick poke, but if you bought a proper Espruino board you wouldn't have these problems - you'd also be supporting our work ;)

  • Hi @Gordon,
    I didn't press the reset button ... now I can connect to the serial at 9600 baud but I cannot see the espruino logo and when I type the commands I don't receive any response.
    Could it be a problem with the board itself?

    I've already bought an Espruino and a Pico and I love them :)
    I was wondering if I could use espruino and the webIDE ( much better that mbed.org ) to develop for bigger projects (the NUCLEO is a really bad ass board).

  • Thanks! Does D2 flicker after you release the button?

    It could be your board uses a different oscillator and so runs at a different speed - see [this post](http://forum.espruino.com/conversations/­258669/ - however I thought all new Nucleo boards were the same (and worked fine).

  • I just got a Nucleo F411 board and I can't get any of the Espruino bins to work. I've tried espruino_1v81.37_nucleof411re.bin, espruino_1v81.55_nucleof411re.bin, espruino_1v81.70_nucleof411re.bin, and espruino_1v81_nucleof411re.bin
    When I drag the bin onto the Nucleo drive nothing happens. When I try the Nucleo_display_time_NUCLEO_F401RE.bin posted by asez73 a few posts above I see the flashing activity and then the firmware runs great and I can see the output in a terminal window. Are the Espruino builds all broken? Is there some secret sauce? How can I troubleshoot this?
    I'm using Windows 7 and have updated the ST-LINKv2_1 firmware as well as the nucleo firmware.

  • Hi @tve, the bin you flashed has nothing to do with espruino. It is a c code compiled from the mbed online environment!
    I just have an f401 so I 'll test this today.
    Unfortunately I can't rebuild espruino now...

  • I did a few more experiments: no espruino_1v*_nucleof411re.bin that I've found or built works when dragging on top of the mass storage drive, whether on windows 7 or on linux. No espruino_1v*_nucleof401re.bin works either. The above Nucleo_display_time_NUCLEO_F401RE.bin works great when dragged onto the mass storage drive on windows (didn't try linux), so the hook-up of the board works. Also, I built a espruino_1v81.68_nucleof411re.bin and that works great when flashed using texane st-flash, so the binary is OK, and the board hook-up works, but copying it to the mass storage drive without making any change to the set-up is a no-go.
    The bottom line is that the mass storage drive just doesn't like espruino.

    Hi @tve, the bin you flashed has nothing to do with espruino. It is a c code compiled from the mbed online environment!

    Yeah, I know, the point was to determine that the board, its hook-up, and the mass storage driver all work when presented with a bin file they like.

  • In fact, it was meant to help understanding some problems with the nucleo's rtc: some boards don't have all of the circuitry to run at full speed. Clearly a fault of st...
    About the nucleo, it doesn't need the bootloader as the original espruino boards do.
    That's a consequence of the mbed side which implies really bear metal bins, so it could be it.
    The nucleo has an integrated st-link with its own separate stm32 and that's what is being updated in the St designed firmware. This one also provides all the USB enumerated devices: serial link, flash drive and ocd functionality.

  • My f411 nighties work for me.

    See my f401 nightly page for notes on what you need to do to make 401 work at the right speed - it's just a jumper you need to connect.

    (Phone sent, hence no links)

  • My f411 nighties work for me.

    You are dragging the .bin to the mass storage drive? Which OS are you using?

    NB: I don't have an f401, I was just trying those binaries to see whether any flashing activity would occur.

  • Windows. I think I had to update stlink firmware the first time to make it work

  • I always thought it was a .hex file you had to drag in, but I could be wrong?

  • I have been using the 1v81 official release for the f411 without problems on my Nucleo F411 board. In order to test I just placed the espruino_1v81.23_nucleof411re.bin file (drag and drop with file manager) on the USB file system (debian jessie). The led1 on the board edge turned green (no flashing). I powered off the board, then back on, and the led1 is red. Ran the WebIDE and it connects fine and shows 1v81.23 as it should. I do not see any problem.

    Hope this helps (and @tve thanks for the esp-link!).

  • Well, if it works for everyone but me, then that's OK.

  • Have you run the ST Link firmware update?

  • Yup, I have. This is what I get in the mounted drive's DETAILS.TXT file:

    $ cat /mnt/DETAILS.TXT
    Version: 0221
    Build:   Apr 29 2015 13:11:12
    
  • @tve and others,
    ST has changed quite a number of things and I now have some problems too.
    They are also mentionned here.
    What I did, on a NucleoF401RE, was to update:

    1. the usb drivers
    2. the firmware

    Before doing this, I could flash my nucleo with no problem. Espruino run just as usual with just a recurrent problem with Serial4 beeing undefined. That on Espruino's side!

    After doing so, I just can't flash any file by drag and drop: it is just copied, apparently, on the usb flash drive but in fact nothing happens... And the reset() just confirmed that in a terminal (putty).
    To flash any bin, I had to use ST-link to the latest version.

    Now, if I read the know limitations and issues of the st-link firmware in DM00107009.pdf, I see:

    Applications programmed through the Mass Storage interface (drag & drop to disk)
    must fulfill both following constraints. Applications not respecting one of these constraints, will not be programmed in this way (but could be programmed through any
    other tool, such as ST-LinkUtility):
    – a Stack Pointer value (first entry of the vector table) in the range of the
    microcontroller RAM range
    – a Reset vector value (second entry of vector table) in the range of the
    microcontroller flash range

    So for now, I will use ST-link v3.7. It's quite annoying but it works.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Help running espruino on the F401 Nucleo

Posted by Avatar for Rob @Rob

Actions