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

SDK10 feature "Section variables" with Microsoft compiler

Hi

We are using the SDK files in our hardware projects and in our simulation environments to verify the functionality of our platform. While doing tests with the new SDK 10 and specially the feature peer manager i struggled over the feature "Section variables" required for FDS and FStorage (both layers below the peer manager). The "Section variables" have support for Keil, IAR and GCC, but no other compilers.

I tried to add support for our Microsoft compiler (VS2015) but i failed. Section support is available, but i couldn't manage to make it work.

Will there be support for other compilers? Any idea how this can be done?

Regards Adrian

  • There are no plans for supporting other compilers that I am aware of.

    Are you using part of the SDK for testing your cod on a computer, mocking code that is tied to hardware etc? In such case I guess you would probably have more luck using GCC.

    It should be possible to add support for other compilers in components/libraries/experimental_section_vars/section_vars.h. Maybe some other contributes on this forum has experience with sections in Visual Studio?

  • I've described our concept of using the SDK to simulate our target on Windows environments by using a connectivity dongle here: devzone.nordicsemi.com/.../

    This is why we are bound to visual studio compiler and can't switch to GCC here. The complete environment uses Visual Studio and the integrated C#/WPF support.

  • This appears in the forum sidebar: "Developing Nordic nRF51822 Beacon Kit Firmware with Visual Studio"

    Does it help...?

    Edit: Ah: it's using GCC - so probably not. :-(

  • After reading a few pages discussing the sections in Visual Stidio i came to the conclusion that t hey are not directly comparable the sections in IAR, Keil and GCC. The biggest problems seams to be that the size of a section is not available. At the moment i've no idea how to implement this on visual studio compiler :-(.

  • It should be possible to implement this for Visual Studio as well, thought we have not done it. Maybe you can look at how it is done for GCC attempt to adapt it. This thread on stack overflow seems to be relevant. Edit: updated link.

1 2