[SOLVED] Problem with new projects: "Relocation R_ARM_THM_CALL"

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

  • [SOLVED] Problem with new projects: "Relocation R_ARM_THM_CALL"

    Hello,
    faced the following problem.
    I am creating a new project for the nrf52840 microcontroller, with standart parameters:


    After, run build. But it's not successfully:

    Source Code

    1. Building ‘devkit’ from solution ‘devkit’ in configuration ‘Debug’
    2. Compiling ‘system_nrf52840.c’
    3. Compiling ‘SEGGER_RTT.c’
    4. Compiling ‘SEGGER_RTT_SES.c’
    5. Compiling ‘main.c’
    6. Assembling ‘SEGGER_THUMB_Startup.s’
    7. Assembling ‘ses_startup_nrf52840.s’
    8. Assembling ‘ses_startup_nrf_common.s’
    9. Linking devkit.elf
    10. relocation R_ARM_THM_CALL to Arm-mode function not supported on this core, from .init to afterInitialize
    11. See https://wiki.segger.com/Correct_typing_of_Thumb_functions for help on correcting this
    12. Call from section .init made to afterInitialize but afterInitialize is a symbol without the low bit set
    13. Call from section .init made to afterInitialize but afterInitialize is a symbol without the low bit set
    14. Call from section .init made to afterInitialize but afterInitialize is a symbol without the low bit set
    15. Call from section .init made to afterInitialize but afterInitialize is a symbol without the low bit set
    16. Build failed
    Display All
    Build failed

    What's happen? Previously, the project was created without any problems and was assembled with default settings.

    if your need, project available here

    P.s
    System Windows 8.1 Pro
    SES: 5.10 x64

    Best regards,
    Maxim
  • Hi,

    Unfortunately, I can repeat this issue on a brand new install of Segger Embedded Studio 5.10a for Ubuntu 20.04 x64, when targeting a nRF52832 device.

    The steps above are appropriate to reproduce this error.

    Cheers.
  • Hi, I had the same issue.
    I fixed this by adding a missing '.thumb_func' in the file ses_startup_nrf_commons.s (in 'System Files'), before the line 'afterInitialize:' around line 105.

    Source Code

    1. Reset_Handler:
    2. /* Perform prestart tasks. */
    3. b nRFInitialize
    4. .thumb_func
    5. afterInitialize:
    6. #ifndef NO_STACK_INIT
    7. /* Initialise main stack */
    8. ldr r0, =STACK_INIT_VAL
    9. ldr r1, =0x7
    10. bics r0, r1
    11. mov sp, r0
    12. #endif
    Display All
  • cnaess wrote:

    Hi, I had the same issue.
    I fixed this by adding a missing '.thumb_func' in the file ses_startup_nrf_commons.s (in 'System Files'), before the line 'afterInitialize:' around line 105.

    Source Code

    1. Reset_Handler:
    2. /* Perform prestart tasks. */
    3. b nRFInitialize
    4. .thumb_func
    5. afterInitialize:
    6. #ifndef NO_STACK_INIT
    7. /* Initialise main stack */
    8. ldr r0, =STACK_INIT_VAL
    9. ldr r1, =0x7
    10. bics r0, r1
    11. mov sp, r0
    12. #endif
    Display All
    Thanks, It's really worked. You are a wizard.
    How could you come to this?
  • cnaess wrote:

    It describes the cause of the error which is missing .thumb_func, so I just went through all the assembler files in the project looking for missing ones.
    exactly. I just didn't look closely enough at the .asm files.


    I hope Segger will make this change in the next release
  • Hello,

    Thank you for your inquiry.
    We are currently working with Nordic (as they maintain this package) on making the nRF Package ES V5 compatible, so a fixed ES nRF CPU support package should be available shortly.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    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 you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.