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

issues with latest SDK 11.0.0-2

I recently grabbed the latest SDK nRF5_SDK_11.0.0-2.alpha. I was looking at some of the changes and wanted to run one or two demos to make sure I was able to build them properly and I could see debug output.

So far I haven't been able to get the hrs_rscs_relay example to run. I've programmed the newer softdevice that was contained in the SDK. I've tried IAR and GCC. Both build without errors. The IAR-generated hex file also programs into flash without errors. When running, I see a single 'R' in the debug output and nothing else. I am using Putty as I did successfully with the older 0.9.2 SDK. I have the correct baud rate.

The GCC-generaed hex file does not program - it compains that part of the image resides in the softdevice area of flash. I haven't made any changes to the IAR project, other than this to get the section placement to work:

Modify line 42 in file “\components\libraries\experimental_section_vars/section_vars.h” as follows: From

#define NRF_SECTION_VARS_REGISTER_SECTION(section_name) NRF_PRAGMA(section = ## #section_name )

to

#define NRF_SECTION_VARS_REGISTER_SECTION(section_name) NRF_PRAGMA(section = #section_name )

I'm not sure why that text became supersized. I'm not using markup.

I'm not sure why the GCC-generated image has some portion outside the application range. I'm attaching the map file for the gcc case. The gcc example is untouched. The only thing I changed was the Makefile.windows to have it point to the correct version of gcc on my machine.

Have others had similar problems?

nrf52832_xxaa_s132.map

  • fs_data_out               0x00000000       0x10  
                              0x00000000                PROVIDE (__start_fs_data, .)
    *(fs_data) fs_data        0x00000000       0x10 _build/fds.o 
                              0x00000010                PROVIDE (__stop_fs_data, .)
    

    looks like the problem. That's been placed down at 0x00000000.

    Looking at the linker file it has no region (eg > RAM) so I think it would get placed into default which is 0x00000000 and that won't work. I believe the '=0' at the end of it just says it must be zero-filled.

  • Thanks - yes this fs_data_out section is apparently new this latest SDK. I guess I'll try to figure out where it is supposed to be placed.

  • OK, so I see the mechanism being used here. Basically any Nordic demo in 11.0.0-2.alpha that uses fds.c will have the FS_SECTION_VARS_ADD macro try to place a structure there. So where is this 'fs_data' section that the fstorage module needs really supposed to live?

  • Now I'm reading that there can be only one SECTIONS defined, though with multiple entries inside. Nordic has created two sections - one in the project-specific linker file and one via the INCLUDE "nrf5x_common.ld". Can we just move the .fs_data_out definition into nrf5x_common.ld? Then add the "> FLASH" so that it sits in the user area of flash and not forbidden softdevice 0x0 address?

    Moving the .fs_data_out section definition into the common linker file did the trick. It gets put into the user-app area of flash. Thanks for getting me on the right path, RK. Nordic, can you fix this please? Thx

  • Well there you go - you found something I didn't know - that you can't have two SECTIONS commands in a linker script. Shame 'ld' doesn't flag that as an error!

    Yes moving it into the main one works, and even though that's common, I can't see why it would be a problem, nothing else has that section, so it doesn't affect anything else.

    In the quest to add a HAL to the SDK, make the drivers all singing-and-dancing and abstract away everything which might be confusing, the SDK is getting harder to use. It took me a while to figure out what fs_data even does and when I did I thought .. oh is that it.

    For getting things fixed, file a My Page support request, they get dealt with pretty quickly, I reported some nRF52 makefile oddities there earlier and someone fixed them.

Related