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.

   

  • 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