Texas Instruments - MSP-430G2

It has an MSP430 G2 microcontroller

mcu: MSP430G2231 (a MSP430G2211 is also included)

pcb revision: 1.4

emulation section consists of

  • TUSB3410
  • M430F1612

both mcu's have Spy-Bi-Wire, but not BSL.

back to microcontrollers page.

Links

BSP430, Wikipedia: MSP430, MSP-EXP430G2 LaunchPad User's Guide, datasheets MSP430G2211, MSP430G2231,

Mark3 RTOS, AT2XT - AT-to-XT Keyboard Protocol Converter,

local links

c1,

History / work log

2023-05-18: c1 - rust - it doesn't look like openocd has msp430 support

tingo@kg-core1:~/work/rust/esp $ pkg info -l openocd | grep msp430

oh well.

2023-05-18: c1 - rust - try to build

tingo@kg-core1:~/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231 $ cargo build
    Updating git repository `https://github.com/kvinwang/fixed-macro`
    Updating crates.io index
    Updating git repository `https://github.com/tingox/msp430g2231`
    Updating git repository `https://github.com/cr1901/i2c-server`
  Downloaded unicode-ident v1.0.8
  Downloaded quote v1.0.27
  Downloaded rand_xoshiro v0.6.0
  Downloaded rand_core v0.6.4
  Downloaded rand v0.8.5
  Downloaded critical-section v1.1.1
  Downloaded proc-macro2 v1.0.58
  Downloaded syn v1.0.109
  Downloaded vcell v0.1.3
  Downloaded msp430 v0.4.1
  Downloaded msp430-rt v0.4.0
  Downloaded msp430-rt-macros v0.4.0
  Downloaded panic-msp430 v0.4.0
  Downloaded 13 crates (543.5 KB) in 1.36s
    Updating crates.io index
  Downloaded memchr v2.5.0
  Downloaded getopts v0.2.21
  Downloaded unicode-width v0.1.10
  Downloaded rustc-demangle v0.1.21
  Downloaded miniz_oxide v0.6.2
  Downloaded cfg-if v1.0.0
  Downloaded addr2line v0.19.0
  Downloaded cc v1.0.77
  Downloaded object v0.30.1
  Downloaded libc v0.2.143
  Downloaded hashbrown v0.13.1
  Downloaded adler v1.0.2
  Downloaded compiler_builtins v0.1.91
  Downloaded gimli v0.27.2
  Downloaded 14 crates (2.2 MB) in 0.30s
   Compiling compiler_builtins v0.1.91
   Compiling core v0.0.0 (/usr/home/tingo/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/core)
   Compiling proc-macro2 v1.0.58
   Compiling unicode-ident v1.0.8
   Compiling quote v1.0.27
   Compiling rand_core v0.6.4
   Compiling syn v1.0.109
   Compiling rand v0.8.5
   Compiling rand_xoshiro v0.6.0
   Compiling msp430-rt v0.4.0
   Compiling msp430g2231 v0.2.0 (https://github.com/tingox/msp430g2231#568c39bc)
   Compiling msp430-rt-macros v0.4.0
   Compiling rustc-std-workspace-core v1.99.0 (/usr/home/tingo/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling critical-section v1.1.1
   Compiling vcell v0.1.3
   Compiling msp430 v0.4.1
   Compiling panic-msp430 v0.4.0
   Compiling msp430-test-g2231 v0.1.0 (/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231)
error: linking with `msp430-elf-gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/usr/home/tingo/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/x86_64-unknown-freebsd/bin:/usr/local/gcc-msp430-ti-toolchain-9.3.1.2/bin:/home/tingo/.cargo/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/tingo/bin:/home/tingo/.local/bin" VSLANG="1033" "msp430-elf-gcc" "/tmp/rustckKMV5S/symbols.o" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/msp430_test_g2231-175cb2a6d1ca2b29.4wj2lzbt130sitgd.rcgu.o" "-L" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps" "-L" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/debug/deps" "-L" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/build/msp430-rt-1d3f454c1ec57721/out" "-L" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/build/msp430g2231-b92660ef74d592a7/out" "-L" "/usr/home/tingo/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/msp430-none-elf/lib" "-Wl,-Bstatic" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/libmsp430g2231-6c43d786f3ef16c6.rlib" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/libvcell-a45631ec15afa2b5.rlib" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/libmsp430_rt-1b35d3f7571216da.rlib" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/libpanic_msp430-da67dfc918513b7a.rlib" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/libmsp430-446a3e45e60368d9.rlib" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/libcritical_section-b7c184ec8d6cfc50.rlib" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/librustc_std_workspace_core-dfd615212b40fa87.rlib" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/libcore-1eaa749c7bec7ac8.rlib" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/libcompiler_builtins-d8607f6666c2f4ae.rlib" "-Wl,-Bdynamic" "-L" "/usr/home/tingo/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/msp430-none-elf/lib" "-o" "/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/msp430_test_g2231-175cb2a6d1ca2b29" "-nodefaultlibs" "-Tlink.x" "-nostartfiles" "-mcpu=msp430" "-lmul_none" "-lgcc"
  = note: /usr/local/gcc-msp430-ti-toolchain-9.3.1.2/bin/../lib/gcc/msp430-elf/9.3.1/../../../../msp430-elf/bin/ld: address 0x10000 of /zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/msp430_test_g2231-175cb2a6d1ca2b29 section `.vector_table' is not within region `VECTORS'
          /usr/local/gcc-msp430-ti-toolchain-9.3.1.2/bin/../lib/gcc/msp430-elf/9.3.1/../../../../msp430-elf/bin/ld: address 0x10000 of /zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231/target/msp430-none-elf/debug/deps/msp430_test_g2231-175cb2a6d1ca2b29 section `.vector_table' is not within region `VECTORS'
          /usr/local/gcc-msp430-ti-toolchain-9.3.1.2/bin/../lib/gcc/msp430-elf/9.3.1/../../../../msp430-elf/bin/ld: 
          ERROR(msp430-rt): The VECTORS memory region must end at address 0x10000. Check memory.x
          collect2: error: ld returned 1 exit status


error: could not compile `msp430-test-g2231` (bin "msp430-test-g2231") due to previous error

I corrected the memory.x file, then rebuilt

tingo@kg-core1:~/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231 $ cargo build
   Compiling compiler_builtins v0.1.91
   Compiling core v0.0.0 (/usr/home/tingo/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/core)
   Compiling proc-macro2 v1.0.58
   Compiling quote v1.0.27
   Compiling unicode-ident v1.0.8
   Compiling syn v1.0.109
   Compiling rand_core v0.6.4
   Compiling rand v0.8.5
   Compiling rand_xoshiro v0.6.0
   Compiling msp430-rt v0.4.0
   Compiling msp430g2231 v0.2.0 (https://github.com/tingox/msp430g2231#568c39bc)
   Compiling msp430-rt-macros v0.4.0
   Compiling rustc-std-workspace-core v1.99.0 (/usr/home/tingo/.rustup/toolchains/nightly-x86_64-unknown-freebsd/lib/rustlib/src/rust/library/rustc-std-workspace-core)
   Compiling critical-section v1.1.1
   Compiling vcell v0.1.3
   Compiling msp430 v0.4.1
   Compiling panic-msp430 v0.4.0
   Compiling msp430-test-g2231 v0.1.0 (/zs/tingo/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231)
    Finished dev [unoptimized + debuginfo] target(s) in 19.56s

2023-05-18: c1 - rust prepare - I've installed the msp430-gcc toolchain and make a script to add it to PATH

tingo@kg-core1:~/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231 $ cat ~/export-msp430.sh
#!/bin/sh
# add msp430-gcc to PATH
export PATH="/usr/local/gcc-msp430-ti-toolchain-9.3.1.2/bin:$PATH"

source it

tingo@kg-core1:~/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231 $ . ~/export-msp430.sh 

verify

tingo@kg-core1:~/personal/projects/2023/rust/embedded/msp430/msp430-test-g2231 $ which msp430-elf-gcc
/usr/local/gcc-msp430-ti-toolchain-9.3.1.2/bin/msp430-elf-gcc

2022-07-13: If I change target to MSP430G2231, I get a failure when trying to build

 undefined first referenced
  symbol       in file     
 --------- ----------------
 TA0CCR0   ./main.obj      
 TA0CCR1   ./main.obj      
 TA0CCTL0  ./main.obj      
 TA0CCTL1  ./main.obj      
 TA0CTL    ./main.obj      

error: unresolved symbols remain
error: errors encountered during linking; "MSP-EXP430G2-Launchpad.out" not built

not sure why. Well, ok, changing the line #include msp430g2553.h" in main.c to #include "msp430g2231.h" fixed it. duh. Now I can load the project after it is built, and it works too.

2022-07-13: default setting for the MSP-EXP430G2 OutOfBox example is for a MSP430G2553 device (why?). when I compile with G2553 target (and output format eabi (ELF) it compiles without problems, but when I try to Load it, I get an error message "MSP430: Error connecting to the target: The target setup (MSP430G2xx3) does not match the actual target type (F20x2_G2x2x_G2x3x)". Well, yes obviously, since it is a G2231 in the LaunchPad.

2022-07-13: the device on the LaunchPad is a MSP430G2231 as described in the Quick Start Guide. The other device in the kit is a G2211.

2022-07-13: I connected the MSP-EXP430G2 LaunchPad to my work laptop (running win10). The launchpad shows up as a COM port, "MSP430 Application UART (COM10)". The LaunchPadWiki at ti.com/launchpadwiki is gone.

2021-11-07: I re-created this page on my self-hosted web server.

2010-10-12: I got the MSP-430G2 kit.

2010-10-11: DHL attempted delivery of the MSP-430G2, but I wasn't home.

2010-10-06: I got a shipment notification for the MSP-430G2 from TI.

2010-09-07: I ordered a MSP-EXP430G2 MSP430 LaunchPad Value Line Development kit from TI. Total cost (including shipping) was USD 4.30.