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.
Your image isn't visible for some reason.
None of this looks familiar to me. Are you using Code Composer Studio and the TI MSP430 compiler?
Thanks and regards,
-George
In this forum, we only support compilers released by TI. Thus we are unable to help you with this problem.
Thanks and regards,
-George
Hi George
I tried running the same code with code composer studio and getting following errors:
error #10099-D: program will not fit into available memory. run placement with alignment fails for section "BSS_GROUP" size 0x138 . Available memory ranges:
RAM size: 0x100 unused: 0xb0 max hole: 0xb0
error #10010: errors encountered during linking; "DCM_CCS.out" not built
Please correct me if I am wrong: as per my knowledge with MSP430F123 I have only 256 bytes of ram memory where all my global variables, local variables and stack implementation get stored. I am using port1 and timer interrupt. I am not sure how to fit this code any help will be appreciated.
Thanks
Please post the linker command file your project uses. Note you will probably have to change the extension from .cmd to something like .txt.
Thanks and regards,
-George
You are correct that MSP430F123 has only 256 bytes of RAM. You are attempting to place an array of size (15*20+8) = 308, so it cannot possibly fit in RAM. Can any part of the array go in FLASH? Must the array be that large?
Hi George,
I am not sure about overlapping but I think yes as the RAM is not sufficient. Please find attached linker cmd file and the DCM_CCS.map file.
If you need I can send you the code as well. I am not able to add multiple files so may be in next post you will find map file and code. Thanks for your help.
/* ============================================================================ */ /* Copyright (c) 2014, Texas Instruments Incorporated */ /* All rights reserved. */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* */ /* * Redistributions of source code must retain the above copyright */ /* notice, this list of conditions and the following disclaimer. */ /* */ /* * Redistributions in binary form must reproduce the above copyright */ /* notice, this list of conditions and the following disclaimer in the */ /* documentation and/or other materials provided with the distribution. */ /* */ /* * Neither the name of Texas Instruments Incorporated nor the names of */ /* its contributors may be used to endorse or promote products derived */ /* from this software without specific prior written permission. */ /* */ /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" */ /* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, */ /* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */ /* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR */ /* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, */ /* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, */ /* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; */ /* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, */ /* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR */ /* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */ /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* ============================================================================ */ /******************************************************************************/ /* lnk_msp430f123.cmd - LINKER COMMAND FILE FOR LINKING MSP430F123 PROGRAMS */ /* */ /* Usage: lnk430 <obj files...> -o <out file> -m <map file> lnk.cmd */ /* cl430 <src files...> -z -o <out file> -m <map file> lnk.cmd */ /* */ /*----------------------------------------------------------------------------*/ /* These linker options are for command line linking only. For IDE linking, */ /* you should set your linker options in Project Properties */ /* -c LINK USING C CONVENTIONS */ /* -stack 0x0100 SOFTWARE STACK SIZE */ /* -heap 0x0100 HEAP AREA SIZE */ /* */ /*----------------------------------------------------------------------------*/ /* Version: 1.139 */ /*----------------------------------------------------------------------------*/ /****************************************************************************/ /* SPECIFY THE SYSTEM MEMORY MAP */ /****************************************************************************/ MEMORY { SFR : origin = 0x0000, length = 0x0010 PERIPHERALS_8BIT : origin = 0x0010, length = 0x00F0 PERIPHERALS_16BIT : origin = 0x0100, length = 0x0100 RAM : origin = 0x0200, length = 0x0100 INFOA : origin = 0x1080, length = 0x0080 INFOB : origin = 0x1000, length = 0x0080 FLASH : origin = 0xE000, length = 0x1FE0 INT00 : origin = 0xFFE0, length = 0x0002 INT01 : origin = 0xFFE2, length = 0x0002 INT02 : origin = 0xFFE4, length = 0x0002 INT03 : origin = 0xFFE6, length = 0x0002 INT04 : origin = 0xFFE8, length = 0x0002 INT05 : origin = 0xFFEA, length = 0x0002 INT06 : origin = 0xFFEC, length = 0x0002 INT07 : origin = 0xFFEE, length = 0x0002 INT08 : origin = 0xFFF0, length = 0x0002 INT09 : origin = 0xFFF2, length = 0x0002 INT10 : origin = 0xFFF4, length = 0x0002 INT11 : origin = 0xFFF6, length = 0x0002 INT12 : origin = 0xFFF8, length = 0x0002 INT13 : origin = 0xFFFA, length = 0x0002 INT14 : origin = 0xFFFC, length = 0x0002 RESET : origin = 0xFFFE, length = 0x0002 } /****************************************************************************/ /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */ /****************************************************************************/ SECTIONS { .bss : {} > RAM /* GLOBAL & STATIC VARS */ .data : {} > RAM /* GLOBAL & STATIC VARS */ .sysmem : {} > RAM /* DYNAMIC MEMORY ALLOCATION AREA */ .stack : {} > RAM (HIGH) /* SOFTWARE SYSTEM STACK */ .text : {} > FLASH /* CODE */ .cinit : {} > FLASH /* INITIALIZATION TABLES */ .const : {} > FLASH /* CONSTANT DATA */ .cio : {} > RAM /* C I/O BUFFER */ .pinit : {} > FLASH /* C++ CONSTRUCTOR TABLES */ .init_array : {} > FLASH /* C++ CONSTRUCTOR TABLES */ .mspabi.exidx : {} > FLASH /* C++ CONSTRUCTOR TABLES */ .mspabi.extab : {} > FLASH /* C++ CONSTRUCTOR TABLES */ .infoA : {} > INFOA /* MSP430 INFO FLASH MEMORY SEGMENTS */ .infoB : {} > INFOB /* MSP430 INTERRUPT VECTORS */ .int00 : {} > INT00 .int01 : {} > INT01 PORT1 : { * ( .int02 ) } > INT02 type = VECT_INIT PORT2 : { * ( .int03 ) } > INT03 type = VECT_INIT .int04 : {} > INT04 .int05 : {} > INT05 USART0TX : { * ( .int06 ) } > INT06 type = VECT_INIT USART0RX : { * ( .int07 ) } > INT07 type = VECT_INIT TIMERA1 : { * ( .int08 ) } > INT08 type = VECT_INIT TIMERA0 : { * ( .int09 ) } > INT09 type = VECT_INIT WDT : { * ( .int10 ) } > INT10 type = VECT_INIT COMPARATORA : { * ( .int11 ) } > INT11 type = VECT_INIT .int12 : {} > INT12 .int13 : {} > INT13 NMI : { * ( .int14 ) } > INT14 type = VECT_INIT .reset : {} > RESET /* MSP430 RESET VECTOR */ } /****************************************************************************/ /* INCLUDE PERIPHERALS MEMORY MAP */ /****************************************************************************/ -l msp430f123.cmd
Please find attached Map file.
Thanks!
****************************************************************************** MSP430 Linker PC v4.3.3 ****************************************************************************** >> Linked Thu Nov 13 10:37:08 2014 OUTPUT FILE NAME: <DCM_CCS.out> ENTRY POINT SYMBOL: "_c_int00" address: 0000e23e MEMORY CONFIGURATION name origin length used unused attr fill ---------------------- -------- --------- -------- -------- ---- -------- SFR 00000000 00000010 00000000 00000010 RWIX PERIPHERALS_8BIT 00000010 000000f0 00000000 000000f0 RWIX PERIPHERALS_16BIT 00000100 00000100 00000000 00000100 RWIX RAM 00000200 00000100 00000050 000000b0 RWIX INFOB 00001000 00000080 00000000 00000080 RWIX INFOA 00001080 00000080 00000000 00000080 RWIX FLASH 0000e000 00001fe0 000002a3 00001d3d RWIX INT00 0000ffe0 00000002 00000000 00000002 RWIX INT01 0000ffe2 00000002 00000000 00000002 RWIX INT02 0000ffe4 00000002 00000002 00000000 RWIX INT03 0000ffe6 00000002 00000002 00000000 RWIX INT04 0000ffe8 00000002 00000000 00000002 RWIX INT05 0000ffea 00000002 00000000 00000002 RWIX INT06 0000ffec 00000002 00000002 00000000 RWIX INT07 0000ffee 00000002 00000002 00000000 RWIX INT08 0000fff0 00000002 00000002 00000000 RWIX INT09 0000fff2 00000002 00000002 00000000 RWIX INT10 0000fff4 00000002 00000002 00000000 RWIX INT11 0000fff6 00000002 00000002 00000000 RWIX INT12 0000fff8 00000002 00000000 00000002 RWIX INT13 0000fffa 00000002 00000000 00000002 RWIX INT14 0000fffc 00000002 00000002 00000000 RWIX RESET 0000fffe 00000002 00000002 00000000 RWIX SECTION ALLOCATION MAP output attributes/ section page origin length input sections -------- ---- ---------- ---------- ---------------- .bss 0 00000000 00000158 FAILED TO ALLOCATE .init_array * 0 0000e000 00000000 UNINITIALIZED .TI.noinit * 0 00000000 00000000 FAILED TO ALLOCATE .stack 0 000002b0 00000050 UNINITIALIZED 000002b0 00000002 rts430_eabi.lib : boot.obj (.stack) 000002b2 0000004e --HOLE-- .text 0 0000e000 0000028a 0000e000 0000010e main.obj (.text:Generate_TX) 0000e10e 00000060 main.obj (.text:Timer0_A0) 0000e16e 0000005e rts430_eabi.lib : autoinit.obj (.text:_auto_init) 0000e1cc 00000046 main.obj (.text:main) 0000e212 0000002c rts430_eabi.lib : lsl16.obj (.text) 0000e23e 0000001a : boot.obj (.text:_c_int00_noexit) 0000e258 00000014 : copy_zero_init.obj (.text:decompress:ZI:__TI_zero_init) 0000e26c 00000010 : epilog.obj (.text) 0000e27c 00000006 : isr_trap.obj (.text:__TI_ISR_TRAP) 0000e282 00000004 : pre_init.obj (.text:_system_pre_init) 0000e286 00000004 : exit.obj (.text:abort) .const 0 0000e28a 0000000f 0000e28a 0000000f main.obj (.const:.string:message) .cinit 0 0000e29a 0000000a 0000e29a 00000004 (.cinit..bss.load) [load image, compression = zero_init] 0000e29e 00000002 (__TI_handler_table) 0000e2a0 00000004 (__TI_cinit_table) PORT1 0 0000ffe4 00000002 0000ffe4 00000002 rts430_eabi.lib : int02.obj (.int02) PORT2 0 0000ffe6 00000002 0000ffe6 00000002 rts430_eabi.lib : int03.obj (.int03) USART0TX 0 0000ffec 00000002 0000ffec 00000002 rts430_eabi.lib : int06.obj (.int06) USART0RX 0 0000ffee 00000002 0000ffee 00000002 rts430_eabi.lib : int07.obj (.int07) TIMERA1 0 0000fff0 00000002 0000fff0 00000002 rts430_eabi.lib : int08.obj (.int08) TIMERA0 0 0000fff2 00000002 0000fff2 00000002 main.obj (.int09) WDT 0 0000fff4 00000002 0000fff4 00000002 rts430_eabi.lib : int10.obj (.int10) COMPARATORA * 0 0000fff6 00000002 0000fff6 00000002 rts430_eabi.lib : int11.obj (.int11) NMI 0 0000fffc 00000002 0000fffc 00000002 rts430_eabi.lib : int14.obj (.int14) .reset 0 0000fffe 00000002 0000fffe 00000002 rts430_eabi.lib : boot.obj (.reset) LINKER GENERATED COPY TABLES __TI_cinit_table @ 0000e2a0 records: 1, size/record: 4, table size: 4 .bss: load addr=0000e29a, load size=00000004 bytes, run addr=00000000, run size=00000158 bytes, compression=zero_init LINKER GENERATED HANDLER TABLE __TI_handler_table @ 0000e29e records: 1, size/record: 2, table size: 2 index: 0, handler: __TI_zero_init GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name address name -------- ---- 00000057 BCSCTL1 00000058 BCSCTL2 00000000 Bdata1 0000e286 C$$EXIT 00000059 CACTL1 0000005a CACTL2 0000005b CAPD 00000056 DCOCTL 00000128 FCTL1 0000012a FCTL2 0000012c FCTL3 0000e000 Generate_TX 00000000 IE1 00000001 IE2 00000002 IFG1 00000003 IFG2 00000005 ME2 00000022 P1DIR 00000025 P1IE 00000024 P1IES 00000023 P1IFG 00000020 P1IN 00000021 P1OUT 00000026 P1SEL 0000002a P2DIR 0000002d P2IE 0000002c P2IES 0000002b P2IFG 00000028 P2IN 00000029 P2OUT 0000002e P2SEL 0000001a P3DIR 00000018 P3IN 00000019 P3OUT 0000001b P3SEL 00000156 PacketSend 00000172 TACCR0 00000174 TACCR1 00000176 TACCR2 00000162 TACCTL0 00000164 TACCTL1 00000166 TACCTL2 00000160 TACTL 0000012e TAIV 00000170 TAR 0000e10e Timer0_A0 00000074 U0BR0 00000075 U0BR1 00000070 U0CTL 00000073 U0MCTL 00000072 U0RCTL 00000076 U0RXBUF 00000071 U0TCTL 00000077 U0TXBUF 00000120 WDTCTL 00000300 __STACK_END 00000050 __STACK_SIZE 0000e2a0 __TI_CINIT_Base 0000e2a4 __TI_CINIT_Limit 0000e29e __TI_Handler_Table_Base 0000e2a0 __TI_Handler_Table_Limit UNDEFED __TI_INITARRAY_Base UNDEFED __TI_INITARRAY_Limit 0000e27c __TI_ISR_TRAP 00000001 __TI_args_main 00000001 __TI_exit 0000ffe4 __TI_int02 0000ffe6 __TI_int03 0000ffec __TI_int06 0000ffee __TI_int07 0000fff0 __TI_int08 0000fff2 __TI_int09 0000fff4 __TI_int10 0000fff6 __TI_int11 0000fffc __TI_int14 0000e258 __TI_zero_init ffffffff __binit__ ffffffff __c_args__ 0000e278 __mspabi_func_epilog_1 0000e276 __mspabi_func_epilog_2 0000e274 __mspabi_func_epilog_3 0000e272 __mspabi_func_epilog_4 0000e270 __mspabi_func_epilog_5 0000e26e __mspabi_func_epilog_6 0000e26c __mspabi_func_epilog_7 0000e212 __mspabi_slli 0000e23a __mspabi_slli_1 0000e228 __mspabi_slli_10 0000e226 __mspabi_slli_11 0000e224 __mspabi_slli_12 0000e222 __mspabi_slli_13 0000e220 __mspabi_slli_14 0000e21e __mspabi_slli_15 0000e238 __mspabi_slli_2 0000e236 __mspabi_slli_3 0000e234 __mspabi_slli_4 0000e232 __mspabi_slli_5 0000e230 __mspabi_slli_6 0000e22e __mspabi_slli_7 0000e22c __mspabi_slli_8 0000e22a __mspabi_slli_9 0000e16e _auto_init 0000e23e _c_int00 0000e23e _c_int00_noexit 0000fffe _reset_vector 000002b0 _stack 0000e282 _system_pre_init 0000e286 abort ffffffff binit 00000154 count 0000e1cc main 0000e28a message 00000157 start GLOBAL SYMBOLS: SORTED BY Symbol Address address name -------- ---- 00000000 Bdata1 00000000 IE1 00000001 IE2 00000001 __TI_args_main 00000001 __TI_exit 00000002 IFG1 00000003 IFG2 00000005 ME2 00000018 P3IN 00000019 P3OUT 0000001a P3DIR 0000001b P3SEL 00000020 P1IN 00000021 P1OUT 00000022 P1DIR 00000023 P1IFG 00000024 P1IES 00000025 P1IE 00000026 P1SEL 00000028 P2IN 00000029 P2OUT 0000002a P2DIR 0000002b P2IFG 0000002c P2IES 0000002d P2IE 0000002e P2SEL 00000050 __STACK_SIZE 00000056 DCOCTL 00000057 BCSCTL1 00000058 BCSCTL2 00000059 CACTL1 0000005a CACTL2 0000005b CAPD 00000070 U0CTL 00000071 U0TCTL 00000072 U0RCTL 00000073 U0MCTL 00000074 U0BR0 00000075 U0BR1 00000076 U0RXBUF 00000077 U0TXBUF 00000120 WDTCTL 00000128 FCTL1 0000012a FCTL2 0000012c FCTL3 0000012e TAIV 00000154 count 00000156 PacketSend 00000157 start 00000160 TACTL 00000162 TACCTL0 00000164 TACCTL1 00000166 TACCTL2 00000170 TAR 00000172 TACCR0 00000174 TACCR1 00000176 TACCR2 000002b0 _stack 00000300 __STACK_END 0000e000 Generate_TX 0000e10e Timer0_A0 0000e16e _auto_init 0000e1cc main 0000e212 __mspabi_slli 0000e21e __mspabi_slli_15 0000e220 __mspabi_slli_14 0000e222 __mspabi_slli_13 0000e224 __mspabi_slli_12 0000e226 __mspabi_slli_11 0000e228 __mspabi_slli_10 0000e22a __mspabi_slli_9 0000e22c __mspabi_slli_8 0000e22e __mspabi_slli_7 0000e230 __mspabi_slli_6 0000e232 __mspabi_slli_5 0000e234 __mspabi_slli_4 0000e236 __mspabi_slli_3 0000e238 __mspabi_slli_2 0000e23a __mspabi_slli_1 0000e23e _c_int00 0000e23e _c_int00_noexit 0000e258 __TI_zero_init 0000e26c __mspabi_func_epilog_7 0000e26e __mspabi_func_epilog_6 0000e270 __mspabi_func_epilog_5 0000e272 __mspabi_func_epilog_4 0000e274 __mspabi_func_epilog_3 0000e276 __mspabi_func_epilog_2 0000e278 __mspabi_func_epilog_1 0000e27c __TI_ISR_TRAP 0000e282 _system_pre_init 0000e286 C$$EXIT 0000e286 abort 0000e28a message 0000e29e __TI_Handler_Table_Base 0000e2a0 __TI_CINIT_Base 0000e2a0 __TI_Handler_Table_Limit 0000e2a4 __TI_CINIT_Limit 0000ffe4 __TI_int02 0000ffe6 __TI_int03 0000ffec __TI_int06 0000ffee __TI_int07 0000fff0 __TI_int08 0000fff2 __TI_int09 0000fff4 __TI_int10 0000fff6 __TI_int11 0000fffc __TI_int14 0000fffe _reset_vector ffffffff __binit__ ffffffff __c_args__ ffffffff binit UNDEFED __TI_INITARRAY_Base UNDEFED __TI_INITARRAY_Limit [113 symbols]
Your problem starts with this C source line ...
unsigned char Bdata1[340];
That array goes in the .bss section. The linker command file allocates the .bss section into RAM memory. But your device only has 256 bytes of RAM.
You have to change your code to use less RAM. If you aren't sure of the best way to do that, then I suggest you start a new thread in the MSP430 forum.
Thanks and regards,
-George