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

nrf52840 + S140 6.1.1 + DFU example IAR + nRFGO

Good evening,

We are trying to flash the bootloader DFU debug example using 10056 ble debug example code to our nRF52840 based board.

Everytime we try to flash, we get an error message about writing in the SoftDevice area.

End of Softdevice address is 0X26000 for S140 6.1.1. We are not sure how to configure IAR to make it work.

We can flash Softdevice S140 6.1.1 with nRFGO studio + our application and it works.

However, we struggle to flash the bootloader nRF52840 BLE DFU debug example from the latest SDK (15.3.0)

We need to flash softdevice before flashing the DFU example right?  

Our chip is BL654 from Laird.

What has to be changed from the SDK files to make it work? What configuration in IAR?

Taking the SDK files without touching anything and trying to compile on IAR straight away gives us a mistake.

Do we only need to change the addresses in the linker configuration? If yes, could you guide us with the memory addresses we need to put? Do we need to manually modify the linker configuration document?

Where can we find the memory allocation for nrf52840 and S140 softdevice 6.1.1? we have found 6.0.X and read the migration documents but couldn't figure out the table as shown in the documentation.

Thank you!

Francois

Parents
  • Hi Francois.

    First of all, I recommend that you don't use nRFgoStudio any more, as it is outdated and will not be updated, you should use nRF Connect Programmer instead.

    It should not matter which part of the FLASH memory you program first, as long as it does not overlap.

    The structure of the FLASH memory is like this:

    Here is an example of how memory region looks for the bootloader example found in folder examples\dfu\secure_bootloader\pca10056_ble_debug and the S140 V6.1.1 SoftDevice:

    As you can see, the SoftDevice is at the bottom, and the bootloader is at the top of the memory region.

    When you say that you can flash the Application and the SoftDevice, but struggle to flash the bootloader, do you still have the Application flashed as well? Maybe it is the Application you flashed previous that occupy some memory?

    The examples from the SDK should come preconfigured, so you should not have to do any configurations.

    Best regards,

    Andreas

  • Another point, when we try to download and debug the bootloader code using IAR on our chip, we get this error:
    "Warning: Stack pointer is set to incorrect alignment Stack addr = 0xFFFFFFFF"
    This problem does not allow us to debug the code and see where it is stacked

  • Hi.

    I've looked into that, and it appears that there is a fault in IAR, I receive the same error as well when I try to download and debug with IAR.

    I don't get the error if I program with command line or nRF Connect Programmer, and start the debugging session without downloading.

    Here, I've programmed with nRF Connect:

    And clicked on "Debug without Downloading"

    And I did not get the error.

    I have reported this internally.

    Are you able to do it this way?

    Best regards,

    Andreas

Reply
  • Hi.

    I've looked into that, and it appears that there is a fault in IAR, I receive the same error as well when I try to download and debug with IAR.

    I don't get the error if I program with command line or nRF Connect Programmer, and start the debugging session without downloading.

    Here, I've programmed with nRF Connect:

    And clicked on "Debug without Downloading"

    And I did not get the error.

    I have reported this internally.

    Are you able to do it this way?

    Best regards,

    Andreas

Children
No Data
Related