Problem making firmware for Espruinoboard

Posted on
  • Firmware created on my ubuntu server does not work on board.
    After flashing from local drive with IDE and reset, all 3 LED are on, and serial port is not found.
    Flashing a binary from Espruino/com/binaries, same way, works fine.
    My make runs this way, there is no error:

    cd /home/nodejs/efeu/espruino/EspruinoRelea­se/
    export PATH=/home/nodejs/efeu/tools/gcc-arm-non­e-eabi-8-2018-q4-major/bin:$PATH
    make clean 
    RELEASE=1 BOARD=ESPRUINOBOARD make >tmp/Espruino/log/stdout 2>tmp/Espruino/log/stderr

    Comparing binaries there is a difference in size.
    Mine(espruino_2v08_espruino_1r3) has 214KB and "yours" from binaries folder has 224 KB

    Any idea, whats going wrong on my side?
    Make for ESP32 works fine, looks like something wrong with my installation for ARM ?

  • That's odd - looks like you have the right compiler.

    • This is the RELEASE_2V08 tag, or current Git master?
    • How are you flashing? If you do a build as you have done, it builds the firmware but not the bootloader. Flashing via the IDE should work fine (as it doesn't overwrite the bootloader) but if you flash via DFU or SWD then it'll just overwrite the bootloader with zeros and it won't work.

    There's a script scripts/ which creates the bootloader and main firmware and merges them.

  • I used RELEASE_2V08.
    Anyway, with edge I've same problem.
    Both are downloaded yesterday this way:

    git clone -b RELEASE_2V08­ EspruinoRelease
    git clone­ EspruinoEdge

    Flashing is done with IDE from local file.

    To avoid misunderstanding on my side for using the script. I did

    • cd to script folder
    • add path for compiler to $PATH
    • startet the script
      Now I've a file espruino_file.bin, size is 225 kb
      Would it be correct to flash this file with IDE ?
  • Tested firmware created with script on Espruino Board from first Kickstarter campaign.
    It works fine with latest release and with edge from github. Size of binary also matches those from your binaries folder
    My problem is to create my own firmware.
    Looks like I've to write a script to combine my firmware with bootloader. Something similiar to your

  • Ahh! Right, I know the problem.


    That's the case for Pico, WiFi, and Original.

  • Great, PAD_FOR_BOOTLLOADER made it.

    Oops, just found one more define in yml-file, DFU_UPDATE_BUILD=1
    Pretty sure, this too will be needed for some boards

  • DFU_UPDATE_BUILD=1 is for nRF52 - it's basically whether you get a hex file (for SWD upload) or a ZIP (for use with the bootloader).

    Probably these two should be merged - there's no reason we couldn't do the same tricks we do for nRF52 (to allow building the bootloader first) with STM32

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

Problem making firmware for Espruinoboard

Posted by Avatar for JumJum @JumJum