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.

MSP430F5342: Field update of MSP430F5342 via UART

Part Number: MSP430F5342
Other Parts Discussed in Thread: MSP430F5438A, MSP430F5529

I'm using Code Composer Studio (CCS) to modify a custom BSL to use UART pins to field update application code in a MSP430F5342.  Unfortunately, there is no CCS project for a MSP430F5342.  How can I get source for a custom BSL project?

I understand the MSP430F5342 is a derivative of MSP430F5529, so we could use the non-USB example for MSP430F5529 in the Custom BSL download.  Unfortunately, the example only has an IAR project.  I'm looking for a CCS project.  There is a MSP430F5438A UART CCS project example in the Custom BSL.  Would this be close enough to a MSP430F5342 to use?  If so, could I just use the linker file from the MSP430F5529 IAR project in the CCS project?

Also, how can the CCS project for a BSL be changed to run in application space for debugging?  Just by changing the addresses in the linker file?

Thank you!

  • Hello William,

    Sorry for the delay.  I am looking into this and will provide some feedback shortly.

  • Hello Eddie,

    Any update about a CCS custom BSL for the MSP430 F5342?

    Regards,

    - William.

  • Hi William,

    Please see the thread below which is similar to your question.  You could start with the MSP430F5438A project and adjust the F5342 CCS linker file to your memory needs.   

    https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/748487?MSP430F5342-Device-secured-message-after-custom-BSL-download

  • Hi Eddie,

    I appreciate your response.  Unfortunately, adjusting the linker file from the CCS_v7_MSP430F543xA_TA_UART project does not work.  It compiles, but I get nothing when I jump into the BSL

    My modified linker file:

    /* ============================================================================ */
    /* Copyright (c) 2019, 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_msp430f5342.cmd - LINKER COMMAND FILE FOR LINKING MSP430F5342 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.207                                                             */
    /*----------------------------------------------------------------------------*/
    
    /****************************************************************************/
    /* 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 = 0x1C00, length = 0x2800
        INFOA                   : origin = 0x1980, length = 0x0080
        INFOB                   : origin = 0x1900, length = 0x0080
        INFOC                   : origin = 0x1880, length = 0x0080
        INFOD                   : origin = 0x1800, length = 0x0080
        ZAREA                   : origin = 0x1000, length = 0x0010
        BSL430_VERSION_VENDOR   : origin = 0x1010, length = 0x0001
        BSL430_VERSION_CI       : origin = 0x1011, length = 0x0001
        BSL430_VERSION_API      : origin = 0x1012, length = 0x0001
        BSL430_VERSION_PI       : origin = 0x1013, length = 0x0001
        ZAREA_CODE              : origin = 0x1014, length = 0x07DC
        BSLSIG                  : origin = 0x17F0, length = 0x000C
        JTAGLOCK_KEY            : origin = 0x17FC, length = 0x0004
        FLASH                   : origin = 0x4400, length = 0xBB80
        FLASH2                  : origin = 0x10000,length = 0x14400
        INT00                   : origin = 0xFF80, length = 0x0002
        INT01                   : origin = 0xFF82, length = 0x0002
        INT02                   : origin = 0xFF84, length = 0x0002
        INT03                   : origin = 0xFF86, length = 0x0002
        INT04                   : origin = 0xFF88, length = 0x0002
        INT05                   : origin = 0xFF8A, length = 0x0002
        INT06                   : origin = 0xFF8C, length = 0x0002
        INT07                   : origin = 0xFF8E, length = 0x0002
        INT08                   : origin = 0xFF90, length = 0x0002
        INT09                   : origin = 0xFF92, length = 0x0002
        INT10                   : origin = 0xFF94, length = 0x0002
        INT11                   : origin = 0xFF96, length = 0x0002
        INT12                   : origin = 0xFF98, length = 0x0002
        INT13                   : origin = 0xFF9A, length = 0x0002
        INT14                   : origin = 0xFF9C, length = 0x0002
        INT15                   : origin = 0xFF9E, length = 0x0002
        INT16                   : origin = 0xFFA0, length = 0x0002
        INT17                   : origin = 0xFFA2, length = 0x0002
        INT18                   : origin = 0xFFA4, length = 0x0002
        INT19                   : origin = 0xFFA6, length = 0x0002
        INT20                   : origin = 0xFFA8, length = 0x0002
        INT21                   : origin = 0xFFAA, length = 0x0002
        INT22                   : origin = 0xFFAC, length = 0x0002
        INT23                   : origin = 0xFFAE, length = 0x0002
        INT24                   : origin = 0xFFB0, length = 0x0002
        INT25                   : origin = 0xFFB2, length = 0x0002
        INT26                   : origin = 0xFFB4, length = 0x0002
        INT27                   : origin = 0xFFB6, length = 0x0002
        INT28                   : origin = 0xFFB8, length = 0x0002
        INT29                   : origin = 0xFFBA, length = 0x0002
        INT30                   : origin = 0xFFBC, length = 0x0002
        INT31                   : origin = 0xFFBE, length = 0x0002
        INT32                   : origin = 0xFFC0, length = 0x0002
        INT33                   : origin = 0xFFC2, length = 0x0002
        INT34                   : origin = 0xFFC4, length = 0x0002
        INT35                   : origin = 0xFFC6, length = 0x0002
        INT36                   : origin = 0xFFC8, length = 0x0002
        INT37                   : origin = 0xFFCA, length = 0x0002
        INT38                   : origin = 0xFFCC, length = 0x0002
        INT39                   : origin = 0xFFCE, length = 0x0002
        INT40                   : origin = 0xFFD0, length = 0x0002
        INT41                   : origin = 0xFFD2, length = 0x0002
        INT42                   : origin = 0xFFD4, length = 0x0002
        INT43                   : origin = 0xFFD6, length = 0x0002
        INT44                   : origin = 0xFFD8, length = 0x0002
        INT45                   : origin = 0xFFDA, length = 0x0002
        INT46                   : origin = 0xFFDC, length = 0x0002
        INT47                   : origin = 0xFFDE, length = 0x0002
        INT48                   : origin = 0xFFE0, length = 0x0002
        INT49                   : origin = 0xFFE2, length = 0x0002
        INT50                   : origin = 0xFFE4, length = 0x0002
        INT51                   : origin = 0xFFE6, length = 0x0002
        INT52                   : origin = 0xFFE8, length = 0x0002
        INT53                   : origin = 0xFFEA, length = 0x0002
        INT54                   : origin = 0xFFEC, length = 0x0002
        INT55                   : origin = 0xFFEE, length = 0x0002
        INT56                   : origin = 0xFFF0, length = 0x0002
        INT57                   : origin = 0xFFF2, length = 0x0002
        INT58                   : origin = 0xFFF4, length = 0x0002
        INT59                   : origin = 0xFFF6, length = 0x0002
        INT60                   : origin = 0xFFF8, length = 0x0002
        INT61                   : origin = 0xFFFA, length = 0x0002
        INT62                   : 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              */
        .TI.noinit  : {} > RAM                  /* For #pragma noinit                */
        .sysmem     : {} > RAM                  /* Dynamic memory allocation area    */
        .stack      : {} > RAM (HIGH)           /* Software system stack             */
    
    	.ZAREA      : {} > ZAREA
    	.BSL430_VERSION_VENDOR : {} > BSL430_VERSION_VENDOR
    	.BSL430_VERSION_CI     : {} > BSL430_VERSION_CI
    	.BSL430_VERSION_API    : {} > BSL430_VERSION_API
    	.BSL430_VERSION_PI     : {} > BSL430_VERSION_PI
    	.ZAREA_CODE : {} > ZAREA_CODE
    	.BSLSIG     : {} > BSLSIG
    	.JTAGLOCK_KEY : {} > JTAGLOCK_KEY
    
    #ifndef __LARGE_CODE_MODEL__
        .text       : {} > FLASH                /* Code                              */
    #else
        .text       : {} >> FLASH2 | FLASH      /* Code                              */
    #endif
        .text:_isr  : {} > FLASH                /* ISR Code space                    */
        .cinit      : {} > FLASH                /* Initialization tables             */
    #ifndef __LARGE_DATA_MODEL__
        .const      : {} > FLASH                /* Constant data                     */
    #else
        .const      : {} >> FLASH | FLASH2      /* Constant data                     */
    #endif
        .cio        : {} > RAM                  /* C I/O Buffer                      */
    
        .pinit      : {} > FLASH                /* C++ Constructor tables            */
        .binit      : {} > FLASH                /* Boot-time Initialization tables   */
        .init_array : {} > FLASH                /* C++ Constructor tables            */
        .mspabi.exidx : {} > FLASH              /* C++ Constructor tables            */
        .mspabi.extab : {} > FLASH              /* C++ Constructor tables            */
    #ifdef __TI_COMPILER_VERSION__
      #if __TI_COMPILER_VERSION__ >= 15009000
        #ifndef __LARGE_CODE_MODEL__
        .TI.ramfunc : {} load=FLASH, run=RAM, table(BINIT)
        #else
        .TI.ramfunc : {} load=FLASH | FLASH2, run=RAM, table(BINIT)
        #endif
      #endif
    #endif
    
        .infoA     : {} > INFOA              /* MSP430 INFO FLASH Memory segments */
        .infoB     : {} > INFOB
        .infoC     : {} > INFOC
        .infoD     : {} > INFOD
    
        /* MSP430 Interrupt vectors          */
        .int00       : {}               > INT00
        .int01       : {}               > INT01
        .int02       : {}               > INT02
        .int03       : {}               > INT03
        .int04       : {}               > INT04
        .int05       : {}               > INT05
        .int06       : {}               > INT06
        .int07       : {}               > INT07
        .int08       : {}               > INT08
        .int09       : {}               > INT09
        .int10       : {}               > INT10
        .int11       : {}               > INT11
        .int12       : {}               > INT12
        .int13       : {}               > INT13
        .int14       : {}               > INT14
        .int15       : {}               > INT15
        .int16       : {}               > INT16
        .int17       : {}               > INT17
        .int18       : {}               > INT18
        .int19       : {}               > INT19
        .int20       : {}               > INT20
        .int21       : {}               > INT21
        .int22       : {}               > INT22
        .int23       : {}               > INT23
        .int24       : {}               > INT24
        .int25       : {}               > INT25
        .int26       : {}               > INT26
        .int27       : {}               > INT27
        .int28       : {}               > INT28
        .int29       : {}               > INT29
        .int30       : {}               > INT30
        .int31       : {}               > INT31
        .int32       : {}               > INT32
        .int33       : {}               > INT33
        .int34       : {}               > INT34
        .int35       : {}               > INT35
        .int36       : {}               > INT36
        .int37       : {}               > INT37
        .int38       : {}               > INT38
        .int39       : {}               > INT39
        .int40       : {}               > INT40
        RTC          : { * ( .int41 ) } > INT41 type = VECT_INIT
        PORT2        : { * ( .int42 ) } > INT42 type = VECT_INIT
        TIMER2_A1    : { * ( .int43 ) } > INT43 type = VECT_INIT
        TIMER2_A0    : { * ( .int44 ) } > INT44 type = VECT_INIT
        USCI_B1      : { * ( .int45 ) } > INT45 type = VECT_INIT
        USCI_A1      : { * ( .int46 ) } > INT46 type = VECT_INIT
        PORT1        : { * ( .int47 ) } > INT47 type = VECT_INIT
        TIMER1_A1    : { * ( .int48 ) } > INT48 type = VECT_INIT
        TIMER1_A0    : { * ( .int49 ) } > INT49 type = VECT_INIT
        DMA          : { * ( .int50 ) } > INT50 type = VECT_INIT
        .int51       : {}               > INT51
        TIMER0_A1    : { * ( .int52 ) } > INT52 type = VECT_INIT
        TIMER0_A0    : { * ( .int53 ) } > INT53 type = VECT_INIT
        ADC12        : { * ( .int54 ) } > INT54 type = VECT_INIT
        USCI_B0      : { * ( .int55 ) } > INT55 type = VECT_INIT
        USCI_A0      : { * ( .int56 ) } > INT56 type = VECT_INIT
        WDT          : { * ( .int57 ) } > INT57 type = VECT_INIT
        TIMER0_B1    : { * ( .int58 ) } > INT58 type = VECT_INIT
        TIMER0_B0    : { * ( .int59 ) } > INT59 type = VECT_INIT
        COMP_B       : { * ( .int60 ) } > INT60 type = VECT_INIT
        UNMI         : { * ( .int61 ) } > INT61 type = VECT_INIT
        SYSNMI       : { * ( .int62 ) } > INT62 type = VECT_INIT
        .reset       : {}               > RESET  /* MSP430 Reset vector         */
    }
    
    /****************************************************************************/
    /* Include peripherals memory map                                           */
    /****************************************************************************/
    
    -l msp430f5342.cmd

    Any ideas about why this linker file is not working on a MSP430F5342?  I suspect some address and/or section definitions may be incorrect?

    Thank you!

  • Hi William,

    did you check the MSP-BSL landing page:

    There is also a link how to customize a BSL and how to built and debug with CCS in the following document on page #23

    Hope this helps!

  • Hello Dietmar,

    Yes, I've gone through all of the custom BSL material, including the ones at the MSP-BSL landing page.

    Yes, I followed the instructions in slaas450f Creating a Custom Flash-Based Bootloader.  Unfortunately, debugging in CCS shows no code was written to flash despite a successful compile with no warnings about overflows or overlaps.  There was no warning about a secured device.  JTAG lock key was present.

    I suspect the memory map defined in the linker file I posted might be wrong, especially the definitions for the BSL area sections.  Can you please confirm the memory map, and the rest of the linker file, looks good?

  • Hi William,

    your BSLSIG section has to include following information. Can you maybe sent the TXT file your compiled BSL code?


    0x17FA BSL StartVector.This is the address of the first instruction to be executed when the BSL starts.

    0x17F6 BSL UnlockSignature1. This word shouldbe set to 0xC35Ato indicate a correctly programmed BSL. If it is written with any other value,the BSL will not start.

    0x17F4BSL UnlockSignature2. This word should be set to 0x3CA5 to indicate a correctly programmed BSL.If it is written with any other value,the BSL will not start.

  • Dietmar,

    I do see my BSLSIG section contains just 0xFF bytes.  So there is no valid data in the BSLSIG section.  How can I write valid data into BSLSIG?  Do these bytes need to be defined somehow in the linker file?

    I've attached the TXT file from the compiled BSL code.  I posted my linker file, which contains the BSLSIG section definition, in a previous posting.

    TXT file:

    MSP430F5342_BSL.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    @1010
    00 08 08 04
    @17fc
    FF FF FF FF
    @4400
    81 00 00 44 B1 13 FA 07 0C 93 02 24 B1 13 FC 05
    0C 43 B1 13 00 00 1C 43 B1 13 06 08 32 D0 10 00
    FD 3F 03 43 00 00 04 01 00 00 D6 07 01 00 24 44
    00 00 00 1C 00 00
    @ffd2
    1C 44 1C 44 1C 44 1C 44 1C 44 1C 44 1C 44 1C 44
    1C 44 1C 44
    @ffe8
    1C 44 1C 44 1C 44 1C 44 1C 44 1C 44 1C 44 1C 44
    1C 44 1C 44 1C 44 00 44 5A 14 F1 03 0F 41 3F 80
    00 1C 0E 4F CF 0E AF 00 FE 1B 8F 43 00 00 FF 03
    FE 03 0E 93 FA 23 82 43 12 1D B2 40 00 A5 14 1D
    00 18 F2 40 00 1C 04 1D 00 18 F2 40 00 1C 08 1D
    B2 40 41 03 0E 1D B2 40 A0 01 10 1D B2 40 33 02
    68 01 82 43 60 01 B2 40 40 00 62 01 82 43 6A 01
    B2 40 3C 20 64 01 B2 40 20 00 42 03 B2 40 20 02
    40 03 F2 40 06 00 0A 02 E2 43 04 02 3A 40 3B 00
    37 40 3A 00 38 40 05 00 39 40 07 00 8F 00 10 10
    05 4F 0F 19 4F 10 06 4F 78 3C B2 90 A5 A5 12 1D
    34 20 0F 18 4D 5D 00 18 4D DC 4D 13 0C 43 66 3C
    B1 13 20 02 CF 01 B1 13 A8 05 2C 92 10 24 B1 13
    30 02 CF 47 00 00 B1 13 30 02 EF 41 01 00 B1 13
    30 02 DF 41 01 00 02 00 3C 40 03 00 54 3C B1 13
    12 02 EF 42 01 00 4E 3C B2 90 A5 A5 12 1D 0D 20
    3F 40 10 00 1F F2 44 01 1F 52 14 1D 3F 50 40 00
    18 3C B2 90 A5 A5 12 1D 02 24 2C 42 37 3C 92 42
    14 1D 44 01 2F 43 1F 52 14 1D 82 4F 40 01 0F 18
    4D 5D 00 18 4D DC CD 43 00 00 3F 40 10 00 1F 52
    14 1D 82 4F 44 01 BA 3F CC 0F B1 13 2C 07 4C 93
    05 20 B1 13 12 02 CF 43 01 00 1C 3C B1 13 12 02
    CF 48 01 00 17 3C B1 13 12 02 CF 49 01 00 12 3C
    5F 43 53 3C 2E 42 CC 05 CD 06 02 3C B1 13 20 02
    B1 13 AE 04 0A 3C B1 13 AC 07 4C 4C B1 13 12 02
    CF 4C 01 00 2C 43 B1 13 9E 06 B1 13 36 02 4C 4C
    1C B3 FB 27 1F 43 00 18 5F 52 04 1D 2E 00 04 1D
    5C 4E 03 00 0D 43 B1 13 8A 07 2E 00 04 1D 5E 4E
    02 00 0C DE B1 13 8A 07 6E 4F 0C DE 2B 00 04 1D
    6E 4B 3E 80 10 00 3E 90 0C 00 C5 2F 5E 06 4E 0E
    4E 0D 80 18 50 4E D0 01 00 02 01 00 30 01 01 00
    FA 00 01 00 E0 00 01 00 4E 01 01 00 6E 01 01 00
    A8 00 01 00 92 00 01 00 64 01 01 00 5C 01 01 00
    4E 01 01 00 58 01 01 00 4F 43 2E 42 00 18 5E 52
    04 1D B1 13 34 05 B9 3F 03 43 B1 13 30 02 CF 4A
    00 00 B1 13 30 02 10 01 5E 4B 04 00 5F 4B 05 00
    47 18 0F 5F 0E DF 10 01 2F 00 08 1D 10 01 F1 03
    81 43 00 00 0D 43 0C 43 45 3C F2 90 52 00 00 1C
    3D 20 5F 42 01 1C 2F 83 31 24 1F 83 26 24 1F 83
    1B 24 1F 83 10 24 1F 83 05 24 7C 40 56 00 B1 13
    50 06 2C 3C B1 13 D6 03 B2 40 45 00 0E 1D B2 40
    22 00 10 1D 23 3C B1 13 D6 03 B2 40 8A 00 0E 1D
    B2 40 45 00 10 1D 1A 3C B1 13 D6 03 B2 40 D0 00
    0E 1D B2 40 68 00 10 1D 11 3C B1 13 D6 03 B2 40
    A0 01 0E 1D B2 40 D0 00 10 1D 08 3C B1 13 D6 03
    B2 40 41 03 0E 1D B2 40 A0 01 10 1D 81 43 00 00
    0D 43 0C 43 B2 40 20 89 44 03 92 B3 44 03 FD 27
    B2 F0 FE FE 44 03 92 52 10 1D 54 03 3E 40 09 00
    0F 43 92 52 0E 1D 54 03 92 C3 44 03 92 B3 44 03
    FD 27 5F 01 B2 B0 00 04 44 03 02 24 3F D0 00 01
    1E 83 EF 23 4F 4F 0C 93 09 20 3F 90 80 00 3A 24
    7C 40 51 00 2D 43 B1 13 50 06 56 3C 1C 93 4F 24
    2C 93 35 24 CE 0C 1E 82 0C 1D 3E 90 03 00 2C 24
    2E 92 23 20 4F 4F 8F 10 81 DF 00 00 2D 41 B2 43
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi William,

    simply take the BSL source projects. There the linker command files are included which have all the stuff you need. Out of this you can modify a project to your needs and then you have your own BSL. If import the CCS_v7_MSP430F543xA_TA_UART from this archive import it to CCS and build it I have the BSL mapped to the BSL memory.

    Here is the TXT

    7446.MSP430F5438A_BSL.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    @1010
    00 08 08 04
    @1042
    81 00 00 5C B0 13 D4 17 0C 93 02 24 B0 13 62 16
    0C 43 B0 13 66 10 1C 43 B0 13 E0 17 32 D0 10 00
    FD 3F 03 43 5A 14 F1 03 0F 41 3F 80 00 1C 0E 4F
    CF 0E AF 00 FE 1B 8F 43 00 00 FF 03 FE 03 0E 93
    FA 23 82 43 12 1D B2 40 00 A5 14 1D 00 18 F2 40
    00 1C 04 1D 00 18 F2 40 00 1C 08 1D B2 40 41 03
    0E 1D B2 40 A0 01 10 1D B2 40 33 02 68 01 82 43
    60 01 B2 40 40 00 62 01 82 43 6A 01 B2 40 3C 20
    64 01 B2 40 20 00 42 03 B2 40 20 02 40 03 F2 40
    06 00 0A 02 E2 43 04 02 3A 40 3B 00 37 40 3A 00
    38 40 05 00 39 40 07 00 8F 00 10 10 05 4F 0F 19
    4F 10 06 4F 78 3C B2 90 A5 A5 12 1D 34 20 0F 18
    4D 5D 00 18 4D DC 4D 13 0C 43 66 3C B0 13 86 12
    CF 01 B0 13 0E 16 2C 92 10 24 B0 13 96 12 CF 47
    00 00 B0 13 96 12 EF 41 01 00 B0 13 96 12 DF 41
    01 00 02 00 3C 40 03 00 54 3C B0 13 78 12 EF 42
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Dietmar,

    Yes, that's exactly what I did.  I imported the CCS_v7_MSP430F543xA_TA_UART project from the Custom BSL.  I built it and got the same TXT file you posted showing content in the BSL.

    I then modified the linker file to fit the MSP430F5342.  Rebuilding gives the TXT file I posted showing nothing in the BSL except for 0xFF.  So something must be wrong with the linker file.  I'm just using the linker file from the CCS_v7_MSP430F543xA_TA_UART project with some modifications to fit the address map of the MSP430F5342.  Do you see anything obviously wrong with the linker file I posted?

    If you don't see any problems, do you have a linker file for the MSP430F5342 that gives a working BSL which you're willing to share here?

    Thank you,

    - William

  • William,

    yes you modified the FLASH memory area and put in the main memory addresses.

    But you need to stay with the original because you want to put you code into BSL area right?

    FLASH                   : origin = 0x1042, length = 0x07AE

  • Dietmar,

    I changed the FLASH section definition in my linker file back to the original:

    FLASH                   : origin = 0x1042, length = 0x07AE

    I also modified the ZAREA_CODE section definition right before FLASH to shorten the length and avoid an overlap:

    ZAREA_CODE              : origin = 0x1014, length = 0x002E

    This gives me a TXT file showing non-0xFF bytes in the BSL area!  So it looks like my BSL area was written.

    However, the words at 0x17F4 and 0x17F6 do not show 0xC35A and 0xC35A like what the "Creatinga CustomFlash-BasedBootloader (BSL)" indicates should be there.  I also don't see what looks like a good address for the BSP protect function at 0xF7F2.  I don't see these words in the TXT file that you posted from the F5438A example in the Custom BSL so perhaps it's okay?

    Also, I see the main() and other C functions from the Custom BSL example at address 0x10000 in the FLASH2 section.  Is this okay?  Shouldn't this BSL code be in the BSL Z-AREA in order to leave FLASH2 for user application code?

    It looks like main() from the Custom BSL is running on my MSP430F5342.  I'll try talking to it now with BSL Scripter.

    Thank you for your continued support.

  • Hi William

    one possibility would be to define this in the linker file

        BSLSIG                  : origin = 0x17F0, length = 0x0002
        BSL_PROTECT             : origin = 0x17F2, length = 0x0002
        BSL_UNLOCK_1            : origin = 0x17F4, length = 0x0002 fill=0xC35A
        BSL_UNLOCK_2            : origin = 0x17F6, length = 0x0002 fill=0xC35A
        BSL_RESERVED            : origin = 0x17F8, length = 0x0002
        BSL_START               : origin = 0x17FA, length = 0x0002

    Then it would appear in the TXT.

    @17f4
    5A C3 5A C3
    @17fc
    FF FF FF FF

    For the rest I will come back soon.

  • William,

    what I find interesting is that if you use the IAR example out of the BSL example bundle a perfect BSL image is generated as shown below.

    So maybe the CCS examples are not running with the latest CCS. May I ask which CCS version you're using?

    I will go in contact with the people who developed the examples.

    MSP430F543xA_TA_UART_IAR.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    @1000
    09 3C 12 3C FF 3F FF 3F FF 3F FF 3F FF 3F FF 3F
    FF 08 09 04 31 40 00 5C B0 13 16 17 0C 93 00 24
    B0 13 D2 16 B0 13 54 17 3D 90 AD DE 04 20 3E 90
    EF BE 01 20 03 3C 0C 43 0D 43 10 01 3C 41 3D 41
    10 01 0C 43 B2 D0 03 80 82 01 B2 B0 10 00 80 01
    01 24 2C D3 10 01 92 42 02 1C 44 01 1F 42 02 1C
    3F 50 06 00 82 4F 40 01 C2 43 E0 FF 1F 42 02 1C
    3F 50 10 00 82 4F 44 01 4C 43 10 01 1B 15 F1 03
    0E 43 3D 40 E0 FF 0A 43 0B 4C 0B 5A 7F 4D 6F EB
    0E DF 1A 53 3A 90 20 00 F7 2B 4E 93 0E 20 B1 40
    FF 7F 00 00 02 3C B1 53 00 00 2A 41 1A 93 FB 37
    B2 40 A5 A5 00 1C 4C 43 04 3C B0 13 56 10 7C 40
    05 00 E1 03 1A 17 10 01 B0 13 A8 11 0A 20 4C 43
    1F 42 44 01 3F F0 10 00 1F 52 02 1C 3F 50 40 00
    02 3C 6C 42 10 01 82 4F 44 01 10 01 6C 42 B0 13
    A8 11 0A 20 4C 43 92 42 02 1C 44 01 1F 42 02 1C
    3F 50 40 00 82 4F 40 01 10 01 92 42 02 1C 40 01
    AD 3F 03 43 3B 15 08 4F 0A 4E 0E 4C 0F 4D 0E 5A
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Dietmar,

    I am using CCS version 9.3.0.

    I appreciate you contacting the people who developed the examples.  Hopefully, they can explain why the IAR example works but the CCS example does not.  At least when modified for the F5342.

    Regards,

    - William.

  • Dietmar,

    Also, the MSP430F543xA_TA_UART_IAR.txt TXT file shows no code at 0x10000.  Yet, the C code for the custom BSL example in CCS is being placed at 0x10000.  Is this yet another change I need to make to my linker file to put all of the custom BSL example code, including the C code, into the BSL?

    Regards,

    - William.

  • William,

    I discussed with the experts and they are aware of this issue and work with priority to get it fixed.

    It has nothing to do with your changes at all and the linker command file seems not to be the problem. The issue with current CCS versions is that the BSL_low_level_init file is not found within the CCS file structure on newer CCS version.

    So as quick idea I can only recommend to use either IAR or CCS v7. But I will push for and updated BSL project release fixing these issues as soon as possible.

  • Dietmar,

    So there *is* a problem with CCS and the Custom BSL example project.  I'm glad to hear the experts say there is indeed an issue and that they're working to fix it.

    For what it's worth, I noticed BSL_Device_File.h is shown in the imported project Project Explorer but it doesn't actually exist in the file system.  I suspect this is what's giving a warning about "This project contains 1 unresolved buildable linked resource(s).  The project may not build as expected." when building.

    I look forward to hearing back from you and the experts.

    Regards,

    - William.

  • Hi William,

    I got the info that a temporary workaround exist under following thread:
    http://e2e.ti.com/support/microcontrollers/msp430/f/166/p/872514/3238096#3238096

    Meanwhile BSL experts working on getting this fixed on the web examples as well. However release of the package might take longer.

    Please let us know if this works for you at the moment?

  • Dietmar,

    I tried the workaround in http://e2e.ti.com/support/microcontrollers/msp430/f/166/p/872514/3238096#3238096.  Unfortunately, I was unable to rebuild the libc.a library with a new boot.c that had the MPU functions commented out at the end so this workaround did not work for me.  Thus, I think I'll wait to get something from the BSL experts to test.

    In the meantime, perhaps some of my other questions can be addressed?  Specifically, should the C code in the custom BSL example be placed at 0x10000 (FLASH2 section)?  If so, doesn't that overwrite any application code that may have been at 0x10000?  Shouldn't all of the custom BSL code be in the BSL section?

    Thank you,

    - William.

  • Hi William,

    so with CCS it seems that the compiler has challenge to generate machine code which fits into BSL memory area. Normally all the should be located from 0x1000 to 0x17FF otherwise it will not work properly.

    Historical BSL was developed on IAR therefore with IAR it works fine. So BSL experts work on getting the issues fixed so that we can compile a meaningful image and then compiler optimization can be checked to fit BSL binary into BSL memory section.

  • Dietmar,

    So as suspected, all code, including the C code, for the custom BSL example (or any BSL) needs to fit into the BSL area from 0x1000 to 0x17FF.  No code should be at 0x10000.  That makes sense since I expect user application code to be at 0x10000, not BSL side.

    I look forward to trying new code from the BSL experts whenever it is ready.

    Regards,

    - William.

  • Hi William,

    want to give an heads up on schedule. Tentative release goal of new SW for BSL package is end of March.

  • Dietmar,

    I appreciate the update about the schedule.  This helps with my planning.

    I look forward to hearing something around the end of March.

    Regards,

    - William.

  • Hello Dietmar,

    I hope you are safe.

    Now that it is the end of March, I'd like to ask for an update on when new custom BSL software might be available to try with CCS?

    Thank you,

    - William.

  • Hi William,

    thanks doing fine in these strange and crazy days hope you as well?
    Thanks for follow up so I chatted with our BSL development person and we will release it to web this week. Actually we are in the approval process which is slightly delayed due to this strange corona situation. An update will be provided in the thread once it is available on the web.

    Thanks for your understanding and patience on this.

    Stay safe!

  • Hi William,

    We are still waiting the publishing process at the moment. There are couple of internal new process that I need to go through to be able to get this update online. I'll keep you update on this thread until it gets published. I apologize for the delay from the date that we scheduled before. Stay healthy and safe.

  • Hi William,

    the new update of the Custom BSL 430 is now online http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPBSL_CustomBSL430/1_02_00_01/index_FDS.html  please refer to the section 1.3.3 on this application note http://www.ti.com/lit/an/slaa450g/slaa450g.pdf that to build the BSL image fits into BSL area, we need to limit the functionality of the BSL. however this is modifiable. let me know if you have further question.

  • Fatmawati,

    I'm delighted to hear the Custom BSL update for the MSP430 is now online.  I will look it over and try it.  This may take a little longer than usual because I can get access to my lab and eval board only occasionally with stay-at-home restrictions in effect for my area.  I'll let you know if I can make more progress in CCS with this update.

    Regards,

    - William.

  • Fatmawati,

    I tried compiling the new 1_02_00_01 Custom BSL code.  I get the warning below when I build the project with CCS v9.3.  Is this something to be concerned about?

    #10247-D creating output section ".TI.noinit" without a SECTIONS specification

    Regards,

    - William.

  • Hi William,

    apologize for late response on this. this warning should not affect the code. we can fix this warning by having additional:

        .TI.noinit  : {} > RAM                /* C I/O BUFFER                      */

    under "SECTIONS" in the linker command file.

**Attention** This is a public forum