You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Jacob Rosenthal <ja...@gmail.com> on 2017/03/16 20:57:59 UTC

Target download pathing issues

Im seeing all sorts of errors with targets on my osx 10.12.3

Some targets cant find download script

Error: fork/exec /Users/jacobrosenthal/Downloads/xxx/repos/apache-
mynewt-core/hw/bsp/bbc_microbit/microbit_download.sh: no such file or
directory

and if I ls /Users/jacobrosenthal/Downloads/xxx/repos/apache-
mynewt-core/hw/bsp/bbc_microbit/microbit_download.sh the file is indeed
there..

Others have mangled errors, and cant seem to locate something within the
download script:

Target successfully built: targets/boot-nrf51dk-16kbram
Loading bootloader
: command not foundrosenthal/Downloads/chippd3/repos/apache-mynewt-core/hw/scripts/jlink.sh:
line 17:
/Users/jacobrosenthal/Downloads/xxx/repos/apache-
mynewt-core/hw/scripts/jlink.sh: line 18: /Users/jacobrosenthal/Downloads/c:
No such file or directorycore/hw/scripts/common.sh

Ive updated my newt tool develop and my repo to develop and cleaned and
rebuilt but its the same.

I went to another one of my projects that hasnt been updated lately with
core at b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e and that worked..

I git pulled origin develop and its broken.. so I started going back
through the commits and I got back to b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e
which is now also broken?!

I started logging in go and it seems like CORE_PATH is set correctly
Im running out of ideas of what the hell could have broken

Thanks!

Re: Target download pathing issues

Posted by Jacob Rosenthal <ja...@gmail.com>.
In trying to reproduce for Fabio in irc we realized I couldnt run newt
scripts at all

Jacobs-Air:newt jacobrosenthal$ ./build.sh

-bash: ./build.sh: /bin/sh^M: bad interpreter: No such file or directory


My line endings got windows-ed at some point

Jacobs-Air:apache-mynewt-core jacobrosenthal$ git config --global -l

....
core.autocrlf=true

I vaguely remember fighting some line ending issue aweek ago now..
Seemingly the go exec couldnt figure out the shell interpreter and reported
it as file not found

This fixed it

git config --global --unset core.autocrlf

Re: Target download pathing issues

Posted by Jacob Rosenthal <ja...@gmail.com>.
2017/03/16 15:07:17.896 [DEBUG] FEATURES=BASELIBC_PRESENT BLE_ACL_BUF_COUNT
BLE_ACL_BUF_SIZE BLE_ATT_SVR_FIND_INFO BLE_ATT_SVR_FIND_TYPE
BLE_ATT_SVR_INDICATE BLE_ATT_SVR_MAX_PREP_ENTRIES BLE_ATT_SVR_NOTIFY
BLE_ATT_SVR_QUEUED_WRITE BLE_ATT_SVR_QUEUED_WRITE_TMO BLE_ATT_SVR_READ
BLE_ATT_SVR_READ_BLOB BLE_ATT_SVR_READ_GROUP_TYPE BLE_ATT_SVR_READ_MULT
BLE_ATT_SVR_READ_TYPE BLE_ATT_SVR_SIGNED_WRITE BLE_ATT_SVR_WRITE
BLE_ATT_SVR_WRITE_NO_RSP BLE_DEVICE BLE_GATT_DISC_ALL_CHRS
BLE_GATT_DISC_ALL_DSCS BLE_GATT_DISC_ALL_SVCS BLE_GATT_DISC_CHR_UUID
BLE_GATT_DISC_SVC_UUID BLE_GATT_FIND_INC_SVCS BLE_GATT_INDICATE
BLE_GATT_MAX_PROCS BLE_GATT_NOTIFY BLE_GATT_READ BLE_GATT_READ_LONG
BLE_GATT_READ_MAX_ATTRS BLE_GATT_READ_MULT BLE_GATT_READ_UUID
BLE_GATT_RESUME_RATE BLE_GATT_SIGNED_WRITE BLE_GATT_WRITE
BLE_GATT_WRITE_LONG BLE_GATT_WRITE_MAX_ATTRS BLE_GATT_WRITE_NO_RSP
BLE_GATT_WRITE_RELIABLE BLE_HCI_EVT_BUF_SIZE BLE_HCI_EVT_HI_BUF_COUNT
BLE_HCI_EVT_LO_BUF_COUNT BLE_HOST BLE_HS_REQUIRE_OS BLE_L2CAP_JOIN_RX_FRAGS
BLE_L2CAP_MAX_CHANS BLE_L2CAP_RX_FRAG_TIMEOUT BLE_L2CAP_SIG_MAX_PROCS
BLE_LL_CFG_FEAT_DATA_LEN_EXT BLE_LL_CFG_FEAT_LE_PING
BLE_LL_CFG_FEAT_LL_PRIVACY BLE_LL_CFG_FEAT_SLAVE_INIT_FEAT_XCHG
BLE_LL_CONN_INIT_MAX_TX_BYTES BLE_LL_CONN_INIT_SLOTS BLE_LL_MASTER_SCA
BLE_LL_MAX_PKT_SIZE BLE_LL_MFRG_ID BLE_LL_OUR_SCA BLE_LL_RNG_BUFSIZE
BLE_LL_SUPP_MAX_RX_BYTES BLE_LL_SUPP_MAX_TX_BYTES BLE_MAX_CONNECTIONS
BLE_NUM_COMP_PKT_RATE BLE_ROLE_BROADCASTER BLE_ROLE_PERIPHERAL
BLE_RPA_TIMEOUT BLE_SM_IO_CAP BLE_SM_MAX_PROCS BLE_WHITELIST BSP_NRF51
CBORATTR_MAX_SIZE CONFIG_FCB CONFIG_FCB_FLASH_AREA CONFIG_FCB_MAGIC
CONFIG_NEWTMGR CONSOLE_BAUD CONSOLE_ECHO CONSOLE_FLOW_CONTROL
CONSOLE_RX_BUF_SIZE CONSOLE_TICKS CONSOLE_TX_BUF_SIZE FLASH_MAP_MAX_AREAS
IMGMGR_MAX_CHUNK_SIZE LOG_CONSOLE LOG_FCB LOG_LEVEL LOG_NEWTMGR
LOG_SOFT_RESET MCU_FLASH_MIN_WRITE_SIZE MSYS_1_BLOCK_COUNT
MSYS_1_BLOCK_SIZE OS_CPUTIME_FREQ OS_MAIN_STACK_SIZE OS_MAIN_TASK_PRIO
OS_SCHEDULING REBOOT_LOG_CONSOLE REBOOT_LOG_ENTRY_COUNT REBOOT_LOG_FCB
REBOOT_LOG_FLASH_AREA SANITY_INTERVAL SHELL_MAX_INPUT_LEN SHELL_TASK
SPI_0_MASTER_SS_PIN SPLIT_IMAGE STATS_NEWTMGR SYSINIT_CONSTRAIN_INIT
TIMER_0 UART_0 UART_0_PIN_CTS UART_0_PIN_RTS UART_0_PIN_RX UART_0_PIN_TX
WATCHDOG_INTERVAL XTAL_32768 FLASH_OFFSET=0x23800 IMAGE_SLOT=1
CORE_PATH=/Users/jacobrosenthal/Downloads/xxx/repos/apache-mynewt-core
BSP_PATH=/Users/jacobrosenthal/Downloads/xxx/repos/apache-mynewt-core/hw/bsp/nrf51dk-16kbram
BIN_BASENAME=/Users/jacobrosenthal/Downloads/xxx/bin/targets/split-nrf51dk-16kbram/app/apps/blesplit/blesplit
/Users/jacobrosenthal/Downloads/xxx/repos/apache-mynewt-core/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_download.sh
/Users/jacobrosenthal/Downloads/xxx/repos/apache-mynewt-core/hw/bsp/nrf51dk-16kbram
/Users/jacobrosenthal/Downloads/xxx/bin/targets/split-nrf51dk-16kbram/app/apps/blesplit/blesplit
: command not found.913 [DEBUG]
o=/Users/jacobrosenthal/Downloads/xxx/repos/apache-mynewt-core/hw/scripts/jlink.sh:
line 17:
/Users/jacobrosenthal/Downloads/xxx/repos/apache-mynewt-core/hw/scripts/jlink.sh:
line 18: /Users/jacobrosenthal/Downloads/xxx/rep: No such file or
directoryripts/common.sh

2017/03/16 15:07:17.913 [DEBUG] err=exit status 1
2017/03/16 15:07:17.913 [DEBUG] goroutine 1 [running]:
mynewt.apache.org/newt/newt/vendor/mynewt.apache.org/newt/util.NewNewtError(0xc420013080,
0x145, 0x145)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/vendor/mynewt.apache.org/newt/util/util.go:75
+0xec
mynewt.apache.org/newt/newt/vendor/mynewt.apache.org/newt/util.ShellCommandLimitDbgOutput(0xc420513a28,
0x3, 0x3, 0xc42034a080, 0x6, 0x8, 0xffffffffffffffff, 0x14c94d3, 0x11,
0xc420513978, ...)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/vendor/mynewt.apache.org/newt/util/util.go:314
+0x417
mynewt.apache.org/newt/newt/vendor/mynewt.apache.org/newt/util.ShellCommand(0xc420513a28,
0x3, 0x3, 0xc42034a080, 0x6, 0x8, 0x130, 0x8, 0x19004b0, 0x0, ...)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/vendor/mynewt.apache.org/newt/util/util.go:333
+0x76
mynewt.apache.org/newt/newt/builder.Load(0xc4202d4000, 0x64, 0xc4202e4240,
0xc420366540, 0x5, 0xc4204e0035)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/builder/load.go:89 +0x9c5
mynewt.apache.org/newt/newt/builder.(*Builder).Load(0xc420277110, 0x1, 0x0,
0x0, 0xc420466150, 0xc420466540)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/builder/load.go:143 +0x4b7
mynewt.apache.org/newt/newt/builder.(*TargetBuilder).Load(0xc4201def60,
0x0, 0x0, 0x0, 0x0)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/builder/load.go:43 +0x7e
mynewt.apache.org/newt/newt/cli.runRunCmd(0xc420123d40, 0xc420019da0, 0x2,
0x3)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/cli/run_cmds.go:76 +0x223
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc420123d40,
0xc420019bc0, 0x3, 0x3, 0xc420123d40, 0xc420019bc0)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636
+0x231
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420082fc0,
0xffffffffffffffff, 0x3, 0x14c0428)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722
+0x339
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420082fc0,
0x14c0428, 0x3)
/Users/jacobrosenthal/dev/go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681
+0x2b
main.main()
/Users/jacobrosenthal/dev/go/src/mynewt.apache.org/newt/newt/newt.go:170
+0x1b4

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.8rc2_2/libexec/src/runtime/asm_amd64.s:2197 +0x1

goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/Cellar/go/1.8rc2_2/libexec/src/runtime/sigqueue.go:116 +0xff
os/signal.loop()
/usr/local/Cellar/go/1.8rc2_2/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.1
/usr/local/Cellar/go/1.8rc2_2/libexec/src/os/signal/signal_unix.go:28 +0x41

: command not
foundrosenthal/Downloads/xxx/repos/apache-mynewt-core/hw/scripts/jlink.sh:
line 17:
/Users/jacobrosenthal/Downloads/xxx/repos/apache-mynewt-core/hw/scripts/jlink.sh:
line 18: /Users/jacobrosenthal/Downloads/xxx/rep: No such file or
directoryripts/common.sh

Jacobs-MacBook-Air:xxx jacobrosenthal$



RE Permissions, they look the same to me:

NOT WORKING:
Jacobs-MacBook-Air:xxx jacobrosenthal$ ls -al
repos/apache-mynewt-core/hw/scripts/common.sh
-rw-r--r--  1 jacobrosenthal  staff  1389 Mar 16 11:01
repos/apache-mynewt-core/hw/scripts/common.sh

Jacobs-MacBook-Air:xxx jacobrosenthal$ ls -al
repos/apache-mynewt-core/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_download.sh
-rwxr-xr-x  1 jacobrosenthal  staff  1549 Mar  4 12:33
repos/apache-mynewt-core/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_download.sh


WORKING:
Jacobs-MacBook-Air:yyy jacobrosenthal$ ls -al
repos/apache-mynewt-core/hw/scripts/common.sh
-rw-r--r--  1 jacobrosenthal  staff  1047 Jan 16 19:14
repos/apache-mynewt-core/hw/scripts/common.sh

Jacobs-MacBook-Air:yyy jacobrosenthal$ ls -al
repos/apache-mynewt-core/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_download.sh
-rwxr-xr-x  1 jacobrosenthal  staff  1549 Jan 16 19:14
repos/apache-mynewt-core/hw/bsp/nrf51dk-16kbram/nrf51dk-16kbram_download.sh







On Thu, Mar 16, 2017 at 2:56 PM, Fabio Utzig <ut...@utzig.org> wrote:

> Testing here it correctly prints out that it's impossible to execute...
>
> Maybe adding "-ldebug" to the newt load command might show some extra
> relevant info.
>
> On Thu, Mar 16, 2017, at 06:51 PM, Fabio Utzig wrote:
> > Are your scripts executable: chmod +x ?
> >
> > On Thu, Mar 16, 2017, at 05:57 PM, Jacob Rosenthal wrote:
> > > Im seeing all sorts of errors with targets on my osx 10.12.3
> > >
> > > Some targets cant find download script
> > >
> > > Error: fork/exec /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> > > mynewt-core/hw/bsp/bbc_microbit/microbit_download.sh: no such file or
> > > directory
> > >
> > > and if I ls /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> > > mynewt-core/hw/bsp/bbc_microbit/microbit_download.sh the file is
> indeed
> > > there..
> > >
> > > Others have mangled errors, and cant seem to locate something within
> the
> > > download script:
> > >
> > > Target successfully built: targets/boot-nrf51dk-16kbram
> > > Loading bootloader
> > > : command not
> > > foundrosenthal/Downloads/chippd3/repos/apache-mynewt-
> core/hw/scripts/jlink.sh:
> > > line 17:
> > > /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> > > mynewt-core/hw/scripts/jlink.sh: line 18:
> > > /Users/jacobrosenthal/Downloads/c:
> > > No such file or directorycore/hw/scripts/common.sh
> > >
> > > Ive updated my newt tool develop and my repo to develop and cleaned and
> > > rebuilt but its the same.
> > >
> > > I went to another one of my projects that hasnt been updated lately
> with
> > > core at b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e and that worked..
> > >
> > > I git pulled origin develop and its broken.. so I started going back
> > > through the commits and I got back to
> > > b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e
> > > which is now also broken?!
> > >
> > > I started logging in go and it seems like CORE_PATH is set correctly
> > > Im running out of ideas of what the hell could have broken
> > >
> > > Thanks!
>

Re: Target download pathing issues

Posted by Fabio Utzig <ut...@utzig.org>.
Testing here it correctly prints out that it's impossible to execute...

Maybe adding "-ldebug" to the newt load command might show some extra
relevant info.

On Thu, Mar 16, 2017, at 06:51 PM, Fabio Utzig wrote:
> Are your scripts executable: chmod +x ?
> 
> On Thu, Mar 16, 2017, at 05:57 PM, Jacob Rosenthal wrote:
> > Im seeing all sorts of errors with targets on my osx 10.12.3
> > 
> > Some targets cant find download script
> > 
> > Error: fork/exec /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> > mynewt-core/hw/bsp/bbc_microbit/microbit_download.sh: no such file or
> > directory
> > 
> > and if I ls /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> > mynewt-core/hw/bsp/bbc_microbit/microbit_download.sh the file is indeed
> > there..
> > 
> > Others have mangled errors, and cant seem to locate something within the
> > download script:
> > 
> > Target successfully built: targets/boot-nrf51dk-16kbram
> > Loading bootloader
> > : command not
> > foundrosenthal/Downloads/chippd3/repos/apache-mynewt-core/hw/scripts/jlink.sh:
> > line 17:
> > /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> > mynewt-core/hw/scripts/jlink.sh: line 18:
> > /Users/jacobrosenthal/Downloads/c:
> > No such file or directorycore/hw/scripts/common.sh
> > 
> > Ive updated my newt tool develop and my repo to develop and cleaned and
> > rebuilt but its the same.
> > 
> > I went to another one of my projects that hasnt been updated lately with
> > core at b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e and that worked..
> > 
> > I git pulled origin develop and its broken.. so I started going back
> > through the commits and I got back to
> > b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e
> > which is now also broken?!
> > 
> > I started logging in go and it seems like CORE_PATH is set correctly
> > Im running out of ideas of what the hell could have broken
> > 
> > Thanks!

Re: Target download pathing issues

Posted by Fabio Utzig <ut...@utzig.org>.
Are your scripts executable: chmod +x ?

On Thu, Mar 16, 2017, at 05:57 PM, Jacob Rosenthal wrote:
> Im seeing all sorts of errors with targets on my osx 10.12.3
> 
> Some targets cant find download script
> 
> Error: fork/exec /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> mynewt-core/hw/bsp/bbc_microbit/microbit_download.sh: no such file or
> directory
> 
> and if I ls /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> mynewt-core/hw/bsp/bbc_microbit/microbit_download.sh the file is indeed
> there..
> 
> Others have mangled errors, and cant seem to locate something within the
> download script:
> 
> Target successfully built: targets/boot-nrf51dk-16kbram
> Loading bootloader
> : command not
> foundrosenthal/Downloads/chippd3/repos/apache-mynewt-core/hw/scripts/jlink.sh:
> line 17:
> /Users/jacobrosenthal/Downloads/xxx/repos/apache-
> mynewt-core/hw/scripts/jlink.sh: line 18:
> /Users/jacobrosenthal/Downloads/c:
> No such file or directorycore/hw/scripts/common.sh
> 
> Ive updated my newt tool develop and my repo to develop and cleaned and
> rebuilt but its the same.
> 
> I went to another one of my projects that hasnt been updated lately with
> core at b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e and that worked..
> 
> I git pulled origin develop and its broken.. so I started going back
> through the commits and I got back to
> b3f9b9648f835e3d12f8f7d5a2d5724e31e5a08e
> which is now also broken?!
> 
> I started logging in go and it seems like CORE_PATH is set correctly
> Im running out of ideas of what the hell could have broken
> 
> Thanks!