You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/09/07 01:02:20 UTC

[jira] [Commented] (MYNEWT-362) If you try to load an image that doesn't exist, newt says it succeeds

    [ https://issues.apache.org/jira/browse/MYNEWT-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15469137#comment-15469137 ] 

ASF subversion and git services commented on MYNEWT-362:
--------------------------------------------------------

Commit 90a567cab07ec6ac7a4d16d5cf80c96202e9b0be in incubator-mynewt-core's branch refs/heads/develop from [~marko]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-mynewt-core.git;h=90a567c ]

MYNEWT-362; explicitly check whether file to download exists in download
scripts, and print slightly more useful error message.


> 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: Marko Kiiskila
>             Fix For: v1_0_0_beta1
>
>
> 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)