Tim created MYNEWT-362:
--------------------------
Summary: If you try to load an image that doesn't exist, newt says
it succeeds
Key: MYNEWT-362
URL: https://issues.apache.org/jira/browse/MYNEWT-362
Project: Mynewt
Issue Type: Bug
Components: Newt
Affects Versions: v0_9_0
Environment: Ubuntu 14.10 using the Docker version of newt
Reporter: Tim
Assignee: Sterling Hughes
This is pretty crazy:
{code}
$ 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.
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)