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.

Incorrect use of _symval causes TI MSP430 v15.12.2.2.LTS internal compiler error



While using MSP430 compiler v15.12.2.2.LTS to create a project for a MSP540F5438 used the _symval in the following call:

    memcpy ((void *) (_symval (RAM_VECTORS_START_SYM)), (void*)(0xFF80), 0x80);

i.e. made a coding error by not taking the address of the linker defined RAM_VECTORS_START_SYM symbol. This caused the compiler to report a warning but then crash with an internal error:

Building file: ../main.c
Invoking: MSP430 Compiler
"/opt/ti/ti_ccs6_1_3/ccsv6/tools/compiler/msp430_15.12.2.LTS/bin/cl430" -vmspx --data_model=restricted --use_hw_mpy=F5 --include_path="/opt/ti/ti_ccs6_1_3/ccsv6/ccs_base/msp430/include" --include_path="/home/Mr_Halfword/workspace_v6_1_3/MSP430F5xx_6xx_isr_during_flash_ops/driverlib/MSP430F5xx_6xx" --include_path="/opt/ti/ti_ccs6_1_3/ccsv6/tools/compiler/msp430_15.12.2.LTS/include" --advice:power="none" -g --define=DEPRECATED --define=__MSP430F5438__ --diag_wrap=off --diag_warning=225 --display_error_number --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal --preproc_with_compile --preproc_dependency="main.d"  "../main.c"

>> Compilation failure
subdir_rules.mk:7: recipe for target 'main.obj' failed
"../main.c", line 41: warning #169-D: argument of type "char" is incompatible with parameter of type "const void *"
>> ../main.c, line 41: INTERNAL ERROR: no match for ICALL


This may be a serious problem.  Please contact customer support with a
description of this problem and a sample of the source files that caused this
INTERNAL ERROR message to appear.

Cannot continue compilation - ABORTING!

The complete CCS 6.1.3 project is attached. MSP430F5xx_6xx_isr_during_flash_ops.zip

When the code was corrected to the following the compiler produced no warnings, no longer crashed and generated the correct code:

    memcpy ((void *) (_symval (&RAM_VECTORS_START_SYM)), (void*)(0xFF80), 0x80);