This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Install ARM compiler from CCS App Centre, get linker problem

Other Parts Discussed in Thread: MSPWARE

Hi,

After installing the ARM Compiler from the CCS App Centre, I can't link my project any more. I get the following error:

'Invoking: MSP432 Compiler'
"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.6.0.STS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -Ooff --opt_for_speed=1 --include_path="C:/ti/ccsv6/ccs_base/arm/include" --include_path="C:/ti/ccsv6/ccs_base/arm/include/CMSIS" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.6.0.STS/include" --include_path="C:/ti/msp/MSPWare_3_20_00_37/driverlib/driverlib/MSP432P4xx" --include_path="C:/LRR/Common/trunk" --include_path="C:/LRR/Common/trunk/drivers" --include_path="C:/LRR/Common/trunk/dataStructures" --include_path="C:/LRR/Hydra/trunk" --include_path="C:/LRR/Hydra/trunk/drivers" --include_path="C:/LRR/Hydra/trunk/dataStructures" --advice:power="1,2,3,4,5.2,5.3,7,9,10,12" --define=__MSP432P401R__ --define=DEBUG --define=TARGET_IS_MSP432P4XX --define=ccs -g --gcc --printf_support=full --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --common=on --preproc_with_compile --preproc_dependency="msp432_startup_ccs.pp" "../msp432_startup_ccs.c"

"C:\Users\xxxx~1\AppData\Local\Temp\1310810", ERROR! at line 644: [E0001] Address must be of a non-global defined in the current section
B hard_fault_handler_c

from the code:

static void FaultISR(void)
{
  // The following code gets the stack pointer
  // This is then used to find what caused the Fault ISR
  __asm(
      " TST LR, #4\n"
      " ITE EQ\n"
      " MRSEQ R0, MSP\n"            // Depending on what mode the CPU is in, the stack pointer will
      " MRSNE R0, PSP\n"// be either MSP or PSP
      " B hard_fault_handler_c\n"//jump to the hard fault handler to print out debug info
  );

  //
  // Enter an infinite loop.
  //
  while (1)
  {
  }
}

Any ideas?

  • I am unable to reproduce that diagnostic.  Please submit the entire preprocessed source file.

    Thanks and regards,

    -George

  • Here is the file:

    msp432_startup_ccs.zip

    Here is the build output:

    'Building file: ../msp432_startup_ccs.c'
    'Invoking: MSP432 Compiler'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.6.0.STS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me -Ooff --opt_for_speed=1 --include_path="C:/ti/ccsv6/ccs_base/arm/include" --include_path="C:/ti/ccsv6/ccs_base/arm/include/CMSIS" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_16.6.0.STS/include" --include_path="C:/ti/msp/MSPWare_3_20_00_37/driverlib/driverlib/MSP432P4xx" --include_path="C:/LRR/Common/trunk" --include_path="C:/LRR/Common/trunk/drivers" --include_path="C:/LRR/Common/trunk/dataStructures" --include_path="C:/LRR/Hydra/trunk" --include_path="C:/LRR/Hydra/trunk/drivers" --include_path="C:/LRR/Hydra/trunk/dataStructures" --advice:power="1,2,3,4,5.2,5.3,7,9,10,12" --define=__MSP432P401R__ --define=HYDRA_MAINCODE --define=DEBUG --define=TARGET_IS_MSP432P4XX --define=ccs -g --gcc --printf_support=full --preproc_with_comment --preproc_with_compile --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --common=on --section_sizes=on  "../msp432_startup_ccs.c"
    "../msp432_startup_ccs.c", line 233: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../msp432_startup_ccs.c", line 260: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../msp432_startup_ccs.c", line 312: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 313: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 314: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 315: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 316: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 317: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 318: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 319: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 320: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 321: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 322: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 323: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 324: remark #1532-D: (ULP 5.3) Detected printf() operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
    "../msp432_startup_ccs.c", line 344: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "../msp432_startup_ccs.c", line 361: remark #1527-D: (ULP 2.1) Detected SW delay loop using empty loop. Recommend using a timer module instead
    "C:\Users\ADLERJ~1\AppData\Local\Temp\0896010", ERROR!   at line 644: [E0001] Address must be of a non-global defined in the current section
    	 B hard_fault_handler_c
    
    
    Errors in Source - Assembler Aborted
    1 Assembly Error, No Assembly Warnings
    
    >> Compilation failure
    gmake: *** [msp432_startup_ccs.obj] Error 1
    
    **** Build Finished ****

    This does not occur with 5.2.7, or 15.12.3 (which I found out how to install since the first post). I get that it is STS, but it is the default when you click ARM compiler on the App Centre.

  • Thank you for submitting the test case.  I can reproduce the same diagnostic.  I filed CODEGEN-1529 in the SDOWP system to have this investigated.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George

  • CODEGEN-1529 is essentially a duplicate of CODEGEN-1274, fixed in the next ARM compiler release (version number not yet available).
  • Neither of those codes work for me.

  • It used to be called SDSCM00052902, but the ticket at that number has not and will not be updated.  I'll have to ask around to see why CODEGEN-1274 doesn't show up.

    The suggested workaround is to go back to 15.12.3.LTS until the next ARM compiler release is available.

    Alternately, alter the code such that hard_fault_handler_c is a non-global symbol defined in the same section as the branch.  If the symbol must be global, add a second non-global label such as fake_label and change the branch to "B fake_label".

  • Thanks for the explanation.