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.

MSP430F5529: Building bsl_scripter on Linux 18.04

Part Number: MSP430F5529

Where can I find instructions on building the bsl_scripter on Linux 18.04.  Have built with make, had problem finding hid-libusb.o, found hid.o in libusb area of hidapi; linked to that ok.  My version of bsl_scripter crashes without error: ---------------------------------------------------------
BSL Scripter 3.4.0.1

PC software for BSL programming
2021-Feb-05 11:35:22
---------------------------------------------------------

Log mode is turned on!
../../Source-Linux/bsl-scripter-linux-64_libusb script_5xx_usb
Verbose is turned off!

using the 5xx script.  BSL is there, using testhid_libusb from the hidapi/testhid/:

Device Found
  type: 2047 0200
  path: 0003:0059:00
  serial_number: (null)
  Manufacturer: (null)
  Product:      (null)
  Release:      109
  Interface:    0

Any suggestions appreciated.

Thanks, Joe

  • More:

    Was not specifying script file properly, get now:

    ---------------------------------------------------------
    BSL Scripter 3.4.0.1

    PC software for BSL programming
    2021-Feb-05 13:12:19
    ---------------------------------------------------------
    Input file script is : /home/joe/ti/BSL-Scripter/ScriptExampleLinux/5xx_usb/script_5xx_usb.txt

    //
    //Script example 5xx USB BSL
    //Device tested: MSP430F5529
    //
    //Download a blink LED application
    //to the device through the USB BSL
    //
    LOG
    ////////////////////////////////////
    //Write RAM USB BSL to the device
    ////////////////////////////////////
    MODE 5xx USB
        Unable to open the HID device

    However get lsusb:

    Bus 003 Device 089: ID 2047:0200 Texas Instruments MSP430 USB HID Bootstrap Loader
    Bus 003 Device 088: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
    and when running ./hidtest-libusb

    Device Found
      type: 2047 0200
      path: 0003:0059:00
      serial_number: (null)
      Manufacturer: (null)
      Product:      (null)
      Release:      109
      Interface:    0
    So, BSL is there on the MSP430F5529, ready.  Thinking my build has a problem.

    ldd:

    ldd bsl-scripter-linux-64_libusb
        linux-vdso.so.1 (0x00007ffce5b59000)
        libboost_filesystem.so.1.56.0 => /usr/lib/libboost_filesystem.so.1.56.0 (0x00007f49a6da3000)
        libboost_system.so.1.56.0 => /usr/lib/libboost_system.so.1.56.0 (0x00007f49a6b9f000)
        libboost_program_options.so.1.56.0 => /usr/lib/libboost_program_options.so.1.56.0 (0x00007f49a691e000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f49a6716000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f49a64f7000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f49a616e000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f49a5dd0000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f49a59df000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f49a57c7000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f49a7228000)
    Don't see libusb here.  Where are the build instructions for bsl_scripter?

    Thanks,  Joe

  • Hi Joe,

    The following thread may be help solve your issue.

    Linux/MSPBSL: Building BSL Scripter for ARM Embedded Linux Processor

    Regards,

    James

  • James,

    I also had that problem that your reference indicated:

    g++ ... -o BSL_Scripter.o Util.o ...
    (.text+0x28): undefined reference to `main'

    There is something wrong with the makefile; the name of the output file (the executable) that should come after "-o" is missing, so gcc overwrites the first object file (BSL_Scripter.o).

    I substituted

    OUTPUT := bsl-scripter-linux-64_libusb

    for the first

    OUTPUT :=

    to prevent the above.  Makes me think not everything is not set up properly to do a "make" of the program.  Need to know how to set up the configuration for Ubuntu, where ifeq($(PATFORM),Linux) does not work, meaning

    PLATFORM := $(shell uname -s)

    Doesn't work properly on Ubuntu 18.04?

    Help needed here.

    Thanks for the reply...  Joe

    Build completes, but still can't find the device at 0x2047 0200

  • Hi Joe,

    I found the following instructions in the README.

    BSL Scripter version 3.4.0 Release date: 04/26/2018
    
    ===============================================================================
    GENERAL USAGE NOTES
    ===============================================================================
    - BSL Scripter is a command-line and script-file interface application
      to perform the MSP430 and MSP432 devices programming 
      
    - The package deliverable contains:
      1. bsl-scripter-<osType>.zip
         unzip this folder to obtain the executable file for chosen OS.
    	 info: BSL Scripter v3.2.0 is delivered for:
    	 - Windows 
    	 - Linux 32 bit
    	 - Linux 64 bit
    	 - Mac OS X
      2. (folder)SourceCode 
         This folder contains the source code of the BSL-Scripter.
    	 For Windows environment, the project file for Visual Studio 2013 Express
    	 is also provided. For Linux and Mac OS X packages, the Makefile 
    	 is provided.
      3. (folder)Example
         This folder contains the script example how to use the BSL-Scripter
    	 with for each BSL families. Start from version 3.2.0, the examples
    	 of command line interface are also provided.
      3. (folder)Deprecated--only applicable for Windows package
         This folder contains the BSLDEMO2.exe for MSP430F1xx,MSP430F2xx, and
    	 MSP430F4xx devices.
      4. BSL-Scripter_3.3.0.manifest.html 
      5. README.txt
    
    - The User's Guide of BSL Scripter is available under:
      http://www.ti.com/lit/slau655 
    
    ===============================================================================
    BUILDING THE PROJECT FOR CUSTOMIZED BSL-SCRIPTER
    ===============================================================================
    1. Windows
    -------------------------------------------------------------------------------
    1.1 Development environment
    -------------------------------------------------------------------------------
    * You will need to have Microsoft Visual Studio 2013 installed.
    -------------------------------------------------------------------------------
    1.2. Dependencies
    -------------------------------------------------------------------------------
    In order to compile BSL Scripter with MCVS you will need:
    * boost
        -Download and build (http://www.boost.org)
        -Visual Studio users can get pre-built boost binaries from
         sourceforge.net/.../
        -Version used in official build is 1.58
        -Only libboost_system-xxx.lib, libboost_filesystem-xxx.lib  
    	 libboost_program_options-xxx.lib are required to be built independently
        -Visual Studio must be configured to find boost headers and libs
    
    * hidapi
        -Download and build (github.com/.../releases)
        -Version used in official build is 0.8.0-rc1
        -hidapi.h must be copied to ThirdParty\include\
        -hidapi.lib must be copied to ThirdParty\lib\
    
    * libusb
        -Download and build (github.com/.../releases)
        -Version used in official build is 1.0.21
        -libusb.h must be copied to ThirdParty/include/
        -libusb-1.0.lib must be copied to ThirdParty/lib/
    -------------------------------------------------------------------------------
    2. Linux
    -------------------------------------------------------------------------------
    2.1 Development environment
    -------------------------------------------------------------------------------
    * You will need the GNU tool chain (GCC 4.6.3 or higher) to use the 
      existing Makefile.
    -------------------------------------------------------------------------------
    2.2. Dependencies
    -------------------------------------------------------------------------------
    In order to compile the BSL Scripter with GCC you will need:
    
    * boost
        -Download from http://www.boost.org
        -Version used in official build is 1.56
        -Only libboost_system.a/so and libboost_filesystem.a/so
         libboost_program_options-xxx.a/so	are required
    
    * hidapi
        -Download and build (github.com/.../releases)
        -Version used in official build is 0.8.0-rc1
        -The BSL Scripter project assumes hidapi being built against libusb-1.0
         (the default used in the Makefile coming with hidapi 0.8.0-rc1)
        -hidapi.h must be copied to ThirdParty/include/
        -hid-libusb.o must be copied to ThirdParty/lib/
    
    * libusb
        -Download and build (github.com/.../releases)
        -Version used in official build is 1.0.21
        -libusb.h must be copied to ThirdParty/include/
        -libusb-1.0.a must be copied to ThirdParty/lib64/ for Ubuntu 64 bit and
    	 libusb-1.0.a must be copied to ThirdParty/lib/ for Ubuntu 32 bit
    -------------------------------------------------------------------------------
    3. OSX
    -------------------------------------------------------------------------------
    3.1 Development environment
    -------------------------------------------------------------------------------
    You will need Clang/LLVM to use the existing Makefile.
    -------------------------------------------------------------------------------
    3.2. Dependencies
    -------------------------------------------------------------------------------
    In order to compile BSL Scripter with Clang you will need:
    
    * boost
        -Download from http://www.boost.org
        -Version used in official build is 1.56
        -Only libboost_system.a/so and libboost_filesystem.a/so
         libboost_program_options-xxx.a/so	are required
    
    * hidapi
        -Download and build (github.com/.../releases)
        -Version used in official build is 0.8.0-rc1
        -The BSL Scripter project assumes hidapi being built against libusb-1.0
         (the default used in the Makefile coming with hidapi 0.8.0-rc1)
        -hidapi.h must be copied to ThirdParty/include/
        -hid-libusb.o must be copied to ThirdParty/lib/
    
    * libusb
        -Download and build (github.com/.../releases)
        -Version used in official build is 1.0.21
        -libusb.h must be copied to ThirdParty/include/
        -libusb-mac-1.0.a must be copied to ThirdParty/lib64/
    -------------------------------------------------------------------------------

    Also, I found some build commands on page 10 in the MSP430 Bootloader With Sitara Embedded Linux Host app note that may help.

    Execute the following commands in the corresponding project folder to build each project.

    UART_BSL_MSP430 gcc -I ./ main.c uart_if.c pinmux.c gpio_if.c utils.c bsl.c -o msp430_bsl

    UART_BSL_MSP430FR gcc -I ./ main.c uart_if.c pinmux.c gpio_if.c utils.c bsl.c -o msp430fr_bsl

    UART_BSL_MSP430FR_Command_Line_Utility gcc -I ./ main.c uart_if.c pinmux.c gpio_if.c utils.c bsl.c -o command_line_bsl

    Unfortunately, I don't have access to a Linux-based PC, so I can't try to duplicate the error. I would recommend using the pre-built BSL Scripter with your board to verify that it works correctly. I think that would be a strong indicator that there's something wrong with the custom build.

    Regards,

    James

  • Success: rebuilt bsl_scripter after changing Makefile to define:

    PLATFORM = Linux
    BIT64 = 64
    STATIC = 1
    Then doing "make".  The "PLATFORM := $(shell uname -s)" doesn't seem to work on Ubuntu 18.04.

    Then running as sudo, success with the new build.

    Please TI guys, document the linux build instructions better for us linux bigots.

    ////////////////////////////////////
    //Start the RAM USB BSL application
    //to download the blink application
    ////////////////////////////////////
    MODE 5xx USB
    RX_PASSWORD pass32_default.txt
        Read Txt File  : /home/joe/ti/BSL-Scripter/ScriptExampleLinux/5xx_usb/pass32_default.txt
        BSL Password is correct!
    RX_DATA_BLOCK blinkLED_f5529.txt
        Read Txt File  : /home/joe/ti/BSL-Scripter/ScriptExampleLinux/5xx_usb/blinkLED_f5529.txt
        Time elapsed of writing 230 bytes : 0.01998 seconds
        Speed of writing data :11.24(kB/s)
    SET_PC 0x4400

    Looking good!

    Thanks  Joe

**Attention** This is a public forum