Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE
Tool/software: TI C/C++ Compiler
Hi there
I have developed some filter by CLA assembler for TMS320F2837x and tried to compile it for TMS320F2838x and have met next problem
for example some part of *.asm file
.cdecls C
%{
#include "cla_adc_Filter_shared.h"
#include <f2838x_cla.h>
#include <f2838x_piectrl.h>
#include <f2838x_pie_defines.h>
#include <f2838x_device.h>
#include <stdint.h>
extern float W5;
extern float W4;
extern float W3;
extern float W2;
extern float W1;
extern float K;
extern float g_fFk;
extern uint16_t g_ui16Clear_Interrupt;
extern volatile struct ADC_RESULT_REGS AdcaResultRegs;
extern volatile struct CLA_SOFTINT_REGS Cla1SoftIntRegs;
extern volatile struct ADC_REGS AdcaRegs;
extern int16_t New_Filtered_DataA0;
extern int16_t New_Filtered_DataA1;
extern int16_t New_Filtered_DataA2;
extern int16_t New_Filtered_DataA3;
extern int16_t New_Filtered_DataA4;
extern int16_t New_Filtered_DataA5;
extern uint32_t g_ui32Counters[6];
extern int16_t Is_Data;
/*************************************************************************************/
%}
Array_LocationA_0: .word _New_Filtered_DataA0
Array_LocationA_1: .word _New_Filtered_DataA1
Array_LocationA_2: .word _New_Filtered_DataA2
Array_LocationA_3: .word _New_Filtered_DataA3
Array_LocationA_4: .word _New_Filtered_DataA4
Array_LocationA_5: .word _New_Filtered_DataA5
It leads to compile error
../Calculation/CLA/cla_IIR_Filter.asm", ERROR! at EOF: [E0300] The following symbols are undefined:
_New_Filtered_DataA0
_New_Filtered_DataA1
_New_Filtered_DataA2
_New_Filtered_DataA3
_New_Filtered_DataA4
_New_Filtered_DataA5
And code like below
MMOVI16 MAR0,#New_Filtered_DataA2 ; Load Begin of array to Reg
leds to compile error
"/tmp/TI4lfFwgmTm", ERROR! at line 3254: [E0800] Instructions not permitted in structure/union definitions
MAR0 .bits 16 ; unsigned int MAR0 - offset 42 bytes, size (1 bytes|16 bits)
So after some investigation, I have got conclusion that assembler treats exported from C/C++ symbols, without underscore,
so it does not see for example _New_Filtered_DataA0 and in place of Operand Nomenclature MAR0 it has found MAR0 and other CLA registers definition in the
f2838x_cla.h
So question is - how to avoid this problem ?
Best regards
Andrii Shevchuk