Author Topic: TI MSPM0: toolchain and programming  (Read 6344 times)

0 Members and 6 Guests are viewing this topic.

Offline Jope

  • Regular Contributor
  • *
  • Posts: 116
  • Country: de
Re: TI MSPM0: toolchain and programming
« Reply #25 on: September 08, 2026, 03:53:27 am »
OpenOCD apparently does not support this family. I could only find device configs for MSPM0L and MSPM0G devices, but not MSPM0C.

The current sources of OpenOCD seem to contain at least support for the MSPM0C1104 (https://github.com/openocd-org/openocd/blob/master/src/flash/nor/mspm0.c).
The values for the MSPM0C1103 are missing, but you could add them here (in mspm0.c):
Code: [Select]
static const struct mspm0_part_info mspm0c_parts[] = {
{ "MSPS003F4SPW20R", 0x57b3, 0x70},
{ "MSPM0C1104SDGS20R", 0x57b3, 0x71},
{ "MSPM0C1104SRUKR", 0x57b3, 0x73},
{ "MSPM0C1104SDYYR", 0x57b3, 0x75},
{ "MSPM0C1104SDDFR", 0x57b3, 0x77},
{ "MSPM0C1104SDSGR", 0x57b3, 0x79},
};

The user IDs for the MSPM0C1103 are listed in table 8-12 here: https://www.ti.com/lit/ds/symlink/mspm0c1104.pdf
« Last Edit: September 08, 2026, 03:55:17 am by Jope »
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4645
  • Country: us
Re: TI MSPM0: toolchain and programming
« Reply #26 on: September 08, 2026, 05:44:28 am »
Quote
I have read the gnu makefile documentation, and while I see the syntax described therein, I'm still not sure how to begin with a source file and the SDK and get $whateverFormatProbeRSwants. Thus, I asked a generator bot to give me a makefile which I will hand-wave for now
Sigh.  Makefiles were a lot more understandable back before they were "usually" auto-generated.  That led to a lot of "noise" and obfuscation of the basic function. :-(

Your .c file didn't include your attempt at using sysTick, so we can't comment on what might be wrong with it.  (leave non-working code in your source, #ifdef'ed out...)
Quote
Code: [Select]
STARTUP := $(SDK)/source/ti/devices/msp/m0p/startup_system_files/gcc/startup_mspm0c110x_gcc.c
Does the startup code initialized clocks and flash wait states and such?  I don't see  that in your main.c...


 

Offline IconicPCB

  • Super Contributor
  • ***
  • Posts: 1631
  • Country: au
Re: TI MSPM0: toolchain and programming
« Reply #27 on: September 08, 2026, 11:08:02 am »
There is the option of Arduino... but only for MSPM0G3507 i recall the part number correctly
 

Offline microwhatTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: TI MSPM0: toolchain and programming
« Reply #28 on: September 12, 2026, 02:19:26 pm »
This is my sysTick test (that doesn't work). The LED at PA11 will flash, as expected, but the LED at PA4 does not, suggesting that the interrupt handler never gets called.
 

Online Renate

  • Super Contributor
  • ***
  • Posts: 1725
  • Country: de
    • Renate's Android Page
Re: TI MSPM0: toolchain and programming
« Reply #29 on: September 12, 2026, 02:40:47 pm »
This is my sysTick test...
I don't know an MSP from a hole in the ground, but AFAIK TI MSP come up from reset with interrupts disabled.
You need to enable them:
Code: [Select]
__enable_irq()
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4645
  • Country: us
Re: TI MSPM0: toolchain and programming
« Reply #30 on: September 13, 2026, 02:22:04 am »
So... is there some particular reason that you haven't spent $10 ($6 direct from TI; apparently more from distributers) or so on the LP-MSPM0C1104 launchpad for this series?
That would give you a known-good handware and upload/debug path. (and the debugger can be disconnected from the on-board MSP and used with off-board chips.)
 

Offline microwhatTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: TI MSPM0: toolchain and programming
« Reply #31 on: September 13, 2026, 03:31:58 am »
So... is there some particular reason that you haven't spent $10 ($6 direct from TI; apparently more from distributers) or so on the LP-MSPM0C1104 launchpad for this series?

Because I have made a board for a project with a MSPM0C1103 that works. It does everything I need for this application. (except sysTick, which I have worked around with TIMG8) Why would I buy an OEM development board when mine works? Further, TI obviously intends their dev board to be used with their dev toolchain, and the whole point of this exercise is to not do that.
 

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 3757
  • Country: gb
Re: TI MSPM0: toolchain and programming
« Reply #32 on: September 13, 2026, 08:35:30 am »

I guess you've setup a makefile project with gcc for the MSPM0?
Would you share a small complete buildable project for other folks that find this thread whilst looking for such?
 

Online cv007

  • Super Contributor
  • ***
  • Posts: 1061
Re: TI MSPM0: toolchain and programming
« Reply #33 on: September 13, 2026, 10:15:51 am »
Quote
BTW, you probably don't want "-nostartfile", since that will leave out the vectors that an ARM needs at 0x0.
You have avr on your mind, cortex-m is not getting a vector table populated from the standard library.
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4645
  • Country: us
Re: TI MSPM0: toolchain and programming
« Reply #34 on: September 13, 2026, 08:41:36 pm »
Quote from: cv007 on Today at 03:15:51 am
Quote
BTW, you probably don't want "-nostartfile", since that will leave out the vectors that an ARM needs at 0x0.
You have avr on your mind, cortex-m is not getting a vector table populated from the standard library.


Yeah, I guess explicitly including startup_mspm0c110x_gcc.c in the source files will take care of it.

Does that mean that "-nostartfile" doesn't do anything for cortex-m builds?  "-nostdlib" still prevents linking in the standard libraries, though?
 

Online cv007

  • Super Contributor
  • ***
  • Posts: 1061
Re: TI MSPM0: toolchain and programming
« Reply #35 on: September 13, 2026, 11:38:23 pm »
-nostartfiles eliminates linking in the crt*.o files, none of which are useful for our mcu's, and most likely not even executed.  If using -nostartfiles and  __libc_init_array, then an empty _init function will need to be provided as __libc_init_array will make a call _init, which is normally from crti.o (and also does nothing useful).

-nostdlib will still do what you think it will do.
 

Online Renate

  • Super Contributor
  • ***
  • Posts: 1725
  • Country: de
    • Renate's Android Page
Re: TI MSPM0: toolchain and programming
« Reply #36 on: September 14, 2026, 04:11:55 am »
So? Did you ever get your SysTick working?
SysTick is a system exception so it doesn't need enabling in the NVIC.
 

Offline microwhatTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: TI MSPM0: toolchain and programming
« Reply #37 on: September 14, 2026, 04:40:40 pm »
Post 28 contains my latest attempt at running systick. I've done what I thought the manual said I needed to do, and it won't run.

 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4645
  • Country: us
Re: TI MSPM0: toolchain and programming
« Reply #38 on: September 21, 2026, 07:19:22 am »
Quote
Post 28 contains my latest attempt at running systick.
Yeah, and post 29 contained a suggestion for making it work...

Quote
SysTick is a system exception so it doesn't need enabling in the NVIC.
True.  But you still need the global interrupt enable via __enable_irq() (should generate a "CPSIE I" instruction)
NVIC_SetPriority() actually has special code to set the sysTick priority off in the SCB->SHPR3 "System Handler Priority" register, instead of the NVIC.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf