Re: Error "The filename or extension is too long." while building a split image app

2018-03-18 Thread Christopher Collins
On Sun, Mar 18, 2018 at 09:26:19PM -0400, Abderrezak Mekkaoui wrote:
> Hi Chris.
> The result of the build with -ldebug can be found here:
> 
> https://www.dropbox.com/s/o749a6x6xjvva6t/clvrt_ess_split.log?dl=0

Darn... it seems Windows 7+ limits the command line length to 32767
characters [1].  The objcopy command that elicits the error is 80819
characters long, well in excess of the maximum.

Normally, the objcopy command isn't so massive.  However, as this
particular target is a split image, newt needs to specify which symbols
go in which image (loader or app).  Newt does this by explicitly
specifying each symbol to keep using the `-K ` syntax.

This is a tricky problem.  I'm afraid I don't know of a workaround,
other than building in a non-Windows environment.

I have filed this issue in github:
https://github.com/apache/mynewt-newt/issues/149.  Thanks for the
report.

Chris

[1] https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553


Correction: Synthesized LF CLOCK with the nrf52840

2018-03-18 Thread Abderrezak Mekkaoui

Hi Andrzej,
A correction: the app does work by setting BLE_XTAL_SETTLE_TIME: 0 as 
you suggested.

The problem I was dealing with has nothing to do with mynewt per se. My bad.
Kind regards

Abderrezak


On 3/15/2018 11:46 AM, Abderrezak Mekkaoui wrote:


Hi Andrzej,

Thank you for your answer. That's what I did first but it did not 
work. I have an app that runs as expected using the default LF CLOCK,  
the XTAL_32768 used.
When I switch the LF CLOCK  to  XTAL_32768_SYNTH, the app advertises 
correctly. When I try to connect, the app disconnects after a few 
seconds of trying.

I have appended below a typical log.
I am using the nordic nrf52840 preview kit in preparation of testing a 
board that does not have an LF crystal. Right now I would like to 
evaluate quickly
both the LF RC based CLK and the synthesized CLK. In one of my use 
cases, power is not important and the device is always ON. My 
instincts tells me that the
synthesized clock is a better choice (as stable as the HF clk) and 
should have worked out of the box. Any thoughts on what  I could be 
doing wrong?
Playing around with BLE_LL_OUR_SCA, BLE_LL_MASTER_SCA and 
BLE_XTAL_SETTLE_TIME did not help. On the phone side I am using the 
nordic app (nRF Connect on android)

Best regards
Abderrezak






LOG AT START OF THE MYNEWT APP:

00 [ts=0ssb, mod=64 level=1]  BLE_PHY_MAX_PWR_DBM = 10
01 [ts=7812ssb, mod=64 level=1]  tx_pwr_lvl =8
02 [ts=15624ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x03 
ocf=0x0003 len=0

04 [ts=31248ssb, mod=4 level=0] 0x03 0x0c 0x00
06 [ts=46872ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x3 ocf=0x3 status=0
08 [ts=62496ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x03 
ocf=0x0001 len=8
10 [ts=78120ssb, mod=4 level=0] 0x01 0x0c 0x08 0x90 0x80 0x00 0x02 
0x00 0x00 0x00 0x20
12 [ts=93744ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x3 ocf=0x1 status=0
15 [ts=117180ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x03 
ocf=0x0063 len=8
17 [ts=132804ssb, mod=4 level=0] 0x63 0x0c 0x08 0x00 0x00 0x80 
0x00 0x00 0x00 0x00 0x00
19 [ts=148428ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x3 ocf=0x63 status=0
21 [ts=164052ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x0001 len=8
23 [ts=179676ssb, mod=4 level=0] 0x01 0x20 0x08 0x7f 0x1a 0x0f 
0x00 0x00 0x00 0x00 0x00
26 [ts=203112ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x8 ocf=0x1 status=0
28 [ts=218736ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x0002 len=0

30 [ts=234360ssb, mod=4 level=0] 0x02 0x20 0x00
32 [ts=249984ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x8 ocf=0x2 status=0
34 [ts=265608ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x0003 len=0

36 [ts=281232ssb, mod=4 level=0] 0x03 0x20 0x00
38 [ts=296856ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x8 ocf=0x3 status=0
40 [ts=312480ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x04 
ocf=0x0009 len=0

42 [ts=328104ssb, mod=4 level=0] 0x09 0x10 0x00
44 [ts=343728ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x4 ocf=0x9 status=0 bd_addr=ff:22:33:aa:bb:ff
46 [ts=359352ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x002d len=1

49 [ts=382788ssb, mod=4 level=0] 0x2d 0x20 0x01 0x00
50 [ts=390600ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x8 ocf=0x2d status=0
52 [ts=406224ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x0029 len=0

55 [ts=429660ssb, mod=4 level=0] 0x29 0x20 0x00
56 [ts=437472ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x8 ocf=0x29 status=0
58 [ts=453096ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x002d len=1

61 [ts=476532ssb, mod=4 level=0] 0x2d 0x20 0x01 0x01
62 [ts=484344ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x8 ocf=0x2d status=0
65 [ts=507780ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x0027 len=39
67 [ts=523404ssb, mod=4 level=0] 0x27 0x20 0x27 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0xef 0x8d 0xe2 0x16 0x4f 0xec 0x43 0x0d 0xbf 0x5b 
0xdd 0x34 0xc0 0x53 0x1e 0xb8 0xef 0x8d 0xe2 0x16 0x4f 0xec 0x43 0x0d 
0xbf 0x5b 0xdd 0x34 0xc0 0x53 0x1e 0xb8
73 [ts=570276ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x8 ocf=0x27 status=0
75 [ts=585900ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x004e len=8
78 [ts=609336ssb, mod=4 level=0] 0x4e 0x20 0x08 0x00 0x00 0x00 
0x00 0x00 0x00 0x00 0x01
80 [ts=624960ssb, mod=4 level=0] Command complete: cmd_pkts=1 
ogf=0x8 ocf=0x4e status=0

82 [ts=640584ssb, mod=4 level=0] looking up peer sec;
84 [ts=656208ssb, mod=64 level=1]  BLE_PHY_MAX_PWR_DBM =10
86 [ts=671832ssb, mod=64 level=1]  tx_pwr_lvl =8
87 [ts=679644ssb, mod=4 level=0] ble_hs_hci_cmd_send: ogf=0x08 
ocf=0x0008 len=32
89 [ts=695268ssb, mod=4 level=0] 0x08 0x20 0x20 0x19 0x02 

Re: Error "The filename or extension is too long." while building a split image app

2018-03-18 Thread Abderrezak Mekkaoui

Hi Chris.
The result of the build with -ldebug can be found here:

https://www.dropbox.com/s/o749a6x6xjvva6t/clvrt_ess_split.log?dl=0

Thanks
Abderrezak



On 3/18/2018 7:16 PM, Christopher Collins wrote:

Hi Abderrezak,

Could you try building again with the `-ldebug` switch?  Please include
the output in a follow up.

Thanks,
Chris

On Sun, Mar 18, 2018 at 05:05:40PM -0400, Abderrezak Mekkaoui wrote:

Hi All,

I was following the tutorial to build a split image application. The
process got stalled with the following error:



...
Generating ROM elf
Error: fork/exec C:\Program Files (x86)\GNU Tools ARM Embedded\7.0
2017q4\bin\arm-none-eabi-objcopy.exe: The filename or extension is too long.



I am suing mingw64 on windows 10 machine.

Any help is appreciated.

Best regards
Abderrezak





Re: Error "The filename or extension is too long." while building a split image app

2018-03-18 Thread Christopher Collins
Hi Abderrezak,

Could you try building again with the `-ldebug` switch?  Please include
the output in a follow up.

Thanks,
Chris

On Sun, Mar 18, 2018 at 05:05:40PM -0400, Abderrezak Mekkaoui wrote:
> Hi All,
> 
> I was following the tutorial to build a split image application. The 
> process got stalled with the following error:
> 
> 
> 
> ...
> Generating ROM elf
> Error: fork/exec C:\Program Files (x86)\GNU Tools ARM Embedded\7.0 
> 2017q4\bin\arm-none-eabi-objcopy.exe: The filename or extension is too long.
> 
> 
> 
> I am suing mingw64 on windows 10 machine.
> 
> Any help is appreciated.
> 
> Best regards
> Abderrezak
> 


Error "The filename or extension is too long." while building a split image app

2018-03-18 Thread Abderrezak Mekkaoui

Hi All,

I was following the tutorial to build a split image application. The 
process got stalled with the following error:




...
Generating ROM elf
Error: fork/exec C:\Program Files (x86)\GNU Tools ARM Embedded\7.0 
2017q4\bin\arm-none-eabi-objcopy.exe: The filename or extension is too long.




I am suing mingw64 on windows 10 machine.

Any help is appreciated.

Best regards
Abderrezak