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.

  • Resolved

Loading BSL/Main Flash from an assembler only project

Prodigy 80 points

Replies: 2

Views: 240

Part Number: MSP430F5524

Tool/software: Code Composer Studio

re: MSP430F5524
 Loading BSL/Main Flash from an assembler only project

I appologise in advance if my information/terminology is confusing. My goal is to use the CCS IDE as an assembler/linker with debug capabilities for an assembly only project. I want to load BSL_Flash and Program_Flash from a single project without any C/C++ references. I just don't C it.

The reason for asking the question rather than testing is that I don't have a hardware prototype or EVM due to cost constraints. I'm trying to ensure that I can personally support the product before investing limited resources.

My questions are:
1. Will the project load both BSL and Main memory sections as described by the link map?
2. Do you think there will be problems using the debugger due to the way I've set up the project?

To set up the project, I have removed as much of the C framework from CCS as I could find. I have removed all directory includes except for the project root. I have copied "msp430f5525.cmd" to my project dir, renamed it to "msp430f5525.asm", and rewrote it in assembler.

To set up the project, I copied "lnk_msp430f5524.cmd" to my project dir, stripped conditional statements, created my own boot section and wrote a program to test the build.

The added code to "lnk_msp430f5524.cmd" is:

MEMORY
{
    ......
    INFOD       : origin = 0x1800, length = 0x0080
    MYBOOT      : origin = 0x1000, length = 0x0800       /* added by me*/
    FLASH       : origin = 0x4400, length = 0xBB80
    ......
}


SECTIONS
{

   ......
    .infoD      : {} > INFOD
    .myboot     : {} > MYBOOT                 /* added by me */
    .int00      : {}               > INT00
    ......
}

The simplified test program "bsl.asm" is:

 .def  BootCode                      ; Export program entry-point

 .include "msp430f5524.asm"

 .retain
 .retainrefs
 .sect ".myboot"   ; BSL FLASH

BootCode
 mov.w  #WDTCTL,r4
 ret

The related map file references are:

MEMORY CONFIGURATION
      name        origin    length      used     unused   attr    fill
---------------  --------  ---------  --------  --------  ----  --------
......
  MYBOOT         00001000   00000800  00000006  000007fa  RWIX
......

SECTION ALLOCATION MAP
 output                                  attributes/
section   page    origin      length       input sections
--------  ----  ----------  ----------   ----------------
......
.myboot    0     00001000    00000006    
                 00001000    00000006     bsl.obj (.myboot)
......

Thank you in advance for your help,
Rudy

  • Hello Rudy,

    I'm not sure about your modifications on CCS. You can write everything in assembly with the default editor. While debugging, the default editor will still serve,as you can single step at the assembly level (green arrows) and there is a diss-assembler view that can be used.

    For Developing and Debugging the BSL, special care must be taken,. To do so please follow the suggestions in section 1.5 BSL Development and Debug in the Custom BSL User guide (http://www.ti.com/lit/slaa450 ). Typically, if you are using a custom bSL, it is developed independently of the application and loaded onto the device before the application is. I have heard of customers who take the binary image of their custom BSL and their application and combine them (as no memory locations will overlap) to download both to the device at the same time.

    Regards,

    JH 

            _____________________________________________________________________


    Search E2E! Your questions may already be answered!

    TI Cloud Tools             MSP Product Page

  • In reply to Jace H:

    Thank you Jace. That was exactly the info I was hoping for. Eventually, I will split the bsl out to a seperate project and use it to load main memory during the manufacturing process.

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.