Sysprogs forums › Forums › VisualGDB › VisualGDB and Nordic SDK 14.2
- This topic has 14 replies, 3 voices, and was last updated 6 years, 6 months ago by Luna.
-
AuthorPosts
-
April 2, 2018 at 17:00 #20587LunaParticipant
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
April 3, 2018 at 04:35 #20589supportKeymasterHi,
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.
April 3, 2018 at 18:22 #20594LunaParticipantHi 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.April 3, 2018 at 19:34 #20602supportKeymasterHi,
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.
April 5, 2018 at 23:32 #20621LunaParticipantOh 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.
April 6, 2018 at 02:33 #20628supportKeymasterHi,
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).
April 9, 2018 at 22:17 #20654LunaParticipantguys, 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.
April 10, 2018 at 02:42 #20658supportKeymasterHi,
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.
May 23, 2018 at 14:05 #20983samo4ParticipantSorry 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.
May 24, 2018 at 18:00 #20994supportKeymasterHi,
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.
June 7, 2018 at 02:22 #21060LunaParticipantI 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
June 8, 2018 at 04:45 #21061supportKeymasterHi,
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.
June 13, 2018 at 17:14 #21084LunaParticipantHi 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!!!
June 14, 2018 at 02:07 #21095supportKeymasterHi,
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.
June 14, 2018 at 20:59 #21109LunaParticipantThis 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
-
AuthorPosts
- You must be logged in to reply to this topic.