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.

MSP430FG4616: Assigning an absolute address to a custom BSL routine in C using CCS complier

Part Number: MSP430FG4616
Other Parts Discussed in Thread: MSP430F5529, MSP430F4619, MSP430F5438A, MSP430G2553

. I'm using a MSP430FG4616, which has 91K flash memory. I want to write a custom BSL routine to download new firmware that always resides in upper flash memory. The device has 91K memory , but I'm only using a small portion of it for the application code, about 8K. What I would like to do is read in the new code (8K) from a serial port, write it to an unused portion of flash, say at 0xA000, then I can check that the entire new code image is correct with checksums, etc. Then finally erasing the original code that resided in lower memory and replacing it with the new image that was stored at 0xA000.

How do I specify the custom BSL code address to do this. Do I do it in the code or is it a linker directive.

Thanks

  • Hello Jerry,

    Please see this resource for custom application side BSLs -- Look for MSPBOOT on this page: www.ti.com/tool/MSPBSL .  

  • Jace,

    Thank You very much for the reply. It's great information and sort of what I want to do, however, none of the examples are for an MSP4304xx type. Also, the host examples are for another TI processor such as the MSP430F5529. My host is a Windows PC. I have to look at it further to see what or if I can use it.

    I see the code uses a second ISR map for the BSL code routines. I still for future reference would like to know how to set a procedure address to an absolute address. So for example if I have a procedure;

    void Myroutine(void)  and I want it to reside at a specific location such as 0xA000, how do I do that?

    Thanks

  • Hi, besides the above question, I tried to compile the example code for the custom BSL named 'MSP430F5438A_BSL'. I changed the target in the properties to a MSP430F4619 but I received the following linking errors. They appear to be SFR's I checked the 430.h file and they do appear to be defined in them, so I dont know why the errors?

    What I would like to do is use the Dual Image custom BSL that will run in a MSP430F4616-19(Large memory) using UART that uses UCA0. 


    **** Build of configuration Debug for project MSP430F5438A_BSL ****

    "C:\\ti\\ccs1011\\ccs\\utils\\bin\\gmake" -k all

    Building target: "MSP430F5438A_BSL.out"
    Invoking: MSP430 Linker

    undefined first referenced
    symbol in file
    --------- ----------------
    CRCDIRB_L <whole-program>
    CRCINIRES <whole-program>
    PADIR_L <whole-program>
    PASEL_L <whole-program>
    SYSBSLC ./BSL430_Low_Level_Init.obj
    SYSCTL ./BSL430_Low_Level_Init.obj
    TA0CCR0 <whole-program>
    TA0CCR1 <whole-program>
    TA0CCTL0 <whole-program>
    TA0CCTL1 <whole-program>
    TA0CTL <whole-program>
    TA0R <whole-program>
    UCSCTL0 <whole-program>
    UCSCTL1 <whole-program>
    UCSCTL2 <whole-program>
    UCSCTL4 <whole-program>
    UCSCTL5 <whole-program>

    error #10234-D: unresolved symbols remain

    error #10010: errors encountered during linking; "MSP430F5438A_BSL.out" not built
    gmake: *** [MSP430F5438A_BSL.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

  • Hello Jerry,

    I believe you are looking at the wrong resource. In section 3 :Custom BSLs, the first section of for MSP430F5xxx/6xxx devices where the BSL section can be re-written, and thus customized. This link is CUSTOMBSL430.

    Below that resource is Main Memory BSLs, which is what I was trying to point yout owards. Here you will see MSPBoot (Flash devices) and MSPFRboot (FRAM devices). MSPBoot is what you want and the documentation and code example should help you. You still need to port the code as we only did it for a couple of devices. The example for MSP430G2553 would be the closest toy our target device. (I do see the code link is broken on the webpage, but the code link inside the MSPBoot documentation works.)

  • Hello Jace,

    So I found the example folder. There are 3 Versions of MSPBOOT G2553, App1, App2 and MSPBOOT. What is the difference?

  • Hello Jerry,

    Please read the MSPBoot UG for more information. App1 and App2 are for the dual image configuration example. 

  • Ok Thanks... Last question

    how to set a procedure address to an absolute address. So for example if I have a procedure;

    void Myroutine(void)  and I want it to reside at a specific location such as 0xA000, how do I do that? 

  • Jace,

    I was able to get an answer in CCS forum on this, so thanks again.

**Attention** This is a public forum