expansionV3 + lopy4, P2 during RST



  • Hello,
    I have a expansion board V3.1 (with expansion31_0.0.11.dfu), with a Lopy4 plugged.
    We use visual code with PlatformIO, in C++ to develop and upload the firmware.

    I haave 2 questions:

    Actually, I have to connect P2 to GND to be able to upload.
    1 => Is there a way to update the LOPY4 firmware without any P2_to_GND manipulation ?
    2 => Is there a way to update the LOPY4 firmware without pushing RST physical button ?



  • @frecfrec said in expansionV3 + lopy4, P2 during RST:

    .\pycom-fwtool-cli.exe -p COM9 -s 115200 --pic flash -f .\firmware.bin

    finally done creating a tar.gz file containing:

    • firmware.bin (our firmware compiled with platformIO)
    • bootloader.bin (copied from a tar.gz sample)
    • partition.bin (copied from a tar.gz sample)

    sample used for bootload.bin and partition.bin:
    https://packages.hiveeyes.org/hiveeyes/foss/pycom/official/pybytes/LoPy4-1.20.2.rc3.tar.gz



  • @frecfrec You can probably use another mode that doesn't need a file (maybe reading the config block with cb?) and the --noexit to stay in firmware update mode, then use your usual flashing tool.

    Alternatively, you can use the copy command of the tool to write a .bin file (though I'm not quite sure what the partition parameter should be, it probably depends on what you .bin file actually contains -- you may want to backup existing partitions and compare with the firmware that you are supposed to already have on the device to find the right value).



  • Thank you for you answer, using windows10, I tried to flash using pycom-fwtool-cli,

    .\pycom-fwtool-cli.exe -p COM9 -s 115200 --pic flash -f .\firmware.bin
    output => You must either specifiy the tar[.gz] file or both the file and partition to flash
    

    but requested input is a .tar.gz and not a .bin file.
    PlatformIO generate .bin files for firmware.bin and partitions.bin

    I'm afraid to break my lopy4, putting those 2 files into a tar.gz file and testing it.

    Is it the right way to do it ?



  • @frecfrec I'm not sure that works with the expansion board (I believe it does with the 3.x versions which have a similar PIC to the PySense/PyTrack), but AFAIR the CLI update tool (pycom-fwtool-cli) should be able to instruct the PIC on the board to take the required steps to switch to firmware update mode. If it doesn't by default, you can add the --pic option.


Log in to reply
 

Pycom on Twitter