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.

  • TI Thinks Resolved

MSP430FR2476: Help finding beginning of program in memory

Expert 2975 points

Replies: 4

Views: 158

Part Number: MSP430FR2476

Hello,

In reading the datasheet the memory address for the beginning of code (program) space is 0x8000 to 0xFFFF.  When I look at my assembly in code composer it actually starts at 0x882A as shown in the attached screenshot.  I'm thinking this is define by the linker?

The reason I'm looking into this is because I need to send the MSP an updated image/bit file via the BSL and I need to figure out where exactly to put it. 

Questions

1. Can I just use the address shown in the debugger - 0x882A and the MSP will be happy?

2. Why is the program code not at 0x8000?

 

  • 1) Your program entry point isn't really main(), rather it's a library function named something similar to c_int00. That function does C initialization then calls main().

    2) The linker puts things more or less where it wants (within its directives). c_int00 may not even be at the beginning of code memory.

    When I've used the BSL, I used the "Hex Utility" to create a TI-TXT file, which the PC program knew how to use. The Hex Utility figured out which pieces to load. I haven't done this recently, so maybe things have changed. To make a TI-TXT file use

    Build Settings->Build->Hex Utility->Enable Hex Utility [check box] then

    Build Settings->Build->Hex Utility->Output Format->Output Format->Output TI-TXT

    The <program>.txt file will appear in the Debug directory.

  • In reply to Bruce McKenney47378:

    Thank you so much Bruce that post is very helpful!

    Where I'm really hung up I think is on the BSL data rx cmd.  Once I launch the BSL another chip will have to send the image over using the BSL commands.  From what I can see from the users guide for the MSP430FR2xx BSL you send a command telling the BSL where in memory to put the incoming data.  So I am assuming I need to know what is at the beginning of the bit stream and where it goes.

    Are you implying there is a utility that can build an image that  includes the BSL commands so you just start the BSL in the target and load in this bitstream and you don't have to worry about managing the individual commands?

    If not, is the strategy just to mimic the linker?

  • In reply to Robbie Valentine:

    A TI-TXT file contains a sequence of fragments, each preceded by an "at-address" line [Forum won't let me type an at-sign?]. It's analogous to S-records but I find it a bit easier to read. I encourage you to generate one and look at it. The Hex Utility can produce other formats as well.

    The BSL accepts a sequence of fragments (here's an address, now here's the data to put there).

    I used a program called BSLDEMO2 ("deprecated" for 10 years so far). There are probably more modern methods, so look around.

    Where does this second "loader" MCU get the load image it sends? That's probably the key to how you want the load image stored.

    The linker produces the bytes you want, but also a bunch of other structure/decoration. The Hex Utility extracts just the bytes you want from the file the linker constructs.

  • In reply to Bruce McKenney47378:

    Oh ok cool. 

    I have a software application that will send the bit stream to a main processor.  The main processor will forward that bit stream on over I2C to this little MCU when it needs to be updated.  So it is software -> main processor -> MSP430FR MCU.  

    This is very helpful.  I'll check out that file type.  It sounds like you get data blocks with their associated address so I just wrap that in BSL commands and forward the content to the MSP430FR MCU.  Is that along the lines of what you're describing?

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.