This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

bootloader does not work if compiled using armgcc

Hello!

SDK 15.3

If I build secure_bootloader example project using Segger Embedded Studio it works, I can see it nRF connect.

If I build it using armgcc it does not work and I can not attach Ozone debugger to it.

The only change I did to project is disabled `#ifdef NRF_DFU_DEBUG_VERSION ` check in  `dfu_public_key.c`

The sequence:

Fullscreen
1
2
3
4
5
6
7
8
9
cd sdk/examples/dfu/secure_bootloader/pca10040_ble/armgcc
make
make erase
make flash_softdevice
make flash
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

GCC:

Fullscreen
1
2
3
4
5
6
7
8
> arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-none-eabi/7.1.0/lto-wrapper
Target: arm-none-eabi
Configured with: ../gcc-7.1.0/configure --prefix=/usr --mandir=/usr/share/man --with-pkgversion='Fedora 7.1.0-5.fc27' --with-bugurl=https://bugzilla.redhat.com/ --infodir=/usr/share/info --target=arm-none-eabi --enable-interwork --enable-multilib --with-python-dir=share/arm-none-eabi/gcc-7.1.0/python --with-multilib-list=rmprofile --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 --enable-languages=c,c++ --with-newlib --disable-nls --disable-shared --disable-threads --with-gnu-as --with-gnu-ld --with-gmp --with-mpfr --with-mpc --with-headers=yes --with-system-zlib --with-sysroot=/usr/arm-none-eabi
Thread model: single
gcc version 7.1.0 (Fedora 7.1.0-5.fc27)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

But also tried `gcc version 8.2.1 20181213 (release) [gcc-8-branch revision 267074] (GNU Tools for Arm Embedded Processors 8-2018-q4-major)` with the same result.

If I flash it using procedure above and then attach debugger from SES, I see:

Fullscreen
1
Unknown function at 0xFFFFFFFE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Need assistance