• I've cloned the Espruino repository with the intention of contributing to the JavaScript implementation (in as far as I can wrap my head around C). I've got an Espruino board, so I'm running make with ESPRUINO_1V3=1.

    I am on commit e4677650181132e9f883df9fbfeb4d4d3d60d3e9­ when I'm doing all this. My machine is running Ubuntu 12.04 and I've installed all the compiler bits as far as I'm aware. (gcc, arm-none-eabi-gcc, and another one which name escapes me right now.)

    My full make command:

    ESPRUINO_1V3=1 BOARDNAME=1 make
    

    I haven't exported any other env variables prior to running make.

    Make exits with these last few lines, and an exit code of 0 (I think):

    LD espruino_1v54_espruino_1r3.elf
    GEN espruino_1v54_espruino_1r3.lst
    GEN espruino_1v54_espruino_1r3.bin
    bash scripts/check_size.sh espruino_1v54_espruino_1r3.bin
    PASS - size of 214252 is under 215040 bytes 
    

    Here's a full dump of make's output.

    Then, I'm running the loader:

    BOOT0=1 BOOT1=0 python scripts/stm32loader.py -k -p /dev/ttyACM0 -evw espruino_1v54_espruino_1r3.bin
    

    Which outputs:

    Reading data from espruino_1v54_espruino_1r3.bin
    Traceback (most recent call last):
      File "scripts/stm32loader.py", line 525, in <module>
        bootversion = cmd.cmdGet()
      File "scripts/stm32loader.py", line 140, in cmdGet
        if self.cmdGeneric(0x00):
      File "scripts/stm32loader.py", line 137, in cmdGeneric
        return self._wait_for_ack(hex(cmd))
      File "scripts/stm32loader.py", line 101, in _wait_for_ack
        raise CmdException("Unrecognised response 0x%x to %s" % (ask, info))
    __main__.CmdException: Unrecognised response 0x72 to 0x0
    

    Is there something wrong with the build, or the problem purely in loading it onto the board? I'd appreciate any pointers.

  • Looks like your board isn't in bootloader mode? Hold down BTN1 and then press and release RST - the blue LED should start glowing and then you can flash it.

    BUT you actually need to write to a different address (0x08002800 - because of the bootloader).

    It's best just to run:

    ESPRUINO_1V3=1 make serialflash
    

    And that will automatically call the correct command.

  • Amazing, after all that troubleshooting to get make working, I failed to realize I should probably set the board to bootloader mode. That command worked great @Gordon, thanks much!

    I'm getting all the more excited about the Espruino project and its potential after seeing your dedication to it. I didn't quite expect a forum reply that late at night. :)

  • No problem :) I just happened to see the post when I went to turn the PC off - always glad to help, especially if you're planning on contributing back ;)

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

stm32loader.py fails with a .bin compiled on my machine

Posted by Avatar for MichD @MichD

Actions