VisualGDB and Nordic SDK 14.2

Sysprogs forums Forums VisualGDB VisualGDB and Nordic SDK 14.2

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #20587
    Luna
    Participant

    Hi there,

    I would like to know if is possible for this version nRF52 14.2 separate my code from the softdevice when building.

    in previous versions it was possible (build just the code, no code+softdevice build), but I am unable to find it on the latest version

     

    Regards,

    Luna

    #20589
    support
    Keymaster

    Hi,

    It should be still possible with 14.2. Simply select “No softdevice” or “Softdevice (Programmed separately)” on the first page of VisualGDB Project Properties.

    If this doesn’t work, please attach a screenshot of the corresponding property page showing the expanded “Softdevice” combo box so we could check what is going on.

    #20594
    Luna
    Participant

    Hi these are the screenshot when using the version 14.2 (where I could not see the softdevice check box option) and the version 13.3 where the softdevice check box availableble for me

    Attachments:
    You must be logged in to view attached files.
    #20602
    support
    Keymaster

    Hi,

    Thanks for the screenshots. In v14.2 the setting was moved from a separate checkbox to another entry in the “Softdevice” combo box. Simply select “S132 (Programmed Separately)” for the same effect.

    #20621
    Luna
    Participant

    Oh thanks I found it, but I still have an issue. After I selected “S132 (Programmed Separately)”  and build the project. I got the following:

    Error nrf_sdm.h: No such file or directory
    Error [Clang IntelliSense] Error: no matching function for call to ‘sd_ble_gap_disconnect’
    Error nrf_sdm.h: No such file or directory

     

    • This reply was modified 6 years, 8 months ago by Luna.
    #20628
    support
    Keymaster

    Hi,

    Thanks for pointing this out, looks like our bug. We have released an update to the Nordic BSP resolving this. Please update via Tools->VisualGDB->Manage VisualGDB Packages (you will need to regenerate the MCU-specific files in order to get the project to build).

    #20654
    Luna
    Participant

    guys, I am sorry for bothering you, after I updated Nordic BSP and re-generated the MCU-specific files, I am able to build my app when is selected S132 ( programmed separately), but I am unable to see a reduced app size, correct me if I am wrong but it looks is building something like: app+softdevice, before I upgraded the version to 14.2 or 14.2 r2 my app was around 80KB(ver 13.0 r3), now it is larger than 200KB!

    • This reply was modified 6 years, 8 months ago by Luna.
    #20658
    support
    Keymaster

    Hi,

    No problem and sorry for the confusion. The “programmed separately” mode will still reserve the memory for the softdevice (it will be filled with 0xFFs and won’t contain the actual softdevice firmware). You will still need to program the softdevice into the FLASH memory before your softdevice-enabled firmware can run (if you are not using a softdevice, select “none” instead of “programmed separately”).

    If this doesn’t help, please let us know what you are trying to achieve and we can easily release another hotfix that will enable your use case – after all the goal of VisualGDB is to make your development experience as seamless as possible.

    #20983
    samo4
    Participant

    Sorry to hijack this post, but I still believe that compiling for separate Softdevice is not working properly.

    I just updated to 5.3 with the latest BSP (deleted the old one and reinstalled) and if I create an empty new project with “S132 (programmed separately)” the project includes this:

    nRF5x\components\drivers_nrf\nrf_soc_nosd

    which is obviously wrong since as these header files are for situation without softdevice.

     

    #20994
    support
    Keymaster

    Hi,

    Sorry for the inconvenience. This looks like something that was fixed in the recent Nordic BSP hotfix (14.2R2). Please ensure you install the latest version via Tools->VisualGDB->Manage VisualGDB Packages.

    #21060
    Luna
    Participant

    I also believe that. because it does not make any difference reducing or increasing the code size when choosing “Separate Softdevice” on the version 14R2, but when we are using the version 13.R3 and selected Separate Softdevice reduces 124kb giving a total of 19kb in the flash usage vs 143kb when is selected program with Softdevice

    please see the examples below where I am comparing  Nordic GDB 13.R3 vs Nordic GDB 14R2 vs Nordic SDK 14.2

    all using the same project Beacon for the different SDK versions and Nordic GDB releases from you

    #21061
    support
    Keymaster

    Hi,

    Some of the previous BSP releases from us contained a bug when selecting “softdevice programmed separately” caused the code to be compiled without softdevice support (i.e. excluding some functions and ultimately making the firmware unusable). The behavior you are describing might be caused by this bug.

    If the file produced by the Nordic build scripts is much smaller, please check the memory utilization via View->Embedded Memory Explorer. It should help quickly locate the functions responsible for most of the RAM/FLASH footprint. If most of the footprint comes from the standard library, please ensure you are using newlib-nano and our latest GCC toolchain.

    #21084
    Luna
    Participant

    Hi there, I tried to check the memory utilization via View->Embedded Memory Explorer. So the app size when I am using 13R3 is 18k and when I am using 14R2 it seems slightly bigger, 29k ( so I can live with that), also compared it using the same project using the Nordic SDK 14.2. (my post above)

    But my issue is at time of building the project this is adding the softdevice extra size to my .hex and .bin files which affects my application because I need to transfer my app files thru Bluetooth, it affects directly my application performance and battery life, transfer 170kb are harder than only 19kb when I am using the version 13R3. On my true application are more than 400kb!!!

    #21095
    support
    Keymaster

    Hi,

    OK, thanks for clarifying your scenario with the over-the-air update. We will try to optimize this in the upcoming BSP based on SDK 15.0.

    As a workaround, please create a local copy of the linker script file (sXXX_reserve.lds) and remove the SECTIONS {} part containing the .softdevice and .softdevice_sram sections. This should completely remove the softdevice sections from the final image, reducing its upload size.

    #21109
    Luna
    Participant

    This solves all my problems it was a lifesaver for me thanks to you guys

    I am saving over 146kb on Flash and 24k on RAM

    Regards, Luna

     

     

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.