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

Syntax error while builing solution for Thingy using Segger Embedded Studio

Hi there,

I’m trying to port Thingy to Segger Embedded Studio.  After reviewing some related blogs on devzone and github, I have imported the Keil project into SES.  All files are compiled ok but there is still an error which I am not able to fix.

C:/Program Files/SEGGER/SES 3.30/gcc/arm-none-eabi/bin/ld:C:/Nordic_Semi/thingy_sdk_v2.1.0/project/pca20020_s132/arm5_no_packs/Output/ble_app_thingy_s132_pca20020 debug_v1_0_0/Obj/ble_app_thingy_s132_pca20020.ld:27: syntax error

Below shows the steps I use to import the Keil project.

  1. Under “thing_sdk_v2.1.0” folder, run setup_sdk.bat.
  2. Base on standard flash_placement.xml, create flash_placement_thing.xml with

            <MemorySegment name=”FLASH” …….

                <ProgramSection alignment="4" keep="Yes" load="Yes" runin=".fs_data_run" name=".fs_data" />

            ….

           <MemorySegment name= “RAM” …

               <ProgramSection alignment="4" keep="Yes" load="No" name=".fs_data_run" address_symbol="__start_fs_data"  end_symbol="__stop_fs_data" />

           ......

  1. Copy file “flash_placement_thingy.xml” to $(StudioDir)\targets\Cortex_M folder.
  2. Import ble_app_thingy_s132_pca20020.uvoptx from C:\Nordic_Semi\thingy_sdk_v2.1.0\project\pca20020_s132\arm5_no_packs folder.
  3. Under Project Explorer, right click on “Internal Files”, remove all files.  Then add existing files system_nrf52.c, ses_nrf52_startup.s and thumb_crt0.s.  

            In thumb_crt0.s, following lines are added after  

                ldr r2, =__tdata_end__     

               bl memory_copy

           add below 4 lines

               ldr r0, =__fs_data_load_start__

               ldr r1, =__fs_data_start__

               ldr r2, =__fs_data_end__

               bl memory_copy

  1. Edit Options => Code => Linker,

Section Placement File:  $(StudioDir)/targets/Cortex_M/flash_placement_thingy.xml

Section Placement Macros:  START_FLASH=0x1F000  START_SRAM=0x20004170

Section Placement Segments:  FLASH RX 0x0 0x80000  RAM RWX 0x20000000 0x10000

  1. Edit Options => Code => Preprocessor => User Include Directories, add ../../../sdk_components/device
  2. Right click nRF_Segger_RTT, remove “RTT_Syscalls_KEIL.c”
  3. Download "Embedded MotionDriver 6.12" from invensense.com.  Unzip the folder libmpllib_Keil_M4FP.zip and copy the extracted library libmpllib.lib into C:\Nordic_Semi\thingy_sdk_v2.1.0\libs\libmpllib_Keil_M4FP\.  Unzip /motion_driver_6.12/mpl libraries/arm/gcc4.9.3/liblibmplmpu_m4_hardfp.zip and copy the extracted library liblibmplmpu.a into the folder C:\Nordic_Semi\thingy_sdk_v2.1.0\libs\liblibmplmpu_m4_hardfp\.
  4. Build => Rebuild Solution.  The following error was shown.

Linking ble_app_thingy_s132_pca20020.elf

C:/Program Files/SEGGER/SES 3.30/gcc/arm-none-eabi/bin/ld:C:/Nordic_Semi/thingy_sdk_v2.1.0/project/pca20020_s132/arm5_no_packs/Output/ble_app_thingy_s132_pca20020 debug_v1_0_0/Obj/ble_app_thingy_s132_pca20020.ld:27: syntax error

It would be great if someone can help with this.  

Thanks!

Parents Reply Children
No Data
Related