Help running espruino on the F401 Nucleo #5198
Replies: 1 comment
-
Posted at 2014-11-18 by @gfwilliams 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 Posted at 2014-11-18 by Rob A firmware update fixed both boards, thanks Gordon! Posted at 2014-11-18 by @gfwilliams Thanks for letting me know - I'll update the docs :) Posted at 2014-11-18 by asez73 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. Did you checked that you could flash some mbed simple blink program for this board? Just in case, I join the 1.72 latest version. This is exactly my last commit's result. 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:
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. Attachments: Posted at 2014-11-18 by asez73 Ok, I refreshed this thread a bit too late! 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. You should see something like this in a terminal.
Attachments: Posted at 2015-09-20 by Davie Hi all, Posted at 2015-09-20 by DrAzzy 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) Posted at 2015-09-21 by Davie Hi @drazzy, Posted at 2015-09-21 by @gfwilliams 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, 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 ;) Posted at 2015-09-21 by Davie Hi @gfwilliams, I've already bought an Espruino and a Pico and I love them :) Posted at 2015-09-21 by @gfwilliams Thanks! Does 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). Posted at 2015-10-17 by tve 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 Posted at 2015-10-17 by asez73 Hi @tve, the bin you flashed has nothing to do with espruino. It is a c code compiled from the mbed online environment! Posted at 2015-10-17 by tve I did a few more experiments: no
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. Posted at 2015-10-17 by asez73 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... Posted at 2015-10-17 by DrAzzy 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) Posted at 2015-10-17 by tve
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. Posted at 2015-10-17 by DrAzzy Windows. I think I had to update stlink firmware the first time to make it work Posted at 2015-10-17 by @gfwilliams I always thought it was a Posted at 2015-10-17 by dgustavus 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!). Posted at 2015-10-18 by tve Well, if it works for everyone but me, then that's OK. Posted at 2015-10-18 by DrAzzy Have you run the ST Link firmware update? Posted at 2015-10-18 by tve Yup, I have. This is what I get in the mounted drive's DETAILS.TXT file:
Posted at 2015-10-18 by asez73 @tve and others,
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). Now, if I read the know limitations and issues of the st-link firmware in DM00107009.pdf, I see:
So for now, I will use ST-link v3.7. It's quite annoying but it works. Posted at 2015-10-18 by asez73 And furthermore, mbed recompiled bin do flash correctly by drag and drop, while olders don't. Posted at 2015-10-18 by tve Ah, interesting constraints. Posted at 2015-10-18 by asez73 On the other hand, nucle0 boards are incredibly cheap and provide lots of connectivity... Posted at 2015-10-20 by @gfwilliams Hmm, interesting. Could you use a hex editor and write the first 8 bytes of a bin file that works and one that doesn't? If they're hex files, just the second line would be enough. This would be really frustrating. Flash memory is mapped to both 0x00000000 and 0x08000000 - so both addresses are valid. Espruino uses a reset vector at 0x00000000 because it sometimes produces smaller code, but it's possible that some idiot at ST has changed their bootloader so that you can ONLY upload code that runs from 0x08000000! Posted at 2015-10-20 by asez73 @gfwilliams, Posted at 2015-10-20 by asez73 So here are some hexdump of various files: Apparently, the code coming from mbed online compiler is different from the one obtained by @drazzy on the espruino build as it places the second vector at $08xxxxxx while espruino places it at 0x20xxxxxx.
Posted at 2015-10-20 by @gfwilliams Have you tried the proper Espruino build from the website download page? I just checked and it's:
Which is at least not a RAM address? It could just be that there's something up with @drazzy's builds? Posted at 2015-10-20 by asez73 Well, that one flashed correctly and run only through st-link, never by drag and drop. Screen capture with both @drazzy and official Espruino for NucleoF401RE board.
So it seams to be a problem just with those restrictions mentionned above by ST. Posted at 2015-10-20 by asez73 One more detail, the compiler doesn't work apparently with the Nucleo. Posted at 2015-10-20 by @gfwilliams It is probably because the IDE times out waiting for the @asez73 since you have a hex editor running, could you just:
Posted at 2015-10-20 by DrAzzy This is all going over my head. I know I have been able to flash working Espruino binaries via drag and drop. I don't see how my builds could be different - I think I'm using the same compiler version and build process as the official nucleo builds. Unless @gfwilliams changed the compiler version at some point? Basically, I have no clue how to fix my builds... Posted at 2015-10-20 by asez73 @gfwilliams, it worked. The official and "shifted to 0x80 8th byte" did flash immediatly by copy/paste to my D: drive. About the compiler there is an error message in the webide, I will look at it later, so far no problem. Attachments: Posted at 2015-10-20 by asez73 @drazzy, It also is a bit over my head... Posted at 2015-10-20 by asez73 @gfwilliams, the compiler emits an error message that looks like: Posted at 2015-10-20 by DrAzzy My script syncs the github repo and calls the usual build script - so it should come out the same as the official ones, I would think... Posted at 2015-10-21 by @gfwilliams @asez73 - yes, the compiler issue is because the Web IDE couldn't get into about the board (and why you get the rubbish in the console when you connect) - I'll have to increase the time it waits for a reply. @drazzy I'm not sure why your build would be different - it's actually pretty hard to believe. Things would have to be drastically different to relocate all that stuff into RAM - and it just wouldn't work. Posted at 2015-11-19 by weller confirming that st-flash works but not drag & drop details :
Posted at 2015-11-19 by @gfwilliams Thanks for letting me know... And your board came with that firmware on it as well? Posted at 2015-11-22 by weller No. Posted at 2015-11-29 by asez73 Hi all, Posted at 2015-11-30 by @gfwilliams Thanks - I've filed an issue for it now: espruino/Espruino#742 Posted at 2016-01-08 by ChrisZ Hi all; Posted at 2016-01-08 by DrAzzy The F401 builds are not built with USB support enabled, neither Gordon's nor my nightlies. I think the decision was made because the board did not break out the pins to a USB connector. You could try building the firmware yourself with that enabled though, and seeing if it worked. I downgrade the STLink firmware on my Nucleos so drag+drop works again. Posted at 2016-01-08 by ChrisZ DrAzzy Posted at 2016-01-09 by asez73 Hi @user6546, The various difficulties, mentionned above, are just about flashing Espruino on a Nucleo board. They do not impact the functionnalities under Espruino. That said, it could be interesting to have the usb available on this board as it is OTG on the STM32F4. Quite a lot of work actually, specially compared to the Pico beeing readily available. Posted at 2016-01-11 by @gfwilliams I'm not quite sure what you want to do, but it might well be easier to use an Espruino Pico and the Arduino Adaptor for it. But if you're just playing around, feel free - just don't expect it to be easy :) You'll definitely have to do your own builds, and getting USB working is often a complete pain. Posted at 2016-01-27 by ChrisZ Gordon Starting with a clean sheet of paper one could pair the Pico with a LinkIt Smart: http://www.seeedstudio.com/depot/LinkIt-Smart-7688-p-2573.html. The LinkIt is $15US and has double the RAM/Flash that the Yun does on the OpenWRT side. That combo of Pico analog IO and an Espruino package that runs on the OpenWRT side could truly be a "Yun killer". ChrisZ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2014-11-18 by Rob
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
Beta Was this translation helpful? Give feedback.
All reactions