[SOLVED] Syntax error while building solution for Nordic Thingy platform using Segger Embedded Studio

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Syntax error while building solution for Nordic Thingy platform using Segger Embedded Studio

    Hi there,

    I’m trying to port Nordic Thingy to Segger Embedded Studio. After reviewing some related blogs, 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" />
    3. Copy file “flash_placement_thingy.xml” to $(StudioDir)\targets\Cortex_M folder.
    4. Import ble_app_thingy_s132_pca20020.uvoptx from C:\Nordic_Semi\thingy_sdk_v2.1.0\project\pca20020_s132\arm5_no_packs folder.
    5. 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
    6. 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
    7. Edit Options => Code => Preprocessor => User Include Directories, add ../../../sdk_components/device
    8. Right click nRF_Segger_RTT, remove “RTT_Syscalls_KEIL.c”
    9. Download "Embedded MotionDriver 6.12" from www.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\.
    10. 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!
    Images
    • SES link error 25Apr2018.jpg

      261.46 kB, 1,318×648, viewed 113 times
    Files
    • SES files.zip

      (10.32 kB, downloaded 64 times, last: )
  • Hello,

    Thank you for your inquiry.
    Generally importing projects to ES from Keil does work immediatly for simple projects. The thingy project has a more complex nature and extra steps are required.
    Is there a particular reason why you are trying to import the Keil project from the thingy SDK and not using the already prepared Embedded Studio project?
    SEGGER has a partnership with Nordic for a while now and you can simply launch the already configured project for Embedded Studio from the SDK under:
    thingy_sdk_v2.1.0\project\pca20020_s132\ses

    Does it work if you run that project?

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us

  • Hello Sunny,

    Great to hear that you are up and running again.
    We will consider this thread as solved now.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us