This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can't flash. Merge.hex error.

Hi, all!

After updating all libs can't flash. Have this error:
Tested also with asset_tracker sample.

Using runner: nrfjprog
nrfjprog --ids
Flashing file: /home/ilya/projects/ncs/asset_tracker/build/zephyr/merged.hex
nrfjprog --program /home/ilya/projects/ncs/asset_tracker/build/zephyr/merged.hex -f NRF91 --snr 960092785 --sectorerase
Parsing hex file.
ERROR: The file specified could not be found.
ERROR: command exited with status 51: nrfjprog --program /home/ilya/projects/ncs/asset_tracker/build/zephyr/merged.hex -f NRF91 --snr 960092785 --sectorerase



Parents
  • Hi.

    ERROR: The file specified could not be found.

     Are you sure that the file is located in the path you specified?

    Best regards,

    Andreas

  • Hi, Andreas.

    There is no file merged.hex 
    I think it must be file zephyr.hex as always. But now it is trying to flash merged.hex.

  • Hi.

    Which branch are you using? The master branch?

    Best regards,

    Andreas

  • I am seeing the same thing. On master branch.

    It looks like CMakeCache is showing this path

    //Path to merged image in Intel Hex format
    ZEPHYR_RUNNER_CONFIG_KERNEL_HEX:STRING=C:/PROJECTCODE/ncs/nrf/applications/asset_tracker/build/zephyr/merged.hex

    Here is what happens when I issue flash command

    C:\PROJECTCODE\ncs\nrf\applications\asset_tracker\build>ninja flash
    [141/147] Linking C executable zephyr\zephyr_prebuilt.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      169608 B       992 KB     16.70%
                SRAM:       54416 B       128 KB     41.52%
            IDT_LIST:         120 B         2 KB      5.86%
    [146/147] Flashing nrf9160_pca10090ns
    Using runner: nrfjprog
    Flashing file: C:/PROJECTCODE/ncs/nrf/applications/asset_tracker/build/zephyr/merged.hex
    Parsing hex file.
    ERROR: The file specified could not be found.
    ERROR: command exited with status 51: nrfjprog --program C:/PROJECTCODE/ncs/nrf/applications/asset_tracker/build/zephyr/merged.hex -f NRF91 --snr 960072328 --sectorerase

    Traceback (most recent call last):
      File "C:\PROJECTCODE\ncs\.west\west\src\west\main.py", line 580, in main
        args.handler(args, unknown)
      File "C:\PROJECTCODE\ncs\.west\west\src\west\main.py", line 332, in ext_command_handler
        command.run(*west_parser.parse_known_args(argv))
      File "C:\PROJECTCODE\ncs\.west\west\src\west\commands\command.py", line 90, in run
        self.do_run(args, unknown)
      File "c:\projectcode\ncs\zephyr\scripts\west_commands\flash.py", line 32, in do_run
        'ZEPHYR_BOARD_FLASH_RUNNER')
      File "C:\PROJECTCODE\ncs\zephyr\scripts/west_commands\run_common.py", line 228, in do_run_common
        runner.run(command_name)
      File "C:\PROJECTCODE\ncs\zephyr\scripts/west_commands\runners\core.py", line 407, in run
        self.do_run(command, **kwargs)
      File "C:\PROJECTCODE\ncs\zephyr\scripts/west_commands\runners\nrfjprog.py", line 128, in do_run
        self.check_call(cmd)
      File "C:\PROJECTCODE\ncs\zephyr\scripts/west_commands\runners\core.py", line 466, in check_call
        subprocess.check_call(cmd)
      File "c:\python37\lib\subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['nrfjprog', '--program', 'C:/PROJECTCODE/ncs/nrf/applications/asset_tracker/build/zephyr/merged.hex', '-f', 'NRF91', '--snr', '960072328', '--sectorerase']' returned non-zero exit status 51.

  • Hi.

    Sorry for the late reply. We've had Easter holiday in Norway from the 17th - 23rd.

    Could you try to do this checkout:

    git chekcout 08b3d508

    For the ncs/nrf folder.

    Note: I'm out of office today traveling.

    Best regards,

    Andreas

  • That works. Why does that one work?

    If I checkout master it does not work.

    Also, FYI, the process I used after this checkout is to go to ncs folder and wet update

    then to set the toolchain variatnt and the toolchain path

    then to go to ncs\zephy and run sephyr-env.cmd

    then I build.

Reply Children
No Data
Related