Espruino on RISC-V Silicon

Posted on
  • In last weeks I have been working on Espruino for HiFive1. JavaScript running directly on a microcontroller with RISC-V architecture! That’s it! I am happy to share my port of Espruino to SiFive HiFive1 dev Board.
    I also made some material about it:

    YouTube with an "Explanation" and some examples running in HiFive1:

    An article with almost the same material of the video but with the plus: of not having to see my face and hear my horrible English:­4/espruino-on-risc-v-silicon/


    I hope it will be useful to the community.

  • I watched the video, and took a first look to your github.
    Great to see, what can be done with Espruino, good job !
    According to board file you started with 300vars, may be this could be extended to 500 ?
    Any idea about speed ? A simple for-next loop could give a first idea.

  • That's great! Looks like it was a pretty smooth port too - just requiring that tweak to jsnative.c

    I'm a bit unsure about pulling this code directly into the main Espruino repo for the moment though - I've been trying not to add support for new platforms because what usually happens (eg. with the Atmel SAM2x port) is a proof of concept gets merged and then the port just sits in Espruino's source, completely unmaintained.

    I really wish you wouldn't remove the Espruino is Open Source. Our work is supported only by sales of official boards and donations line though - it's frustrating for everyone that's worked on Espruino for the last 6 1/2 years when you spent 15 days on the port and think that suddenly none of that matters any more.

  • Hi JumJum,

    I will do the tests and share the results here after Christmas!

  • Hi Gordon,

    I understand your position, I will keep it in my Github, and will continue the work on it, but also depend on the feedback and use of the community.

    Sorry about the donations message, it was not my intention depreciate anyone work, I will remove the HFIVE1 from the list that not show the message in the next RC.

  • It's been a while since this posting, and only now that I've been doing some benchmark testing. The results have left me very upset, about 23s to execute the simple-loop @ 256Mhz. Something is not right ...

  • I merged with v2.04 and fixed the donation message

  • Thanks! Do you have an example of the code that's running slowly?

    Espruino itself doesn't execute particularly quickly, but if you're running a build without RELEASE=1 then loads of assertions get left in which really kill performance.

  • I am using the "benchmark/ simple_loop.js"
    I will try a build with RELEASE=1

  • This is good stuff Matheus ...

  • I'm off topic here, but maybe you know the answer: the FE310 runs pretty damn high clock speed, but has only 16k ram. Feels slightly mismatched. Is there an external memory option, or what's the idea?

  • I recently got a SiPeed Maixduino with RISC-V with Kendryte K210 cpu

    Can you give me some pointer on how to port the Espruino to the K210 cpu ??


  • Well, it's been a while huh. Apologies for the delay. I simply used the toolchain provided by the manufacturer and ported it, take a look at the github branch.

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

Espruino on RISC-V Silicon

Posted by Avatar for matheuscastello @matheuscastello