Hello,
I installed CCS and trying to store constant array in FLASH. in "hello world" project, I put following:
const int testaray[5] = { 0x11, 0x22, 0x33, 0x44, 0x55 };
const int globconst = 0x4142;
But if I have a look into generated MAP file or HEX, I can see only "globconst" variable. No "testarray" values at all.
Below is the part of LST file. I see that there is different section for "testarray" and it looks it is not linked into HEX. What shall I do to correctly link such application ?
Thank you in advance.
40 000000 .sect ".const:testaray"
41 .clink
42 .align 2
43 000000 testaray:
44 000000 0011 .field 17,16 ; testaray[0] @ 0
45 000002 0022 .field 34,16 ; testaray[1] @ 16
46 000004 0033 .field 51,16 ; testaray[2] @ 32
47 000006 0044 .field 68,16 ; testaray[3] @ 48
48 000008 0055 .field 85,16 ; testaray[4] @ 64
49
50 $C$DW$6 .dwtag DW_TAG_variable, DW_AT_name("testaray")
51 .dwattr $C$DW$6, DW_AT_TI_symbol_name("testaray")
52 .dwattr $C$DW$6, DW_AT_location[DW_OP_addr testaray]
53 .dwattr $C$DW$6, DW_AT_type(*$C$DW$T$22)
54 .dwattr $C$DW$6, DW_AT_external
55 .global globconst
MSP430 Evaluation Assembler PC v3.3.2 Wed Jun 08 15:40:40 2011
Tools Copyright (c) 2003-2010 Texas Instruments Incorporated
C:\DOCUME~1\cz2p10h1\LOCALS~1\Temp\0474411 PAGE 2
56 000000 .sect ".const"
57 .align 2
58 000000 globconst:
59 000000 4142 .field 16706,16 ; globconst @ 0
60
61 $C$DW$7 .dwtag DW_TAG_variable, DW_AT_name("globconst")
62 .dwattr $C$DW$7, DW_AT_TI_symbol_name("globconst")
63 .dwattr $C$DW$7, DW_AT_location[DW_OP_addr globconst]
64 .dwattr $C$DW$7, DW_AT_type(*$C$DW$T$21)
65 .dwattr $C$DW$7, DW_AT_external
66 ; D:\opt\CCS_MSP430\ccsv4\tools\compiler\msp430\bin\opt430.exe C:\\DOCUME~1\\cz2p10h1\\LOCALS~1\
67 000000 .sect ".text:main"
68 .align 2
69 .clink
70 .global main