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

Porting Nordic Thingy:52 to Segger Embedded Studio on a Mac

Hi,

I am trying to port the Thingy project (ble_app_thingy_s132_pca20020) to Segger Embedded Studio on a Mac and it proved to be not an easy task, in fact I have hit a few road blocks.

I have followed step by step the instructions here: devzone.nordicsemi.com/.../, which worked for the project ble_app_beacon but not for the Thingy project.

After that, I followed the instructions from the README here: github.com/.../Nordic-Thingy52-FW and in particular step 5. Finally, I “Excluded from Build” RTT_Syscalls_KEIL.c and “Add Existing File” /Applications/SEGGER Embedded Studio 3.24/samples/SEGGER_RTT_Syscalls_SES.c

Now I get a list of errors which start from the following:

Output/release/Exe/ble_app_thingy_s132_pca20020.elf section `.bootloaderSettings' will not fit in region `UNPLACED_SECTIONS’
region `UNPLACED_SECTIONS' overflowed by 4096 bytes
Output/ble_app_thingy_s132_pca20020 release/Obj/drv_speaker.o: In function `drv_speaker_tone_start’:    
undefined reference to `arm_sin_f32’    
Output/ble_app_thingy_s132_pca20020 release/Obj/drv_motion.o: In function `mpulib_init’:

I tried a few other things but with no luck. Having checked the Keil project (and the .ld file), I realized that SRAM may instead start from 0x20004068, therefore I modified the Linker->Section Placement Macro as follows:

START_FLASH=0x1F000
START_SRAM=0x20004068

I have found an interested thread in which there is some suggestion on how to modify the flash_placement and MemoryMap: devzone.nordicsemi.com/.../. I have tried a few combinations (also referencing the ble_app_thingy_gcc_nrf52.ld and secure_dfu_gcc_nrf52.ld) but they didn’t seem to make any real difference.

Some extra information…

Running nrfutil settings display on thingy_v1.1.0.HW_1.0.hex gives me this:

Bootloader DFU Settings:
* File:                 thingy_v1.1.0.HW_1.0.hex
* Family:               nRF52
* CRC:                  0x92445664
* Settings Version:     0x00000001 (1)
* App Version:          0x00000001 (1)
* Bootloader Version:   0x00000002 (2)
* Bank Layout:          0x00000000
* Current Bank:         0x00000000
* Application Size:     0x00026B98 (158616 bytes)
* Application CRC:      0x61E2385F
* Bank0 Bank Code:      0x00000001

Looking at the tutorial I believe that Memory Map for the Thingy should be:

BOOTLOADER: start=0x78000, Size=32kB APPLICATION: start=0x1F000, Size=356kB SoftDevice: size=124kB

Does it look ok?

I would be great if anyone will be able to help with this as I believe may affect a number of people.

Thanks!

Related