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

Combined BT and serial Bootloader for S132

The existing Development Environment:
- nRF52832
- SDK 11
- Softdevic S132
- Eclipse

Project Status:
- Nearly finished with working OTA - bootloader

Existing Bootloader:
- Based on SDK11: ../examples/dfu/bootloader/pca10040/dual-bank_ble

Goal:
- Combined serial and OTA - bootloder

Questions:
1. Does there exists a solution for a combined bootloader?
2. Is it in principle possible to integrate a combined boot booader into the limited Boot Flash area?
3. Which existing serial bootloaders from which SDK are recommented for finding a fast and save solution.

   

Parents
  • Hi Hung,
    many thanks for your answer, which had unfortunately not the content I hoped to hear.
    Anyway.  The SDK15 .../examples/dfu - folder contains a lot of examples.
    And because that it is difficult with the experiences of SDK11 to make a decision.
    1. Exists there a general description of all examples 
    2. What is the principle difference of projects without and and with the extension "_debug"
    3. Which versions are suitable for nordic tools for serial DFU

    Frank

  • Hi Frank, 

     

    I found an error in my last reply. 

    2. You can always expand the bootloader by moving the start address the bootloader down in the flash. And increase the max size of it. 

    Regarding your new questions:

    1. "Exists there a general description of all examples " I don't understand this. Are you asking for the documentation ?  

    2. The project with "_debug" will skip the version checking, and log printing is enabled. 

    3. We have the tools to do DFU for any version. Is there any particular reason you want to use SDK v11 ? If you are using NRF52 chip , we would suggest you to start with SDK v15. 

    I have a small guide about DFU here that you may want to try. 

  • Hi Hung,
    many thanks for your answer.
    Meantime I could install nrfutil. The correct installation of pip
    in a linux system with existing but never used python costs a lot of time.
    #3
    The application and the BT-bootloader were developed under SDK11
    with GCC and Eclipse.
    Regarding your proposal I loaded a DFU - project from SDK15 but failed
    during the execution of make, although the pathes in

    nRF5_SDK_15.0.0_a53641a/components/toolchain/gcc/Makefile.posix

    were adapted to the existing GCC environment:

    GNU_INSTALL_ROOT := /home/frank/gcc-arm-none-eabi-4_9-2015q3
    GNU_VERSION := 4.9.3
    GNU_PREFIX := arm-none-eabi

    This works well with SDK11 examples but not with SDK.....15 examples.

    With SDK15 examples the execution of make leads to the following error message:

    frank@frank-tux ~/nordic/nRF5_SDK_15.0.0_a53641a/examples/dfu/secure_bootloader/pca10040_uart_debug/armgcc $ make
    make: /home/frank/gcc-arm-none-eabi-4_9-2015q3arm-none-eabi-gcc: Befehl nicht gefunden
    Cannot find: '/home/frank/gcc-arm-none-eabi-4_9-2015q3arm-none-eabi-gcc'.
    Please set values in: "/home/frank/nordic/nRF5_SDK_15.0.0_a53641a/components/toolchain/gcc/Makefile.posix"
    according to the actual configuration of your system.
    ../../../../../components/toolchain/gcc/Makefile.common:129: *** Cannot continue. Schluss.

    I.e. any script of the SDK15 environment leads to the false path:

    ~...../gcc-arm-none-eabi-4_9-2015q3arm-none-eabi-gcc

    but I have no idea how I can correct the problem.


    Ciao Frank





  • I guess the path has to changed to:

    GNU_INSTALL_ROOT := /home/frank/gcc-arm-none-eabi-4_9-2015q3/bin/

    ../bin/ was the needed extension compared to SDK 11.

Reply Children
  • Now make can start but with limited success:

    ~/nordic/nRF5_SDK_15.0.0_a53641a/examples/dfu/secure_bootloader/pca10040_uart_debug/armgcc $ make
    Makefile:238: Cannot find include folder: ../../../../../external/micro-ecc/micro-ecc
    mkdir _build
    cd _build && mkdir nrf52832_xxaa_mbr
    Assembling file: gcc_startup_nrf52.S
    Compiling file: system_nrf52.c
    Compiling file: nrf_log_backend_rtt.c
    Compiling file: nrf_log_backend_serial.c
    Compiling file: nrf_log_backend_uart.c
    Compiling file: nrf_log_default_backends.c
    Compiling file: nrf_log_frontend.c
    Compiling file: nrf_log_str_formatter.c
    Compiling file: boards.c
    Compiling file: micro_ecc_backend_ecc.c
    In file included from ../../../../../components/libraries/crypto/nrf_crypto_ecc_backend.h:58:0,
    from ../../../../../components/libraries/crypto/nrf_crypto_ecc.h:73,
    from ../../../../../components/libraries/crypto/backend/micro_ecc/micro_ecc_backend_ecc.c:51:
    ../../../../../components/libraries/crypto/backend/micro_ecc/micro_ecc_backend_ecc.h:52:18: fatal error: uECC.h: No such file or directory
    #include "uECC.h"
    ^
    compilation terminated.
    make: *** [_build/nrf52832_xxaa_mbr/micro_ecc_backend_ecc.c.o] Fehler 1

    Ciao Frank

  • Solved: micro-ecc/micro-ecc was blocked by LINUX for unknown reasons. --> New mkdir /micro-ecc

  • Remaining make - problems:

    ~/nordic/nRF5_SDK_15.0.0_a53641a/examples/dfu/secure_bootloader/pca10040_uart_debug/armgcc $ make
    Compiling file: nrf_dfu_validation.c
    ../../../../../components/libraries/bootloader/dfu/nrf_dfu_validation.c:91:1: error: missing braces around initializer [-Werror=missing-braces]
    static nrf_crypto_hash_context_t m_hash_context = {0};
    ^
    ../../../../../components/libraries/bootloader/dfu/nrf_dfu_validation.c:91:1: error: (near initialization for 'm_hash_context.hash_sha256_context') [-Werror=missing-braces]
    cc1: all warnings being treated as errors
    make: *** [_build/nrf52832_xxaa_mbr/nrf_dfu_validation.c.o] Fehler 1

    or


    ~/nordic/nRF5_SDK_15.0.0_a53641a/examples/dfu/secure_bootloader/pca10040_uart/armgcc $ make
    Compiling file: nrf_dfu_validation.c
    ../../../../../components/libraries/bootloader/dfu/nrf_dfu_validation.c:91:1: error: missing braces around initializer [-Werror=missing-braces]
    static nrf_crypto_hash_context_t m_hash_context = {0};
    ^
    ../../../../../components/libraries/bootloader/dfu/nrf_dfu_validation.c:91:1: error: (near initialization for 'm_hash_context.hash_sha256_context') [-Werror=missing-braces]
    cc1: all warnings being treated as errors
    make: *** [_build/nrf52832_xxaa_mbr/nrf_dfu_validation.c.o] Fehler 1

    Please give me a hint, to avoid this error message.

  • ../../../../../components/libraries/bootloader/dfu/nrf_dfu_validation.c:91:1: error: missing braces

    static nrf_crypto_hash_context_t m_hash_context = {{{0}}};

    instead of

    static nrf_crypto_hash_context_t m_hash_context = {0};

    seams to help for removing the warning produced by a gcc-bug?

  • I'm able to compile both SDK15 pca10040_uart - projects.

    Thats why I like to ask a serious question now:

    Issue:
    The nordic - chip hardware is embedded in a further hardware shell with an additional µC.
    Because that, the file tranfer via UART from external devices is only possible through
    the second µC.
    In other words: There is no need to secure and complicate the UART-connection between NORDIC µC.
    and µC of the second shell.

    Question:
    Exists there a simple possibilty to switch off the need of authentication or key - exchange respectively
    for the SDK15 uart - dfu - examples?

Related