On 05/31/2016 11:18 PM, chris collins wrote:
Hi Stephane,

It is not every day that you see a negative overflow :).  What version of
gcc are you using?

It's 4.8.4 20141219 (release) (4.8.4-1+11-1), on debian

$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-none-eabi/4.8/lto-wrapper
Target: arm-none-eabi
Configured with: ../gcc-4.8.4/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/lib/include' --mandir='/usr/lib/share/man' --infodir='/usr/lib/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libexecdir='/usr/lib/lib/gcc-arm-none-eabi' --disable-maintainer-mode --disable-dependency-tracking --enable-languages=c,c++ --prefix=/usr/lib --infodir=/usr/share/doc/gcc-arm-none-eabi/info --mandir=/usr/share/man --htmldir=/usr/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/share/doc/gcc-arm-none-eabi/pdf --bindir=/usr/bin --libexecdir=/usr/lib --libdir=/usr/lib --with-system-zlib --enable-multilib --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-libstdc++-v3 --disable-nls --disable-shared --disable-threads --disable-tls --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-none-eabi --with-gnu-as --with-gnu-ld --with-headers=no --without-newlib --with-pkgversion=4.8.4-1+11-1 --without-included-gettext --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r INHIBIT_LIBC_CFLAGS=-DUSE_TM_CLONE_REGISTRY=0 AR_FOR_TARGET=arm-none-eabi-ar AS_FOR_TARGET=arm-none-eabi-as LD_FOR_TARGET=arm-none-eabi-ld NM_FOR_TARGET=arm-none-eabi-nm OBJDUMP_FOR_TARGET=arm-none-eabi-objdump RANLIB_FOR_TARGET=arm-none-eabi-ranlib READELF_FOR_TARGET=arm-none-eabi-readelf STRIP_FOR_TARGET=arm-none-eabi-strip
Thread model: single
gcc version 4.8.4 20141219 (release) (4.8.4-1+11-1)



I've just tried on FreeBSD with gcc 5.3.1 20160307 (release),
and that's building fine.

$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-arm-embedded-5_3-2016q1-20160330/bin/../lib/gcc/arm-none-eabi/5.3.1/lto-wrapper
Target: arm-none-eabi
Configured with: /usr/obj/usr/ports/devel/gcc-arm-embedded/work/gcc-arm-none-eabi-5_3-2016q1-20160330/src/gcc/configure --target=arm-none-eabi --prefix=/usr/obj/usr/ports/devel/gcc-arm-embedded/work/install/gcc-arm-embedded-5_3-2016q1-20160330 --infodir=/usr/obj/usr/ports/devel/gcc-arm-embedded/work/install/gcc-arm-embedded-5_3-2016q1-20160330/share/doc/gcc-arm-none-eabi/info --mandir=/usr/obj/usr/ports/devel/gcc-arm-embedded/work/install/gcc-arm-embedded-5_3-2016q1-20160330/share/doc/gcc-arm-none-eabi/man --htmldir=/usr/obj/usr/ports/devel/gcc-arm-embedded/work/install/gcc-arm-embedded-5_3-2016q1-20160330/share/doc/gcc-arm-none-eabi/html --pdfdir=/usr/obj/usr/ports/devel/gcc-arm-embedded/work/install/gcc-arm-embedded-5_3-2016q1-20160330/share/doc/gcc-arm-none-eabi/pdf --libexecdir=/usr/obj/usr/ports/devel/gcc-arm-embedded/work/install/gcc-arm-embedded-5_3-2016q1-20160330/lib --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-isl=/usr/local --disable-isl-version-check --with-cloog=/usr/local --with-libelf=/usr/local --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=/usr/obj/usr/ports/devel/gcc-arm-embedded/work/install/gcc-arm-embedded-5_3-2016q1-20160330/arm-none-eabi --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r,armv8-m.base,armv8-m.main --with-pkgversion='GNU Tools for ARM Embedded Processors'
Thread model: single
gcc version 5.3.1 20160307 (release) [ARM/embedded-5-branch revision 234589] (GNU Tools for ARM Embedded Processors)



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




--
Stephane D'Alu

Reply via email to