Hi Stephane,

It is not every day that you see a negative overflow :).  What version of
gcc are you using?  I am not able to reproduce the issue with the following
gcc:

[ccollins@ccollins-mac:~/repos/apache/mynewt/core]$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc-arm-none-eabi/20140805/bin/../lib/gcc/arm-none-eabi/4.8.4/lto-wrapper
Target: arm-none-eabi
Configured with:
/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/src/gcc/configure
--target=arm-none-eabi
--prefix=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native
--libexecdir=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/lib
--infodir=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/share/doc/gcc-arm-none-eabi/info
--mandir=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/share/doc/gcc-arm-none-eabi/man
--htmldir=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/share/doc/gcc-arm-none-eabi/html
--pdfdir=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/share/doc/gcc-arm-none-eabi/pdf
--enable-languages=c,c++ --enable-plugins --disable-decimal-float
--disable-libffi --disable-libgomp --disable-libmudflap
--disable-libquadmath --disable-libssp --disable-libstdcxx-pch
--disable-nls --disable-shared --disable-threads --disable-tls
--with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes
--with-python-dir=share/gcc-arm-none-eabi
--with-sysroot=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/arm-none-eabi
--build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10
--with-gmp=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/host-libs/usr
--with-mpfr=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/host-libs/usr
--with-mpc=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/host-libs/usr
--with-isl=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/host-libs/usr
--with-cloog=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/host-libs/usr
--with-libelf=/Users/build/GCC-4-8-build/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/host-libs/usr
--with-host-libstdcxx='-static-libgcc -Wl,-lstdc++ -lm'
--with-pkgversion='GNU Tools for ARM Embedded Processors'
--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.8.4 20140725 (release) [ARM/embedded-4_8-branch revision
213147] (GNU Tools for ARM Embedded Processors)


On Tue, May 31, 2016 at 1:57 PM, Stephane D'Alu <[email protected]> wrote:

> I've just upgraded to 0.9.
>
> bleprph is working fine now.
>
> But I've got a problem compiling bletiny:
>
> targets/tiny
>     app=@apache-mynewt-core/apps/bletiny
>     bsp=@apache-mynewt-core/hw/bsp/nrf51dk
>     build_profile=optimized
>     cflags=-DDEVICE_NAME=TOTO
>
>
> Error: /usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/bin/ld:
> /home/sdalu/MyNewt/my_proj1/bin/tiny/apps/bletiny/bletiny.elf section
> `.ARM.exidx' will not fit in region `FLASH'
> /usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/bin/ld: region
> `FLASH' overflowed by -16 bytes
>
> Perhaps that's due to extra debugging before official release?
>
>
>
> On 05/31/2016 10:40 PM, chris collins wrote:
>
>> Hi Stephane,
>>
>> I'm trying these apps (mynewt_0_8_0_tag).
>>>
>>> When using bleprph, I'm not able to connect to the device
>>>
>>> 26436:[ts=25815936ssb, mod=4 level=1] host_hci_data_rx(): handle=1 pb=2
>>>
>> len=11 data=0x07 0x00 0x04 0x00 0x10 0x01 0x00 0xff 0xff 0x00 0x28
>>
>>> 31559:[ts=30818864ssb, mod=4 level=1] host_hci_data_rx(): handle=1 pb=2
>>>
>> len=11 data=0x07 0x00 0x04 0x00 0x10 0x01 0x00 0xff 0xff 0x00 0x28
>>
>>> 36681:[ts=35820816ssb, mod=4 level=1] Disconnection Complete: status=0
>>>
>> handle=1 reason=19
>>
>> I see James already pointed you to 0.9.0.  Here is some additional
>> information (mostly because I already wrote this mail before I saw
>> James's!)
>>
>> Unfortunately, the 0.8.0 version of bleprph is basically broken.  The
>> two relevant bugs are described in the 0.8.0 release notes
>> (
>>
>> https://cwiki.apache.org/confluence/display/MYNEWT/RN-0.8.0-incubating#RN-0.8.0-incubating-KnownIssues
>> ).
>> For BLE, I recommend just avoiding 0.8.0 entirely and using 0.9.0
>> instead.  0.9.0 is not released yet, but it is currently being voted on.
>> To use 0.9.0 before it becomes official, you will need do two things:
>>
>> 1. Make the following change to your project.yml file:
>>
>> FROM:
>>
>>      repository.apache-mynewt-core:
>>          type: github
>>          vers: 0-latest
>>          user: apache
>>          repo: incubator-mynewt-core
>>
>> TO:
>>
>>      repository.apache-mynewt-core:
>>          type: github
>>          vers: 0.9-latest
>>          user: apache
>>          repo: incubator-mynewt-core
>>
>> (change the "vers" field).
>>
>> 2. Upgrade your packages with "newt upgrade", e.g.,
>>
>>      [ccollins@iori:~/tmp/myproj]$ newt upgrade
>>      apache-mynewt-core
>>      Would you like to upgrade repository apache-mynewt-core from
>> 0.7.9-none
>> to 0.0.0-none ? [Yn] y
>>
>> When using bletiny, I can connect to the device, but can't bond to it, I
>>>
>> end up being disconnect and I'm not able to connect anymore.
>>
>>>
>>>
>>> 26672:[ts=26046848ssb, mod=4 level=1] host_hci_data_rx(): handle=1 pb=2
>>>
>> len=11 data=0x07 0x00 0x06 0x00 0x01 0x04 0x00 0x05 0x10 0x07 0x07
>>
>>> 26684:[ts=26058560ssb, mod=4 level=1] rx on unknown L2CAP channel: 6
>>> 26930:[ts=26298656ssb, mod=4 level=1] LE Connection Update Complete.
>>>
>> handle=1 itvl=6 latency=0 timeout=2000
>>
>>> 26939:connection updated; status=0 handle=1 peer_addr_type=0
>>>
>> peer_addr=0x2a:0xb0:0x76:0x7b:0x97:0x40 conn_itvl=6 conn_latency=0
>> supervision_timeout=2000
>>
>>> 57328:[ts=55983808ssb, mod=4 level=1] Disconnection Complete: status=0
>>>
>> handle=1 reason=19
>>
>>> 57335:connection down; status=7 handle=1 peer_addr_type=0
>>>
>> peer_addr=0x2a:0xb0:0x76:0x7b:0x97:0x40 conn_itvl=6 conn_latency=0
>> supervision_timeout=2000
>>
>> The issue here is that security is disabled by default in the 0.8.0
>> version of bletiny.  Again, the easiest solution here is to use 0.9.0.
>> If you would like to stick with 0.8.0, you can enable security by adding
>> the necessary symbol definitions to your Mynewt target definition.
>> This can be done via the newt tool or by editing your target's pkg.yml
>> file
>> directly.  To do it with the newt tool:
>>
>>      newt target set <target-name> cflags='-DBLE_LL_CFG_FEAT_LE_ENCRYPTION
>> -DNIMBLE_OPT_SM=1'
>>
>> Thanks,
>> Chris
>>
>>
>
> --
> Stephane D'Alu
>

Reply via email to