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

Converting firmware from S140 to S132

Hello,

I have a fully functioning project using the Fanstel BT840 chip which uses the NRF52840. I am running the code using secure Buttonless DFU and the S140 soft device to connect to my bluetooth application. I have two Segger projects that I manage in order to make this happen. The first is the bootloader with the DFU. The second is my application based on the S140. 

In order to reduce cost of this final product, I am looking at switching to the BT832 chip which uses the NRF52832. I am pretty sure I will need to convert my firmware to the S132 soft device and I have a few questions on how to do this.

First off, am I correct in assuming that I will have to convert to the s132 soft device on the NRF528232 chip?

If my assumption is correct, I would guess that I would need to do the following to complete this successfully

1) Switch the bootloader segger project to operate on the s132 based bootloader - This should be fairly easy since this project is quite small and straight forward 

2) Switch my example project to the s132. This is much more involved. I am hoping that I can just swap out the s140 files with the s132 files, change the keys to match and also change the command I use on the nrf util line when I am generating packets and I will be good to go.

Would it be easier for me to start using the new buttonless dfu example application that uses the s132 soft device and then port all of my code over to this example instead of trying to keep my previous code project in tact?

Is there anything else I am missing that I need to consider before attempting to make this soft device conversion?

Thank you,

Austin

Parents
  • Hi Austin,

    I think it can be a good idea to do a quick side-by-side comparison of a pca10040 (nRF52 DK board with nRF52832 as the target IC) and pca10056 (nRF52840DK board with nRF52840 as the target IC) configuration for one of the existing SDK examples to get an overview of what the differences are. There aren't that many.

    Here's for instance a diff of the ble_app_hrs example from SDK 17.0.2

    diff --git a/ble_app_hrs_pca10040_s132.emProject "b/..\\..\\..\\pca10056\\s140\\ses\\ble_app_hrs_pca10056_s140.emProject"
    index 998f065..2485a21 100644
    --- a/ble_app_hrs_pca10040_s132.emProject
    +++ "b/..\\..\\..\\pca10056\\s140\\ses\\ble_app_hrs_pca10056_s140.emProject"
    @@ -1,6 +1,6 @@
     <!DOCTYPE CrossStudio_Project_File>
    -<solution Name="ble_app_hrs_pca10040_s132" target="8" version="2">
    -  <project Name="ble_app_hrs_pca10040_s132">
    +<solution Name="ble_app_hrs_pca10056_s140" target="8" version="2">
    +  <project Name="ble_app_hrs_pca10056_s140">
         <configuration
           Name="Common"
           arm_architecture="v7EM"
    @@ -13,24 +13,24 @@
           arm_linker_stack_size="8192"
           arm_linker_treat_warnings_as_errors="No"
           arm_simulator_memory_simulation_parameter="RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD"
    -      arm_target_device_name="nRF52832_xxAA"
    +      arm_target_device_name="nRF52840_xxAA"
           arm_target_interface_type="SWD"
    -      c_user_include_directories="../../../config;../../../../../../components;../../../../../../components/ble/ble_advertising;../../../../../../components/ble/ble_dtm;../../../../../../components/ble/ble_racp;../../../../../../components/ble/ble_services/ble_ancs_c;../../../../../../components/ble/ble_services/ble_ans_c;../../../../../../components/ble/ble_services/ble_bas;../../../../../../components/ble/ble_services/ble_bas_c;../../../../../../components/ble/ble_services/ble_cscs;../../../../../../components/ble/ble_services/ble_cts_c;../../../../../../components/ble/ble_services/ble_dfu;../../../../../../components/ble/ble_services/ble_dis;../../../../../../components/ble/ble_services/ble_gls;../../../../../../components/ble/ble_services/ble_hids;../../../../../../components/ble/ble_services/ble_hrs;../../../../../../components/ble/ble_services/ble_hrs_c;../../../../../../components/ble/ble_services/ble_hts;../../../../../../components/ble/ble_services/ble_ias;../../../../../../components/ble/ble_services/ble_ias_c;../../../../../../components/ble/ble_services/ble_lbs;../../../../../../components/ble/ble_services/ble_lbs_c;../../../../../../components/ble/ble_services/ble_lls;../../../../../../components/ble/ble_services/ble_nus;../../../../../../components/ble/ble_services/ble_nus_c;../../../../../../components/ble/ble_services/ble_rscs;../../../../../../components/ble/ble_services/ble_rscs_c;../../../../../../components/ble/ble_services/ble_tps;../../../../../../components/ble/common;../../../../../../components/ble/nrf_ble_gatt;../../../../../../components/ble/nrf_ble_qwr;../../../../../../components/ble/peer_manager;../../../../../../components/boards;../../../../../../components/libraries/atomic;../../../../../../components/libraries/atomic_fifo;../../../../../../components/libraries/atomic_flags;../../../../../../components/libraries/balloc;../../../../../../components/libraries/bootloader/ble_dfu;../../../../../../components/libraries/bsp;../../../../../../components/libraries/button;../../../../../../components/libraries/cli;../../../../../../components/libraries/crc16;../../../../../../components/libraries/crc32;../../../../../../components/libraries/crypto;../../../../../../components/libraries/crypto/backend/cc310;../../../../../../components/libraries/crypto/backend/cc310_bl;../../../../../../components/libraries/crypto/backend/cifra;../../../../../../components/libraries/crypto/backend/mbedtls;../../../../../../components/libraries/crypto/backend/micro_ecc;../../../../../../components/libraries/crypto/backend/nrf_hw;../../../../../../components/libraries/crypto/backend/nrf_sw;../../../../../../components/libraries/crypto/backend/oberon;../../../../../../components/libraries/crypto/backend/optiga;../../../../../../components/libraries/csense;../../../../../../components/libraries/csense_drv;../../../../../../components/libraries/delay;../../../../../../components/libraries/ecc;../../../../../../components/libraries/experimental_section_vars;../../../../../../components/libraries/experimental_task_manager;../../../../../../components/libraries/fds;../../../../../../components/libraries/fstorage;../../../../../../components/libraries/gfx;../../../../../../components/libraries/gpiote;../../../../../../components/libraries/hardfault;../../../../../../components/libraries/hci;../../../../../../components/libraries/led_softblink;../../../../../../components/libraries/log;../../../../../../components/libraries/log/src;../../../../../../components/libraries/low_power_pwm;../../../../../../components/libraries/mem_manager;../../../../../../components/libraries/memobj;../../../../../../components/libraries/mpu;../../../../../../components/libraries/mutex;../../../../../../components/libraries/pwm;../../../../../../components/libraries/pwr_mgmt;../../../../../../components/libraries/queue;../../../../../../components/libraries/ringbuf;../../../../../../components/libraries/scheduler;../../../../../../components/libraries/sdcard;../../../../../../components/libraries/sensorsim;../../../../../../components/libraries/slip;../../../../../../components/libraries/sortlist;../../../../../../components/libraries/spi_mngr;../../../../../../components/libraries/stack_guard;../../../../../../components/libraries/stack_info;../../../../../../components/libraries/strerror;../../../../../../components/libraries/svc;../../../../../../components/libraries/timer;../../../../../../components/libraries/twi_mngr;../../../../../../components/libraries/twi_sensor;../../../../../../components/libraries/usbd;../../../../../../components/libraries/usbd/class/audio;../../../../../../components/libraries/usbd/class/cdc;../../../../../../components/libraries/usbd/class/cdc/acm;../../../../../../components/libraries/usbd/class/hid;../../../../../../components/libraries/usbd/class/hid/generic;../../../../../../components/libraries/usbd/class/hid/kbd;../../../../../../components/libraries/usbd/class/hid/mouse;../../../../../../components/libraries/usbd/class/msc;../../../../../../components/libraries/util;../../../../../../components/nfc/ndef/conn_hand_parser;../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser;../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser;../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser;../../../../../../components/nfc/ndef/connection_handover/ac_rec;../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata;../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib;../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg;../../../../../../components/nfc/ndef/connection_handover/common;../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec;../../../../../../components/nfc/ndef/connection_handover/hs_rec;../../../../../../components/nfc/ndef/connection_handover/le_oob_rec;../../../../../../components/nfc/ndef/generic/message;../../../../../../components/nfc/ndef/generic/record;../../../../../../components/nfc/ndef/launchapp;../../../../../../components/nfc/ndef/parser/message;../../../../../../components/nfc/ndef/parser/record;../../../../../../components/nfc/ndef/text;../../../../../../components/nfc/ndef/uri;../../../../../../components/nfc/platform;../../../../../../components/nfc/t2t_lib;../../../../../../components/nfc/t2t_parser;../../../../../../components/nfc/t4t_lib;../../../../../../components/nfc/t4t_parser/apdu;../../../../../../components/nfc/t4t_parser/cc_file;../../../../../../components/nfc/t4t_parser/hl_detection_procedure;../../../../../../components/nfc/t4t_parser/tlv;../../../../../../components/softdevice/common;../../../../../../components/softdevice/s132/headers;../../../../../../components/softdevice/s132/headers/nrf52;../../../../../../components/toolchain/cmsis/include;../../../../../../external/fprintf;../../../../../../external/mbedtls/include;../../../../../../external/nrf_cc310/include;../../../../../../external/nrf_oberon;../../../../../../external/nrf_oberon/include;../../../../../../external/nrf_tls/mbedtls/nrf_crypto/config;../../../../../../external/segger_rtt;../../../../../../external/utf_converter;../../../../../../integration/nrfx;../../../../../../integration/nrfx/legacy;../../../../../../modules/nrfx;../../../../../../modules/nrfx/drivers/include;../../../../../../modules/nrfx/hal;../../../../../../modules/nrfx/mdk;../config;"
    -      c_preprocessor_definitions="APP_TIMER_V2;APP_TIMER_V2_RTC1_ENABLED;BLE_STACK_SUPPORT_REQD;BOARD_PCA10040;CONFIG_GPIO_AS_PINRESET;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;MBEDTLS_CONFIG_FILE=&quot;nrf_crypto_mbedtls_config.h&quot;;NO_VTOR_CONFIG;NRF52;NRF52832_XXAA;NRF52_PAN_74;NRF_CRYPTO_MAX_INSTANCE_COUNT=1;NRF_SD_BLE_API_VERSION=7;S132;SOFTDEVICE_PRESENT;"
    +      c_user_include_directories="../../../config;../../../../../../components;../../../../../../components/ble/ble_advertising;../../../../../../components/ble/ble_dtm;../../../../../../components/ble/ble_racp;../../../../../../components/ble/ble_services/ble_ancs_c;../../../../../../components/ble/ble_services/ble_ans_c;../../../../../../components/ble/ble_services/ble_bas;../../../../../../components/ble/ble_services/ble_bas_c;../../../../../../components/ble/ble_services/ble_cscs;../../../../../../components/ble/ble_services/ble_cts_c;../../../../../../components/ble/ble_services/ble_dfu;../../../../../../components/ble/ble_services/ble_dis;../../../../../../components/ble/ble_services/ble_gls;../../../../../../components/ble/ble_services/ble_hids;../../../../../../components/ble/ble_services/ble_hrs;../../../../../../components/ble/ble_services/ble_hrs_c;../../../../../../components/ble/ble_services/ble_hts;../../../../../../components/ble/ble_services/ble_ias;../../../../../../components/ble/ble_services/ble_ias_c;../../../../../../components/ble/ble_services/ble_lbs;../../../../../../components/ble/ble_services/ble_lbs_c;../../../../../../components/ble/ble_services/ble_lls;../../../../../../components/ble/ble_services/ble_nus;../../../../../../components/ble/ble_services/ble_nus_c;../../../../../../components/ble/ble_services/ble_rscs;../../../../../../components/ble/ble_services/ble_rscs_c;../../../../../../components/ble/ble_services/ble_tps;../../../../../../components/ble/common;../../../../../../components/ble/nrf_ble_gatt;../../../../../../components/ble/nrf_ble_qwr;../../../../../../components/ble/peer_manager;../../../../../../components/boards;../../../../../../components/libraries/atomic;../../../../../../components/libraries/atomic_fifo;../../../../../../components/libraries/atomic_flags;../../../../../../components/libraries/balloc;../../../../../../components/libraries/bootloader/ble_dfu;../../../../../../components/libraries/bsp;../../../../../../components/libraries/button;../../../../../../components/libraries/cli;../../../../../../components/libraries/crc16;../../../../../../components/libraries/crc32;../../../../../../components/libraries/crypto;../../../../../../components/libraries/crypto/backend/cc310;../../../../../../components/libraries/crypto/backend/cc310_bl;../../../../../../components/libraries/crypto/backend/cifra;../../../../../../components/libraries/crypto/backend/mbedtls;../../../../../../components/libraries/crypto/backend/micro_ecc;../../../../../../components/libraries/crypto/backend/nrf_hw;../../../../../../components/libraries/crypto/backend/nrf_sw;../../../../../../components/libraries/crypto/backend/oberon;../../../../../../components/libraries/crypto/backend/optiga;../../../../../../components/libraries/csense;../../../../../../components/libraries/csense_drv;../../../../../../components/libraries/delay;../../../../../../components/libraries/ecc;../../../../../../components/libraries/experimental_section_vars;../../../../../../components/libraries/experimental_task_manager;../../../../../../components/libraries/fds;../../../../../../components/libraries/fstorage;../../../../../../components/libraries/gfx;../../../../../../components/libraries/gpiote;../../../../../../components/libraries/hardfault;../../../../../../components/libraries/hci;../../../../../../components/libraries/led_softblink;../../../../../../components/libraries/log;../../../../../../components/libraries/log/src;../../../../../../components/libraries/low_power_pwm;../../../../../../components/libraries/mem_manager;../../../../../../components/libraries/memobj;../../../../../../components/libraries/mpu;../../../../../../components/libraries/mutex;../../../../../../components/libraries/pwm;../../../../../../components/libraries/pwr_mgmt;../../../../../../components/libraries/queue;../../../../../../components/libraries/ringbuf;../../../../../../components/libraries/scheduler;../../../../../../components/libraries/sdcard;../../../../../../components/libraries/sensorsim;../../../../../../components/libraries/slip;../../../../../../components/libraries/sortlist;../../../../../../components/libraries/spi_mngr;../../../../../../components/libraries/stack_guard;../../../../../../components/libraries/stack_info;../../../../../../components/libraries/strerror;../../../../../../components/libraries/svc;../../../../../../components/libraries/timer;../../../../../../components/libraries/twi_mngr;../../../../../../components/libraries/twi_sensor;../../../../../../components/libraries/usbd;../../../../../../components/libraries/usbd/class/audio;../../../../../../components/libraries/usbd/class/cdc;../../../../../../components/libraries/usbd/class/cdc/acm;../../../../../../components/libraries/usbd/class/hid;../../../../../../components/libraries/usbd/class/hid/generic;../../../../../../components/libraries/usbd/class/hid/kbd;../../../../../../components/libraries/usbd/class/hid/mouse;../../../../../../components/libraries/usbd/class/msc;../../../../../../components/libraries/util;../../../../../../components/nfc/ndef/conn_hand_parser;../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser;../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser;../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser;../../../../../../components/nfc/ndef/connection_handover/ac_rec;../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata;../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib;../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg;../../../../../../components/nfc/ndef/connection_handover/common;../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec;../../../../../../components/nfc/ndef/connection_handover/hs_rec;../../../../../../components/nfc/ndef/connection_handover/le_oob_rec;../../../../../../components/nfc/ndef/generic/message;../../../../../../components/nfc/ndef/generic/record;../../../../../../components/nfc/ndef/launchapp;../../../../../../components/nfc/ndef/parser/message;../../../../../../components/nfc/ndef/parser/record;../../../../../../components/nfc/ndef/text;../../../../../../components/nfc/ndef/uri;../../../../../../components/nfc/platform;../../../../../../components/nfc/t2t_lib;../../../../../../components/nfc/t2t_parser;../../../../../../components/nfc/t4t_lib;../../../../../../components/nfc/t4t_parser/apdu;../../../../../../components/nfc/t4t_parser/cc_file;../../../../../../components/nfc/t4t_parser/hl_detection_procedure;../../../../../../components/nfc/t4t_parser/tlv;../../../../../../components/softdevice/common;../../../../../../components/softdevice/s140/headers;../../../../../../components/softdevice/s140/headers/nrf52;../../../../../../components/toolchain/cmsis/include;../../../../../../external/fprintf;../../../../../../external/mbedtls/include;../../../../../../external/nrf_cc310/include;../../../../../../external/nrf_oberon;../../../../../../external/nrf_oberon/include;../../../../../../external/nrf_tls/mbedtls/nrf_crypto/config;../../../../../../external/segger_rtt;../../../../../../external/utf_converter;../../../../../../integration/nrfx;../../../../../../integration/nrfx/legacy;../../../../../../modules/nrfx;../../../../../../modules/nrfx/drivers/include;../../../../../../modules/nrfx/hal;../../../../../../modules/nrfx/mdk;../config;"
    +      c_preprocessor_definitions="APP_TIMER_V2;APP_TIMER_V2_RTC1_ENABLED;BLE_STACK_SUPPORT_REQD;BOARD_PCA10056;CONFIG_GPIO_AS_PINRESET;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;MBEDTLS_CONFIG_FILE=&quot;nrf_crypto_mbedtls_config.h&quot;;NO_VTOR_CONFIG;NRF52840_XXAA;NRF_CRYPTO_MAX_INSTANCE_COUNT=1;NRF_SD_BLE_API_VERSION=7;S140;SOFTDEVICE_PRESENT;"
           debug_target_connection="J-Link"
           gcc_entry_point="Reset_Handler"
           macros="CMSIS_CONFIG_TOOL=../../../../../../external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar"
    -      debug_register_definition_file="../../../../../../modules/nrfx/mdk/nrf52.svd"
    -      debug_additional_load_file="../../../../../../components/softdevice/s132/hex/s132_nrf52_7.2.0_softdevice.hex"
    +      debug_register_definition_file="../../../../../../modules/nrfx/mdk/nrf52840.svd"
    +      debug_additional_load_file="../../../../../../components/softdevice/s140/hex/s140_nrf52_7.2.0_softdevice.hex"
           debug_start_from_entry_point_symbol="No"
           gcc_debugging_level="Level 3"      linker_output_format="hex"
           linker_printf_width_precision_supported="Yes"
           linker_printf_fmt_level="long"
           linker_scanf_fmt_level="long"
           linker_section_placement_file="flash_placement.xml"
    -      linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x80000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x10000;FLASH_START=0x26000;FLASH_SIZE=0x5a000;RAM_START=0x20002bd0;RAM_SIZE=0xd430"
    +      linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x27000;FLASH_SIZE=0xd9000;RAM_START=0x20002be0;RAM_SIZE=0x3d420"
           
    -      linker_section_placements_segments="FLASH RX 0x0 0x80000;RAM1 RWX 0x20000000 0x10000"
    +      linker_section_placements_segments="FLASH RX 0x0 0x100000;RAM1 RWX 0x20000000 0x40000"
           project_directory=""
           project_type="Executable" />
           <folder Name="Segger Startup Files">
    @@ -136,9 +136,24 @@
           <file file_name="../../../../../../external/segger_rtt/SEGGER_RTT_printf.c" />
         </folder>
         <folder Name="None">
    -      <file file_name="../../../../../../modules/nrfx/mdk/ses_startup_nrf52.s" />
    +      <file file_name="../../../../../../modules/nrfx/mdk/ses_startup_nrf52840.s" />
           <file file_name="../../../../../../modules/nrfx/mdk/ses_startup_nrf_common.s" />
    -      <file file_name="../../../../../../modules/nrfx/mdk/system_nrf52.c" />
    +      <file file_name="../../../../../../modules/nrfx/mdk/system_nrf52840.c" />
    +    </folder>
    +    <folder Name="nRF_Crypto backend CC310">
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_aes.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_aes_aead.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_chacha_poly_aead.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_ecc.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_ecdh.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_ecdsa.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_eddsa.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_hash.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_hmac.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_init.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_mutex.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_rng.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_shared.c" />
         </folder>
         <folder Name="nRF_BLE">
           <file file_name="../../../../../../components/ble/peer_manager/auth_status_tracker.c" />
    

    2) Switch my example project to the s132. This is much more involved. I am hoping that I can just swap out the s140 files with the s132 files, change the keys to match and also change the command I use on the nrf util line when I am generating packets and I will be good to go.

     It depends on the project, but it's often pretty straight forward to convert a project from one 52 variant to another. I guess the trick is to work directly with the xml encoded .emProject file and not do everything through the GUI (takes time to navigate through the setting menus).

    First off, am I correct in assuming that I will have to convert to the s132 soft device on the NRF528232 chip?

     Yes, s140 has not been qualified for this chip as you can see here: SDKs and SoftDevices. 

    The nRF52 Series comparison table can also be used as a quick lookup to compare the difference in HW features between the 52832 and 52840.

    Best regards,

    Vidar

Reply
  • Hi Austin,

    I think it can be a good idea to do a quick side-by-side comparison of a pca10040 (nRF52 DK board with nRF52832 as the target IC) and pca10056 (nRF52840DK board with nRF52840 as the target IC) configuration for one of the existing SDK examples to get an overview of what the differences are. There aren't that many.

    Here's for instance a diff of the ble_app_hrs example from SDK 17.0.2

    diff --git a/ble_app_hrs_pca10040_s132.emProject "b/..\\..\\..\\pca10056\\s140\\ses\\ble_app_hrs_pca10056_s140.emProject"
    index 998f065..2485a21 100644
    --- a/ble_app_hrs_pca10040_s132.emProject
    +++ "b/..\\..\\..\\pca10056\\s140\\ses\\ble_app_hrs_pca10056_s140.emProject"
    @@ -1,6 +1,6 @@
     <!DOCTYPE CrossStudio_Project_File>
    -<solution Name="ble_app_hrs_pca10040_s132" target="8" version="2">
    -  <project Name="ble_app_hrs_pca10040_s132">
    +<solution Name="ble_app_hrs_pca10056_s140" target="8" version="2">
    +  <project Name="ble_app_hrs_pca10056_s140">
         <configuration
           Name="Common"
           arm_architecture="v7EM"
    @@ -13,24 +13,24 @@
           arm_linker_stack_size="8192"
           arm_linker_treat_warnings_as_errors="No"
           arm_simulator_memory_simulation_parameter="RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD"
    -      arm_target_device_name="nRF52832_xxAA"
    +      arm_target_device_name="nRF52840_xxAA"
           arm_target_interface_type="SWD"
    -      c_user_include_directories="../../../config;../../../../../../components;../../../../../../components/ble/ble_advertising;../../../../../../components/ble/ble_dtm;../../../../../../components/ble/ble_racp;../../../../../../components/ble/ble_services/ble_ancs_c;../../../../../../components/ble/ble_services/ble_ans_c;../../../../../../components/ble/ble_services/ble_bas;../../../../../../components/ble/ble_services/ble_bas_c;../../../../../../components/ble/ble_services/ble_cscs;../../../../../../components/ble/ble_services/ble_cts_c;../../../../../../components/ble/ble_services/ble_dfu;../../../../../../components/ble/ble_services/ble_dis;../../../../../../components/ble/ble_services/ble_gls;../../../../../../components/ble/ble_services/ble_hids;../../../../../../components/ble/ble_services/ble_hrs;../../../../../../components/ble/ble_services/ble_hrs_c;../../../../../../components/ble/ble_services/ble_hts;../../../../../../components/ble/ble_services/ble_ias;../../../../../../components/ble/ble_services/ble_ias_c;../../../../../../components/ble/ble_services/ble_lbs;../../../../../../components/ble/ble_services/ble_lbs_c;../../../../../../components/ble/ble_services/ble_lls;../../../../../../components/ble/ble_services/ble_nus;../../../../../../components/ble/ble_services/ble_nus_c;../../../../../../components/ble/ble_services/ble_rscs;../../../../../../components/ble/ble_services/ble_rscs_c;../../../../../../components/ble/ble_services/ble_tps;../../../../../../components/ble/common;../../../../../../components/ble/nrf_ble_gatt;../../../../../../components/ble/nrf_ble_qwr;../../../../../../components/ble/peer_manager;../../../../../../components/boards;../../../../../../components/libraries/atomic;../../../../../../components/libraries/atomic_fifo;../../../../../../components/libraries/atomic_flags;../../../../../../components/libraries/balloc;../../../../../../components/libraries/bootloader/ble_dfu;../../../../../../components/libraries/bsp;../../../../../../components/libraries/button;../../../../../../components/libraries/cli;../../../../../../components/libraries/crc16;../../../../../../components/libraries/crc32;../../../../../../components/libraries/crypto;../../../../../../components/libraries/crypto/backend/cc310;../../../../../../components/libraries/crypto/backend/cc310_bl;../../../../../../components/libraries/crypto/backend/cifra;../../../../../../components/libraries/crypto/backend/mbedtls;../../../../../../components/libraries/crypto/backend/micro_ecc;../../../../../../components/libraries/crypto/backend/nrf_hw;../../../../../../components/libraries/crypto/backend/nrf_sw;../../../../../../components/libraries/crypto/backend/oberon;../../../../../../components/libraries/crypto/backend/optiga;../../../../../../components/libraries/csense;../../../../../../components/libraries/csense_drv;../../../../../../components/libraries/delay;../../../../../../components/libraries/ecc;../../../../../../components/libraries/experimental_section_vars;../../../../../../components/libraries/experimental_task_manager;../../../../../../components/libraries/fds;../../../../../../components/libraries/fstorage;../../../../../../components/libraries/gfx;../../../../../../components/libraries/gpiote;../../../../../../components/libraries/hardfault;../../../../../../components/libraries/hci;../../../../../../components/libraries/led_softblink;../../../../../../components/libraries/log;../../../../../../components/libraries/log/src;../../../../../../components/libraries/low_power_pwm;../../../../../../components/libraries/mem_manager;../../../../../../components/libraries/memobj;../../../../../../components/libraries/mpu;../../../../../../components/libraries/mutex;../../../../../../components/libraries/pwm;../../../../../../components/libraries/pwr_mgmt;../../../../../../components/libraries/queue;../../../../../../components/libraries/ringbuf;../../../../../../components/libraries/scheduler;../../../../../../components/libraries/sdcard;../../../../../../components/libraries/sensorsim;../../../../../../components/libraries/slip;../../../../../../components/libraries/sortlist;../../../../../../components/libraries/spi_mngr;../../../../../../components/libraries/stack_guard;../../../../../../components/libraries/stack_info;../../../../../../components/libraries/strerror;../../../../../../components/libraries/svc;../../../../../../components/libraries/timer;../../../../../../components/libraries/twi_mngr;../../../../../../components/libraries/twi_sensor;../../../../../../components/libraries/usbd;../../../../../../components/libraries/usbd/class/audio;../../../../../../components/libraries/usbd/class/cdc;../../../../../../components/libraries/usbd/class/cdc/acm;../../../../../../components/libraries/usbd/class/hid;../../../../../../components/libraries/usbd/class/hid/generic;../../../../../../components/libraries/usbd/class/hid/kbd;../../../../../../components/libraries/usbd/class/hid/mouse;../../../../../../components/libraries/usbd/class/msc;../../../../../../components/libraries/util;../../../../../../components/nfc/ndef/conn_hand_parser;../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser;../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser;../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser;../../../../../../components/nfc/ndef/connection_handover/ac_rec;../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata;../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib;../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg;../../../../../../components/nfc/ndef/connection_handover/common;../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec;../../../../../../components/nfc/ndef/connection_handover/hs_rec;../../../../../../components/nfc/ndef/connection_handover/le_oob_rec;../../../../../../components/nfc/ndef/generic/message;../../../../../../components/nfc/ndef/generic/record;../../../../../../components/nfc/ndef/launchapp;../../../../../../components/nfc/ndef/parser/message;../../../../../../components/nfc/ndef/parser/record;../../../../../../components/nfc/ndef/text;../../../../../../components/nfc/ndef/uri;../../../../../../components/nfc/platform;../../../../../../components/nfc/t2t_lib;../../../../../../components/nfc/t2t_parser;../../../../../../components/nfc/t4t_lib;../../../../../../components/nfc/t4t_parser/apdu;../../../../../../components/nfc/t4t_parser/cc_file;../../../../../../components/nfc/t4t_parser/hl_detection_procedure;../../../../../../components/nfc/t4t_parser/tlv;../../../../../../components/softdevice/common;../../../../../../components/softdevice/s132/headers;../../../../../../components/softdevice/s132/headers/nrf52;../../../../../../components/toolchain/cmsis/include;../../../../../../external/fprintf;../../../../../../external/mbedtls/include;../../../../../../external/nrf_cc310/include;../../../../../../external/nrf_oberon;../../../../../../external/nrf_oberon/include;../../../../../../external/nrf_tls/mbedtls/nrf_crypto/config;../../../../../../external/segger_rtt;../../../../../../external/utf_converter;../../../../../../integration/nrfx;../../../../../../integration/nrfx/legacy;../../../../../../modules/nrfx;../../../../../../modules/nrfx/drivers/include;../../../../../../modules/nrfx/hal;../../../../../../modules/nrfx/mdk;../config;"
    -      c_preprocessor_definitions="APP_TIMER_V2;APP_TIMER_V2_RTC1_ENABLED;BLE_STACK_SUPPORT_REQD;BOARD_PCA10040;CONFIG_GPIO_AS_PINRESET;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;MBEDTLS_CONFIG_FILE=&quot;nrf_crypto_mbedtls_config.h&quot;;NO_VTOR_CONFIG;NRF52;NRF52832_XXAA;NRF52_PAN_74;NRF_CRYPTO_MAX_INSTANCE_COUNT=1;NRF_SD_BLE_API_VERSION=7;S132;SOFTDEVICE_PRESENT;"
    +      c_user_include_directories="../../../config;../../../../../../components;../../../../../../components/ble/ble_advertising;../../../../../../components/ble/ble_dtm;../../../../../../components/ble/ble_racp;../../../../../../components/ble/ble_services/ble_ancs_c;../../../../../../components/ble/ble_services/ble_ans_c;../../../../../../components/ble/ble_services/ble_bas;../../../../../../components/ble/ble_services/ble_bas_c;../../../../../../components/ble/ble_services/ble_cscs;../../../../../../components/ble/ble_services/ble_cts_c;../../../../../../components/ble/ble_services/ble_dfu;../../../../../../components/ble/ble_services/ble_dis;../../../../../../components/ble/ble_services/ble_gls;../../../../../../components/ble/ble_services/ble_hids;../../../../../../components/ble/ble_services/ble_hrs;../../../../../../components/ble/ble_services/ble_hrs_c;../../../../../../components/ble/ble_services/ble_hts;../../../../../../components/ble/ble_services/ble_ias;../../../../../../components/ble/ble_services/ble_ias_c;../../../../../../components/ble/ble_services/ble_lbs;../../../../../../components/ble/ble_services/ble_lbs_c;../../../../../../components/ble/ble_services/ble_lls;../../../../../../components/ble/ble_services/ble_nus;../../../../../../components/ble/ble_services/ble_nus_c;../../../../../../components/ble/ble_services/ble_rscs;../../../../../../components/ble/ble_services/ble_rscs_c;../../../../../../components/ble/ble_services/ble_tps;../../../../../../components/ble/common;../../../../../../components/ble/nrf_ble_gatt;../../../../../../components/ble/nrf_ble_qwr;../../../../../../components/ble/peer_manager;../../../../../../components/boards;../../../../../../components/libraries/atomic;../../../../../../components/libraries/atomic_fifo;../../../../../../components/libraries/atomic_flags;../../../../../../components/libraries/balloc;../../../../../../components/libraries/bootloader/ble_dfu;../../../../../../components/libraries/bsp;../../../../../../components/libraries/button;../../../../../../components/libraries/cli;../../../../../../components/libraries/crc16;../../../../../../components/libraries/crc32;../../../../../../components/libraries/crypto;../../../../../../components/libraries/crypto/backend/cc310;../../../../../../components/libraries/crypto/backend/cc310_bl;../../../../../../components/libraries/crypto/backend/cifra;../../../../../../components/libraries/crypto/backend/mbedtls;../../../../../../components/libraries/crypto/backend/micro_ecc;../../../../../../components/libraries/crypto/backend/nrf_hw;../../../../../../components/libraries/crypto/backend/nrf_sw;../../../../../../components/libraries/crypto/backend/oberon;../../../../../../components/libraries/crypto/backend/optiga;../../../../../../components/libraries/csense;../../../../../../components/libraries/csense_drv;../../../../../../components/libraries/delay;../../../../../../components/libraries/ecc;../../../../../../components/libraries/experimental_section_vars;../../../../../../components/libraries/experimental_task_manager;../../../../../../components/libraries/fds;../../../../../../components/libraries/fstorage;../../../../../../components/libraries/gfx;../../../../../../components/libraries/gpiote;../../../../../../components/libraries/hardfault;../../../../../../components/libraries/hci;../../../../../../components/libraries/led_softblink;../../../../../../components/libraries/log;../../../../../../components/libraries/log/src;../../../../../../components/libraries/low_power_pwm;../../../../../../components/libraries/mem_manager;../../../../../../components/libraries/memobj;../../../../../../components/libraries/mpu;../../../../../../components/libraries/mutex;../../../../../../components/libraries/pwm;../../../../../../components/libraries/pwr_mgmt;../../../../../../components/libraries/queue;../../../../../../components/libraries/ringbuf;../../../../../../components/libraries/scheduler;../../../../../../components/libraries/sdcard;../../../../../../components/libraries/sensorsim;../../../../../../components/libraries/slip;../../../../../../components/libraries/sortlist;../../../../../../components/libraries/spi_mngr;../../../../../../components/libraries/stack_guard;../../../../../../components/libraries/stack_info;../../../../../../components/libraries/strerror;../../../../../../components/libraries/svc;../../../../../../components/libraries/timer;../../../../../../components/libraries/twi_mngr;../../../../../../components/libraries/twi_sensor;../../../../../../components/libraries/usbd;../../../../../../components/libraries/usbd/class/audio;../../../../../../components/libraries/usbd/class/cdc;../../../../../../components/libraries/usbd/class/cdc/acm;../../../../../../components/libraries/usbd/class/hid;../../../../../../components/libraries/usbd/class/hid/generic;../../../../../../components/libraries/usbd/class/hid/kbd;../../../../../../components/libraries/usbd/class/hid/mouse;../../../../../../components/libraries/usbd/class/msc;../../../../../../components/libraries/util;../../../../../../components/nfc/ndef/conn_hand_parser;../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser;../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser;../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser;../../../../../../components/nfc/ndef/connection_handover/ac_rec;../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata;../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib;../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg;../../../../../../components/nfc/ndef/connection_handover/common;../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec;../../../../../../components/nfc/ndef/connection_handover/hs_rec;../../../../../../components/nfc/ndef/connection_handover/le_oob_rec;../../../../../../components/nfc/ndef/generic/message;../../../../../../components/nfc/ndef/generic/record;../../../../../../components/nfc/ndef/launchapp;../../../../../../components/nfc/ndef/parser/message;../../../../../../components/nfc/ndef/parser/record;../../../../../../components/nfc/ndef/text;../../../../../../components/nfc/ndef/uri;../../../../../../components/nfc/platform;../../../../../../components/nfc/t2t_lib;../../../../../../components/nfc/t2t_parser;../../../../../../components/nfc/t4t_lib;../../../../../../components/nfc/t4t_parser/apdu;../../../../../../components/nfc/t4t_parser/cc_file;../../../../../../components/nfc/t4t_parser/hl_detection_procedure;../../../../../../components/nfc/t4t_parser/tlv;../../../../../../components/softdevice/common;../../../../../../components/softdevice/s140/headers;../../../../../../components/softdevice/s140/headers/nrf52;../../../../../../components/toolchain/cmsis/include;../../../../../../external/fprintf;../../../../../../external/mbedtls/include;../../../../../../external/nrf_cc310/include;../../../../../../external/nrf_oberon;../../../../../../external/nrf_oberon/include;../../../../../../external/nrf_tls/mbedtls/nrf_crypto/config;../../../../../../external/segger_rtt;../../../../../../external/utf_converter;../../../../../../integration/nrfx;../../../../../../integration/nrfx/legacy;../../../../../../modules/nrfx;../../../../../../modules/nrfx/drivers/include;../../../../../../modules/nrfx/hal;../../../../../../modules/nrfx/mdk;../config;"
    +      c_preprocessor_definitions="APP_TIMER_V2;APP_TIMER_V2_RTC1_ENABLED;BLE_STACK_SUPPORT_REQD;BOARD_PCA10056;CONFIG_GPIO_AS_PINRESET;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;MBEDTLS_CONFIG_FILE=&quot;nrf_crypto_mbedtls_config.h&quot;;NO_VTOR_CONFIG;NRF52840_XXAA;NRF_CRYPTO_MAX_INSTANCE_COUNT=1;NRF_SD_BLE_API_VERSION=7;S140;SOFTDEVICE_PRESENT;"
           debug_target_connection="J-Link"
           gcc_entry_point="Reset_Handler"
           macros="CMSIS_CONFIG_TOOL=../../../../../../external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar"
    -      debug_register_definition_file="../../../../../../modules/nrfx/mdk/nrf52.svd"
    -      debug_additional_load_file="../../../../../../components/softdevice/s132/hex/s132_nrf52_7.2.0_softdevice.hex"
    +      debug_register_definition_file="../../../../../../modules/nrfx/mdk/nrf52840.svd"
    +      debug_additional_load_file="../../../../../../components/softdevice/s140/hex/s140_nrf52_7.2.0_softdevice.hex"
           debug_start_from_entry_point_symbol="No"
           gcc_debugging_level="Level 3"      linker_output_format="hex"
           linker_printf_width_precision_supported="Yes"
           linker_printf_fmt_level="long"
           linker_scanf_fmt_level="long"
           linker_section_placement_file="flash_placement.xml"
    -      linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x80000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x10000;FLASH_START=0x26000;FLASH_SIZE=0x5a000;RAM_START=0x20002bd0;RAM_SIZE=0xd430"
    +      linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x27000;FLASH_SIZE=0xd9000;RAM_START=0x20002be0;RAM_SIZE=0x3d420"
           
    -      linker_section_placements_segments="FLASH RX 0x0 0x80000;RAM1 RWX 0x20000000 0x10000"
    +      linker_section_placements_segments="FLASH RX 0x0 0x100000;RAM1 RWX 0x20000000 0x40000"
           project_directory=""
           project_type="Executable" />
           <folder Name="Segger Startup Files">
    @@ -136,9 +136,24 @@
           <file file_name="../../../../../../external/segger_rtt/SEGGER_RTT_printf.c" />
         </folder>
         <folder Name="None">
    -      <file file_name="../../../../../../modules/nrfx/mdk/ses_startup_nrf52.s" />
    +      <file file_name="../../../../../../modules/nrfx/mdk/ses_startup_nrf52840.s" />
           <file file_name="../../../../../../modules/nrfx/mdk/ses_startup_nrf_common.s" />
    -      <file file_name="../../../../../../modules/nrfx/mdk/system_nrf52.c" />
    +      <file file_name="../../../../../../modules/nrfx/mdk/system_nrf52840.c" />
    +    </folder>
    +    <folder Name="nRF_Crypto backend CC310">
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_aes.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_aes_aead.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_chacha_poly_aead.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_ecc.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_ecdh.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_ecdsa.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_eddsa.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_hash.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_hmac.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_init.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_mutex.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_rng.c" />
    +      <file file_name="../../../../../../components/libraries/crypto/backend/cc310/cc310_backend_shared.c" />
         </folder>
         <folder Name="nRF_BLE">
           <file file_name="../../../../../../components/ble/peer_manager/auth_status_tracker.c" />
    

    2) Switch my example project to the s132. This is much more involved. I am hoping that I can just swap out the s140 files with the s132 files, change the keys to match and also change the command I use on the nrf util line when I am generating packets and I will be good to go.

     It depends on the project, but it's often pretty straight forward to convert a project from one 52 variant to another. I guess the trick is to work directly with the xml encoded .emProject file and not do everything through the GUI (takes time to navigate through the setting menus).

    First off, am I correct in assuming that I will have to convert to the s132 soft device on the NRF528232 chip?

     Yes, s140 has not been qualified for this chip as you can see here: SDKs and SoftDevices. 

    The nRF52 Series comparison table can also be used as a quick lookup to compare the difference in HW features between the 52832 and 52840.

    Best regards,

    Vidar

Children
No Data
Related