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

Integrate SoftDevice Stack into IAR Workbench 7.80.4 for ARM

Hi, I'm trying to rate nrf52832 with stack ble_app_uart softdevice. My IDE is the IAR workbench for ARM 7.80.4. I downloaded the latest version nRF 5_SDK_15.0.0_a53641a, which contains a folder with include files and ble_app_uart_pca10040_s132.the hex file. My question is what should I do with it .hex file? How can I integrate this into my overall app?

Thank you.

  • From its name that hex file looks like a precompiled application that supports Bluetooth and UART. I don't think that you will be able to use that along with your own application code.

    You should be looking for something like s132_nrf52_6.0.0_softdevice.hex for the precompiled SoftDevice (its in components/softdevice/S132/hex). Your application code just needs to include the header files in components/softdevice/s132/headers to utilize the SoftDevice API. You only really need the SoftDevice if you need to support Bluetooth or one of the other RF stacks.

    The softdevice is usually programmed into your device separately using nRfGo Studio, although there may be a way of setting IAR to do this for you when loading your application - is that what you're after?

  • Yes. 

    How can I integrate softdevice into my IAR Workbench 7.80.4 for ARM?

  • Hello,

    The file called ble_app_uart_pca10040_s132.hex, which I assume you found in:

    SDK15.0.0\examples\ble_peripheral\ble_app_uart\hex

    is a precompiled application, merged with the softdevice.

     

    If you want to modify the example, you should use the project file, SDK15.0.0\examples\ble_peripheral\ble_app_uart\ble_app_uart.eww if you use IAR, and compile this.

    Then you can either flash the example directly from IAR, or you can use the .hex file which will be generated in ble_app_uart\pca10040\s132\iar\_build

    (I don't remember if the last folder is called "_build" or "output" or something else. It should contain a .hex file somewhere inside the iar folder).

     

    If you compile the project yourself, you must remember to flash the softdevice first. The softdevice is located in:

    SDK15.0.0\components\softdevice\s132\hex\*.hex

     

    You can flash the softdevice using either nRFgo Studio, or nrfjprog (command line tools).

     

    Let me know if it doesn't work.

     

    Best regards,

    Edvin

  • I don't think this is possible in IAR. If you change to Segger Embedded Workbench (SES) instead of IAR, then this can upload the softdevice for you. If you don't use SES, you have to upload the softdevice separately, as explained, using e.g. nRFgo Studio. You only need to do this once, since the softdevice and application are written to different parts of the flash. The IDE will not overwrite the softdevice.

     

    Best regards,

    Edvin

Related