MSPM0G3507: Zephyr on MSPM03507 Current status?

Part Number: MSPM0G3507
Other Parts Discussed in Thread: UNIFLASH

Hi,

In the beginning of the year, I tried to get zephyr up and running on a 3507 launchpad, but eventually gave up.

Now, I can see 3507 has a setup page on the main Zephyr web page, so I tried it - everything builds and looks good until I issue the "west flash --openocd <path to cloned dir>/src/openocd --openocd-search <path to cloned dir>/tcl" line, which ends in a failure. I get the impression that the board has been flashed (the flash has at least been erased, since the existing app does not work after) but the blinky example does not startup, and I cannot debug the board. 
Now, I find a lot of information regarding which repo to use, so maybe I am better off using a ti repo? But the branch that I used to use is no longer available.

So, I guess my first question is - which zephyr repo/branch should I use? Last time I looked into this, it looked like e.g. spi and adc was supported, but now it looks like it isn't anymore? (according to the zephyr board/msp0g3505 launchpad page) It is a lot of conflicting information out there, I suspect this is why I cannot get this to work.

 

  • Hello,

    Which version of the Zephyr SDK are you using? If you are on 17.4 I would suggest https://github.com/msp-ti/zephyr/tree/i2c_dev this branch for the time being. 

    In your .venv, I issued:

    (.venv) C:\Users\<USERNAME>\zephyrproject\zephyr> git checkout -b i2c_dev msp-ti/i2c_dev

    (.venv) C:\Users\<USERNAME>\zephyrproject\zephyr> west update

    (.venv) C:\Users\<USERNAME>\zephyrproject\zephyr> west build -p always -b lp_mspm0g3507 samples\basic\blinky

    I was able to recreate your issue using the above commands, and the chip is now inoperable. 

    I am going to look into this further, however our expert on Zephyr is out of office until after American Thanksgiving. 

    Best Regards,

    Tyler

  • Hey,

    I was able to get a version working. In general, https://github.com/msp-ti/zephyr/tree/mspm0_dev_stable houses the stable build, however the individual branches will contain specific features, such as i2c, spi, etc. We are currently working on consolidating these, and are expecting additional documentation in the near future.

    Additionally, to fix the current issue, please ensure that the SDK version of Zephyr that you are using matches the branch. For example, the above dev_stable branch uses SDK version 0.17.0, and I was able to get the board working only after switching from version 0.17.4 to 0.17.0. 

    Please try the dev_stable branch with SDK version 0.17.0 and let me know if you are able to have it working.

    Best regards,

    Tyler

  • Hi Tyler,

    Thank you for testing! 

    Here's what I have done...

    From zepyrproject.org, I selected lp_mspm0g3507 board from the board selector. Then I followed the installation guide, which made the 17.4 SDK to be installed. Is this not a supported SDK? According to docs and dts, this variant does not look to support many drivers. But among the drivers it does support, is pwm, which I need.

    For some reason, when trying to see if there was any alternatives from Texas Instruments, I ended up at github.com/TexasInstruments/msp-zephyr. I suppose this was a wrong turn.

    When instead looking at github.com/msp-ti/zephyr as you linked, I think this is the repo that I used in the beginning of the year. And dev_stable looks to support a lot of drivers, but not the pwm? In fact, dev_stable looks to have not changed since 9 months.

    It is very hard to follow TI git maneuvers, I must say. (I mean, how come e.g. pwm is supported on zephyrproject.org, but not in dev_stable?)

    Are there any branch that supports adc, pwm, i2c, spi that also has a known working configuration/SDK?

    Anyway, I tried mspm0_dev_stable with 0.17.0, by first installing a clean zephyrproject, then once done, delete zephyr folder, and then 'git clone https://github.com/msp-ti/zephyr.git' followed by checkout 'git checkout mspm0_dev_stable'. But it does not build.
    I also tried to pull hal_ti.git, as suggested last time, but that does not make any difference.
    The error I receive is " ERROR: Malformed "build" section in file:
      /home/x/zephyrproject_mspm0g3507/modules/hal/nxp/zephyr/module.yml"

    Not sure how/why hal/nxp  is referenced.

    I'm a bit disappointed that ti hasn't come further - still the same messy setup with trial and errors as early in the year. 

    Thanks,

     Micael

  • Hey,

    Thank you for the patience around the Holiday, 

    We are currently in the process of moving from the msp-ti/zephyr repo to the TexasInstruments/msp-zephyr. 

    Apologies for the confusion on this, communicating with our internal teams it is best to use the Texasinstruments/msp-zephyr build from here on out, as it has the "stable" branch, which should include all of the drivers from the broken out dev builds in the msp-ti/zephyr git. We are updating out documentation to represent this, and move the msp-ti/zephyr git to be hidden so issues like this do not occur anymore. 

    All this to say, the dev build from github.com/TexasInstruments/msp-zephyr will be the newest TI build going forward. Does the dev branch on this repo have all of the peripherals you are expecting?

  • Hi Tyler,

    OK, so I looked again at TexasInstruments/msp-zephyr dev branch. This one includes PWM/I2C, but is missing, as far as I can tell (going by the device tree), SPI and ADC, which is available in the msp-ti/zephyr dev_stable. Especially ADC is important for me (if I need to prioritize).

    Are there any plan on bringing in ADC (SPI) soon-ish on TexasInstruments/msp-zephyr? Or are there any other branch on TexasInstruments/msp-zephyr that I should look at? I tried to eyeball a few branches, but it did not look like there was any such work. But I did not check all branches..

    And :- which SDK should one use if going for the TexasInstruments/msp-zephyr - dev?

     - Micael 

  • Hey Micael,

    We currently have the ADC and SPI drivers on the dev branch of msp-zephyr. https://github.com/TexasInstruments/msp-zephyr/tree/dev/drivers/spi and https://github.com/TexasInstruments/msp-zephyr/tree/dev/drivers/adc both contain the relevant kconfig and driver files. 

    However, the devicetree is not yet updated. I should have a response from the software team by tomorrow on the timeline for that addition. I believe the ADC is closer to being ready than the SPI, as it appears to be defined in the SoC file.

    Best Regards,

    Tyler

  • That sounds promising! 

    Looking forward hearing about the device tree availability. But I anyway think this is makes it worthwhile for me to restart the project. 

    Which SDK shall I use for TexasInstruments/msp-zephyr dev branch? Still 0.17.0?

    Thanks,

     Micael

  • Hey Micael, 

    Thank you again for the patience. ADC is currently available on the device tree, in the dev branch located here: https://github.com/TexasInstruments/msp-zephyr/blob/dev/dts/arm/ti/mspm0/g/mspm0g350x.dtsi

    SPI nodes are not currently on the dev branch, but there is an ongoing PR to add them so I will update you when they arrive online. 

    For the dev branch located at github.com/TexasInstruments/msp-zephyr, the most recent zephyr release 0.17.4 works. 

    Best Regards,

    Tyler

  • Hi Tyler,

    Thanks! This looks much better - I just finished building the blinky. I uesd the '--mr dev' option to get the dev branch. 

    (The documentation is referencing simplelink-zephyr and are mentioning some kind of tags, which is hard to understand. Maybe it is obsolete copy/paste stuff?)

    Anyway, the doc also says xds110 is not supported by west flash on this repo. Is this still true?

    Regardless, I don't mind using CCS theia instead, since I use it for another project. But how do I import a zephyr project into CCS? And is there a way to also build the zephyr proejct from CCS? Maybe there's some docs somewhere, that I have yet to find?

    Best regards,

     Micael

  • Hey Micael, would you mind pointing me to which document says that the xds110 is not supported? Is this the simple link academy? 

    Additionally, I would suggest using TI's embedded debug program in VScode over CCS for Zephyr, here is a tutorial on setting that up: https://dev.ti.com/tirex/explore/content/simplelink_academy_for_low_power_f3_sdk_9_12_00_00/_build_simplelink_academy_for_low_power_f3_sdk_9_12_00_00/source/zephyr/cc23xx_zephyr_debug.html#installing-the-ti-embedded-debug-for-vs-code-extension-and-its-dependencies

  • Hi Tyler,

    Had some extra hours to try to get further with this today. 

    I followed your advice to use vscode over CCS. All well, the guide you linked to was very good, but I did not succeed in flashing the launchpad unfortunately.

    I arrive to the error "Error: Error connecting DP: cannot read IDR".  Do I need to somehow reset the MCU from the failed west flash from the beginning of the thread?  Or is the FW of the XDS110 too old or new?

    Here's the full logs from both tabs when I try to start a debug sesssion;


    Debug Console tab:


    Cortex-Debug: VSCode debugger extension version 1.12.1 git(652d042). Usage info: github.com/.../cortex-debug
    Reading symbols from /home/me/.config/Texas Instruments/ti-embedded-debug/arm-none-eabi-gdb/14.2.rel1.1/arm-none-eabi-objdump --syms -C -h -w /home/me/zephyrproject_mspm0g/zephyr/build/zephyr/zephyr.elf
    Reading symbols from /home/me/.config/Texas Instruments/ti-embedded-debug/arm-none-eabi-gdb/14.2.rel1.1/arm-none-eabi-nm --defined-only -S -l -C -p /home/me/zephyrproject_mspm0g/zephyr/build/zephyr/zephyr.elf
    Launching GDB: "/home/me/.config/Texas Instruments/ti-embedded-debug/arm-none-eabi-gdb/14.2.rel1.1/arm-none-eabi-gdb" -q --interpreter=mi2
        IMPORTANT: Set "showDevDebugOutput": "raw" in "launch.json" to see verbose GDB transactions here. Very helpful to debug issues or report problems
    Launching gdb-server: "/home/me/.config/Texas Instruments/ti-embedded-debug/openocd/1.1.1.46/bin/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "~/.config/Texas Instruments/ti-embedded-debug/openocd/1.1.1.46/bin/share/openocd/scripts" -f /home/me/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f ./interface/xds110.cfg -f ./board/ti_mspm0_launchpad.cfg
        Please check TERMINAL tab (gdb-server) for output from /home/me/.config/Texas Instruments/ti-embedded-debug/openocd/1.1.1.46/bin/bin/openocd
    Finished reading symbols from objdump: Time: 21 ms
    Output radix now set to decimal 10, hex a, octal 12.
    Input radix now set to decimal 10, hex a, octal 12.
    Finished reading symbols from nm: Time: 66 ms
    OpenOCD: GDB Server Quit Unexpectedly. See gdb-server output in TERMINAL tab for more details.


    Terminal tab:

    [2025-12-07T10:32:25.511Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
    "/home/me/.config/Texas Instruments/ti-embedded-debug/openocd/1.1.1.46/bin/bin/openocd" -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s "~/.config/Texas Instruments/ti-embedded-debug/openocd/1.1.1.46/bin/share/openocd/scripts" -f /home/me/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f ./interface/xds110.cfg -f ./board/ti_mspm0_launchpad.cfg
    Open On-Chip Debugger 0.12.0+dev-00004-g66c4e0d8f (2025-11-19-10:06)
    Licensed under GNU GPL v2
    For bug reports, read
            openocd.org/.../bugs.html
    CDLiveWatchSetup
    Warn : Interface already configured, ignoring
    Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
    Warn : Transport "swd" was already selected
    cortex_m reset_config sysresetreq
    Info : Listening on port 50001 for tcl connections
    Info : Listening on port 50002 for telnet connections
    Info : XDS110: connected
    Info : XDS110: vid/pid = 0451/bef3
    Info : XDS110: firmware version = 3.0.0.25
    Info : XDS110: hardware version = 0x0028
    Info : XDS110: connected to target via SWD
    Info : XDS110: SWCLK set to 2500 kHz
    Info : clock speed 10000 kHz
    Error: Error connecting DP: cannot read IDR


    Info : XDS110: disconnected
    [2025-12-07T10:32:32.438Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
    GDB server session ended. This terminal will be reused, waiting for next session to start...

    Best regards,

      Micael

  • Hey Micael,

    I've experienced issues in the past where the board essentially locks up after a failed west flash. Do you have uniflash installed?

    If not, please install Uniflash, connect the launchpad, and when it is detected begin holding down NRST. Begin the uniflash session, go to "settings and utilities" tab, and use "mass erase auto". Hold down NRST until the progress meter reaches a GEL script, and then release NRST. Immediately afterward scroll down and click factory reset auto. This should bring the device into a fresh state.

    Also, I looked into the XDS110 being unsupported issue, and I have found a workaround on Linux, which I think may fix this issue you're having. I am working on finding a workaround on windows. Let me know if you have a linux machine and I can get you up and running immediately.

    Thank you for the patience here,

    Tyler

  • Hi Tyler, 

    Great, using uniflash and your NRST trick did it! I now think I have the debugger up and running, it is already getting late here, so I'll test more tomorrow.

    I'm on Linux. It would be nice to get the west flash working, but now, with vscode, I am not stuck any more (I think! Slight smile). 

    Best regards, 

     Micael

  • OK Great! 

    Well, if tomorrow comes and that doesnt work, and for anyone looking this thread going forward, this is the workaround for openOCD:

    cd %homepath%

    git clone https://github.com/openocd-org/openocd.git

    sudo apt install libusb-1.0-0-dev libhidapi-dev

    cd <cloned_OPENOCD_dir>

    git submodule update --init --recursive

    cd jimtcl

    ./configure

    make

    sudo make install

    cd .. #back in the cloned directory

    sudo apt-get install libusb-1.0-0-dev

    ./bootstrap #when building from the git repository

    ./configure --enable-xds110 #optionally add any other debuggers as needed

    make

    sudo make install

    This sets up the most recent OpenOCD branch for west, which supports MSP launchpads.

    Then, whenever you build, you use this command (assuming zephyrproject is where west was initialized):

    cd ~/zephyrproject/zephyr

    west build -p always -b lp_mspm0g3507 -d out samples/basic/blinky

    west flash -d out --openocd ~/openocd/src/openocd --openocd-search ~/openocd/tcl

  • Thank you for your invaluable help Tyler!