• Resolved

BSL for MSP430 on ARM Linux

Hi,

last week i visit TI at the embedded world and talked with the bootloader specialist for MSP MCUs. 

He told me there is an application note that describes the MSP430 been flashed via UART on a linux ARM CPU.

He said there is also a ARM linux source code for the BSL too. 

Does anyone knows where can i find this application note?

 

  • In reply to zrno soli:

    Thanks yes i know this page already but BSL Scripter is not for Linux ARM based OS.
    So even the provided Source Code from the BSL Scripter doenst help me here, because its for a x86 or 64bit CPUs.
    I am looking for a solution that was made already flashing the MSP430 under ARM Linux system.
  • In reply to Michael Liesenberg85:

    Hi Michael,

    I spoke with the engineer you talked to and he was referring to the MSPBoot (SLAA600) host projects. These are designed to run on a MSP430F5438A or MSP430G2553 device but can be ported to ARM if necessary.

    Regards,
    Ryan

  • In reply to Ryan Brown1:

    Hi Ryan,

    thank you! I will try to run this project on MSP432 via ARM Linux CPU

  • In reply to Michael Liesenberg85:

    Hi Ryan,

    so i saw the code from the MSP-EXP430G2_I2CMSPBootHost Project and i have a question about the target application .txt data.

    The Demo Host project uses the application like "App1_G2553_I2C_BSLBased_G2Host.txt" to flash via I2C/UART/SPI to the target.

    Inside this text file the code is seperated in Address segemnt 0 and 1 in arrays like here:

    const uint16_t App1_Addr[2] = {

       0xc004, // Address segment0

       0xfbce, // Address segment1

    };

    const uint16_t App1_Size[2] = {

    360,   // Size segment0

    50,   // Size segment1

    };

    const uint8_t App1_0[] = {

    0xb2,0x40,0x80,0x5a,0x20,0x01,0xd2,0xd3,0x22,0x00,0xd2,0xd3,0x21,0x00,0x0d,0x12,

    0x0e,0x12,0x3d,0x40,0x44,0x28,0x1e,0x43,0x1d,0x83,0x0e,0x73,0xfd,0x23,0x0d,0x93,

    0xfb,0x23,0x3e,0x41,0x3d,0x41,0x00,0x3c,0x03,0x43,0xd2,0xc3,0x21,0x00,0x0d,0x12,

    0x0e,0x12,0x3d,0x40,0x44,0x28,0x1e,0x43,0x1d,0x83,0x0e,0x73,0xfd,0x23,0x0d,0x93,

    0xfb,0x23,0x3e,0x41,0x3d,0x41,0x00,0x3c,0x03,0x43,0xd2,0xd3,0x21,0x00,0x0d,0x12,

    0x0e,0x12,0x3d,0x40,0x44,0x28,0x1e,0x43,0x1d,0x83,0x0e,0x73,0xfd,0x23,0x0d,0x93,

    0xfb,0x23,0x3e,0x41,0x3d,0x41,0x00,0x3c,0x03,0x43,0xd2,0xc3,0x21,0x00,0xf2,0xd2,

    0x21,0x00,0xf2,0xd2,0x27,0x00,0xf2,0xd2,0x24,0x00,0xf2,0xd2,0x25,0x00,0xb2,0x40,

    0x10,0x00,0x62,0x01,0xb2,0x40,0xe7,0x03,0x72,0x01,0xb2,0x40,0x10,0x01,0x60,0x01,

    0x32,0xd0,0xd8,0x00,0x0c,0x43,0x30,0x41,0x0a,0x12,0x09,0x12,0x3f,0x40,0x00,0x00,

    0x3f,0x90,0x01,0x00,0x19,0x28,0x3f,0x40,0x00,0x00,0x3f,0x90,0x01,0x00,0x14,0x28,

    0x3a,0x40,0x00,0x00,0x3a,0x80,0x00,0x00,0x3a,0x50,0x03,0x00,0x0a,0x11,0x0a,0x11,

    0x39,0x40,0x00,0x00,0x3c,0x49,0x7f,0x4c,0x4f,0x4f,0x0f,0x5f,0x1f,0x4f,0x00,0x00,

    0x3d,0x49,0x8f,0x12,0x1a,0x83,0xf6,0x23,0x3f,0x40,0x00,0x00,0x3f,0x90,0x00,0x00,

    0x08,0x24,0x3a,0x40,0x00,0x00,0x02,0x3c,0x3f,0x4a,0x8f,0x12,0x3a,0x90,0x00,0x00,

    0xfb,0x23,0x30,0x40,0x52,0xc1,0x0f,0x12,0x0e,0x12,0x0d,0x12,0x0c,0x12,0x0b,0x12,

    0xc2,0x43,0x23,0x00,0xb0,0x12,0x32,0xc1,0x3b,0x41,0x3c,0x41,0x3d,0x41,0x3e,0x41,

    0x3f,0x41,0x00,0x13,0x31,0x40,0x00,0x04,0xb0,0x12,0x62,0xc1,0x0c,0x93,0x02,0x24,

    0xb0,0x12,0x9c,0xc0,0x0c,0x43,0xb0,0x12,0x04,0xc0,0xb0,0x12,0x66,0xc1,0xb2,0x40,

    0xde,0xc0,0x00,0x02,0xd2,0xd3,0x02,0x02,0x32,0xc2,0x03,0x43,0xb2,0x40,0x0b,0x5a,

    0x20,0x01,0xff,0x3f,0x34,0x41,0x35,0x41,0x36,0x41,0x37,0x41,0x38,0x41,0x39,0x41,

    0x3a,0x41,0x30,0x41,0xd2,0xe3,0x21,0x00,0x92,0xc3,0x62,0x01,0x00,0x13,0x1c,0x43,

    0x30,0x41,0x03,0x43,0xff,0x3f,0xff,0x3f,

    };

    const uint8_t App1_1[] = {

    0x30,0x40,0xfa,0xc0,0x30,0x40,0x6a,0xc1,0x30,0x40,0x6a,0xc1,0x30,0x40,0x6a,0xc1,

    0x30,0x40,0x6a,0xc1,0x30,0x40,0x6a,0xc1,0x30,0x40,0x58,0xc1,0x30,0x40,0x6a,0xc1,

    0x30,0x40,0x6a,0xc1,0x30,0x40,0x6a,0xc1,0x30,0x40,0x6a,0xc1,0x30,0x40,0x6a,0xc1,

    0x18,0xc1,

    };

    const uint8_t *App1_Ptr[2] = {

    App1_0,

    App1_1,

    };

    In my case i want to use my output file .txt generated from CCS for the MSP432.

    The problem is that i have only the hex data values in it.(see attached)

    How to i separate my .text in such a segment? How do i know what values belongs to which segments?

    driverlib_empty_project_from_source.txt

  • In reply to Michael Liesenberg85:

    Just saw that there is a tool included:
    430txt2C: Perl script used to convert 430 .txt file to C Array used by host
    Dont know if 430 .txt output file the same is as MSP432
  • In reply to Michael Liesenberg85:

    So the 430txt2C did the job!
    But what is the "CRCType", "StartAddr", "EndAddr " and "CRCAddr" from the MSP432?
    Here is the documentation from SLAA600:
    CRCType = CRC16 or CRC8
    InputFile = Input File in .txt format
    OutputFile = Output File in .txt format
    StartAddr = Start address in hexadecimal format
    EndAddr = End address in hexadecimal format
    CRCAddr = Address in hexadecimal format where CRC is stored
  • In reply to Michael Liesenberg85:

    Glad to see that you were able to find the 430txt2c python script. The information you are looking for only applies if you are creating a custom flash-based bootloader solution for the MSP432, please refer to SLAA600 for more information. In this case the MSPBoot target project materials would need to be ported for the MSP432 and the BSL start, end, and CRC flash addresses would need to be provided to the host so that it can properly access and communicate with the custom bootloader.

    Regards,
    Ryan

  • In reply to Ryan Brown1:

    Hi Ryan,

    yes i will cutomize the bootloader solution so that it uses the right configuration like BSLBased_UART instead of I2C, if it is that what you mean.

    What i dont understand is why do i have to implement the Target MSPBoot materials to the MSP432, since i am using the UART BSL Ports P1.2 and P1.3. I thought that once the Host start the communication with the boot commands the MSP432 enters in boot mode automatically.

    For example, if i use the BSL-Scripter on my Windows PC and communicate on the same ports, using level converters, i dont have to add any materials on MSP432 to make it work as faar as i understood it. The BSL Scripter send such a command on those Ports that the MSP432 enters automatically in boot mode, erase the Flash memory, load new firmware.

    Isnt the start/end/CRC flasha ddresses fixed on the MSP432?

  • In reply to Michael Liesenberg85:

    Hi Michael,

    You don't have to implement the target MSPBoot solution to the MSP432, I was just explaining what CRCType/StartAddr/EndAddr/CRCAddr are used for. Since you are using the resident BSL instead of a main-memory solution then the addresses are fixed and the variables should not be necessary for your host firmware. Please remember that the host code your are sampling from was designed to be used alongside MSPBoot target projects.

    Regards,
    Ryan