Uploaded image for project: 'Mynewt'
  1. Mynewt
  2. MYNEWT-362

If you try to load an image that doesn't exist, newt says it succeeds

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • v0_9_0
    • v1_0_0_beta1
    • Newt
    • Security Level: Public (Viewable by anyone)
    • None
    • Ubuntu 14.10 using the Docker version of newt

    Description

      This is pretty crazy:

      $ newt -v -l DEBUG load bleprph
      ...
      one J-Link settings file: none ------Target related settings------ Target device: nRF52 Target interface: SWD Target interface speed: 4000kHz Target endian: little Connecting to J-Link... J-Link is connected. Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 5 2016 08:42:09 Hardware: V1.00 S/N: 682889134 Checking target voltage... Target voltage: 3.30 V Listening on TCP/IP port 3333 Connecting to target...Connected to target Waiting for GDB connection...Connected to 127.0.0.1 Reading all registers Read 4 bytes @ address 0x000058C8 (Data = 0xF3BFBE00) 0x000058c8 in ?? () .gdb_cmds:3: Error in sourced command file: /workspace/bin/bleprph/apps/bleprph/bleprph.img: No such file or directory. (gdb) quit A debugging session is active. Inferior 1 [Remote target] will be killed. Quit anyway? (y or n) [answered Y; input not from terminal] GDB closed TCP/IP connection Restoring target state and closing J-Link connection... Shutting down...
      
      Successfully loaded image.
      

      I think this is a result of trying to parse the human-readable output of GDB rather than using the proper interface. It's error-prone and not reliable. In this case you grep for "not found" when the actual error is "no such file or directory". The fix is to use GDB/MI.

      But the whole shell-script thing needs to be changed anyway so perhaps it is best to just patch the grep for now and save GDB/MI for when the download scripts aren't written in Bash.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Kiiskila
              timmmm Tim
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: