• Hello,

    I am writing an application on Pico but I use many libraries and I lack room in the Pico flash. Since the STM32F415RG is quite ideal for my application, I try to rebuild Espruino for this micro-controller.
    I have managed to recompile and flash the firmware. Of course, it doesn't work ;-)
    It seems fairly normal for a first attempt...
    Many topics are unclear to me. So I have some questions:

    • In the Espruino board file I noticed 'bootloader' : 1, on some boards this option is present on some others it isn't. I don't understand what it means exactly. Any clue ?
    • What does mean " 'speed' : 84" in the chip section ?
    • In the 'saved_code' section, I understand that it defines how the code once temporarily imported toRAM it is then copied to the flash; Is that correct ?
    • If above is right, the question is to copy code in pages which in case of STM32F415RG are not uniform (some 16k, 64k, 128 k). Could you advice me on the best way to use the flash pages structure ?
      Thanks a lot.
      Regards
      GeekBot



  • Hi,

    There is now Espruino WiFi which has more RAM and Flash available, so that could be an easy option ;)

    There are also some things you can do to get your code size down so it might fit into a Pico...

    But...

    • 'bootloader' : 1 uses the Espruino bootloader (which lets you update firmware over USB serial). I'd set this to 0 and upload code with ST-LINK or DFU as if you set it to 1 you have to compile your own bootloader too. If setting to 0 I'd start from a board.py of a file with bootloader:0 too as some addresses change
    • 'speed' : 84" it's the speed in MHz
    • Yes, saved_code allocates an area of flash where the contents of RAM can get saved to.

    Could you advice me on the best way to use the flash pages structure ?

    If you have lots of flash, just use a single large flash page at the end of memory. Anything else gets really difficult...

  • Just to add - USB on the F4 can be a bit hit or miss, so I'm not sure if you'll manage to get that working. It might be best sticking with UART.

  • Thank you very much Gordon,
    Espruino Wifi : I didn't know, very nice and interesting. I order one to test.

    Is the "speed" the frequency of the HSE ? I have set a 8 MHz xtal external, I guess the scripts calculate to clock configuration to reach the "speed" . Is that correct ?

    Last question, do you design custom cards on request ?

    Best regards
    GeekBot

  • The speed is actually the final clock frequency after the PLL (in fact it may only be used for documentation). It's not smart enough to work out the clock settings - those are still hard-coded in the STM32 peripheral library.

    And yes, I can do custom designs - I'm a bit busy with Puck.js at the moment, but early next year I should be able to do things for you.

    I guess the other option if you're only after one or two is to replace the chip with an STM32F412. They're new chips from ST with 256kB of RAM, but they should be (I think) pin compatible with the Pico/Wifi board - and compiling for them should be as easy as changing settings in BOARD.py for the Pico.

  • Thank you Gordon. I will come back to you when an opportunity rises.

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

Porting Espruino on STM32F415RG : questions on board file options

Posted by Avatar for GeekBot @GeekBot

Actions