The Arduino Boards Manager makes it possible to load other processor families besides the original AVR-based Arduino boards. This repo contains instructions and relevant files for loading processor cores for Texas Instruments LaunchPad products in the MSP430, MSP432, and Tiva families. This allows development for TI LaunchPads using the Arduino IDE or CLI instead of the Energia IDE.
Energia was originally developed in 2012 as a fork from Arduino specifically to support Texas Instruments LaunchPads. Unfortunately, it is no longer under active development, with the last version released in 2019. The good news is that the processor cores used by Energia are compatible with Arduino. This means that Arduino can be used as a replacement for Energia, allowing for continued software development using TI’s LaunchPad products.
- Open the Arduino Preferences pane.
- Click on the box next to the text field labeled
Additional Boards Manager URLs
. - Add the following URL (on a line of its own) to the list:
https://raw.githubusercontent.com/Andy4495/TI_Platform_Cores_For_Arduino/main/json/package_energia_optimized_index.json
- Click OK to close the window and OK to close the Preferences pane
- Open
Tools->Board->Boards Manager...
menu item - Select the board platform you wish to install:
- Use the search box at the top to make it easier to find the board (e.g., "MSP430")
- Hover the mouse over the board platform you want, and click "Install"
- It can take several minutes to install a board package
- Once the board package is installed, you can select the board you want with the
Tools->Board
menu.
The Energia IDE includes several libraries and examples at the application level of the IDE instead of in the platform cores. This means that if you use the Arduino IDE/CLI and install an MSP or Tiva core, you don't end up getting every library and example sketch that you would when using the Energia IDE. Most of the libraries and examples included with the Energia application are either readily available with Arduino or are obsolete. However, some are particular to the platforms supported by Energia and are not directly available with Arduino, so I have published standalone libraries to allow them to be loaded into Arduino.
Stand-alone repositories for Energia libraries:
Energia example sketches packaged into libraries so that they can be loaded into the Arduino IDE:
Depending on your host machine and the specific board you are programming, you probably need to install drivers in order to communicate with the LaunchPad. If you see a message along the lines of "Error connecting to the target", then a missing driver is likely the cause.
There are two main ways to install the drivers:
-
Install Code Composer Studio IDE from Texas Instruments.
Code Compuser Studio is a free professional-level IDE for Texas Instruments processors. It is fully supported and regularly updated by Texas Instruments. However, it is a large download (> 1 GB), and installs many more packages than are needed if you are just using the Arduino IDE. You are essentially installing a full IDE that you won't be using, just to get the drivers.
Even with this in mind, I use this method to install the drivers, because this way I know they are up-to-date and supported.
Also note, per TI:
Code Composer Studio is going through a major update. As part of this major update Code Composer Studio is transitioning from the Eclipse application framework to the much more modern Theia framework. Code Composer Studio Theia is now available for most devices and additional features are being added with each release. The final planned Eclipse-based release is expected to be CCS 12.8.
I currently have installed the Eclipse-based version of CCS and have not tested the Theia-based version. However, I expect that the drivers installed by either version are the same.
-
Follow the host platform and board-specific instructions from the Energia website - Windows, MacOS, Linux - to install just the drivers (without the full CCS IDE).
These driver packages are no longer supported and will not be updated. They probably still work, but do not expect any support if you run into issues with them.
Per GitHub user chemmex, it is possible to use these processor cores with PlatformIO. Some manual setup and configuration is required, which includes editing the platformio.ini
file. For more details, refer to this issue comment and this PlatformIO discussion.
The following sections contain more details on the board packages, sample GitHub action files, and the descriptions of the various files included in this repo.
With the end of development of the Energia IDE, I created this repository as an archive of the key files and packages needed to develop for various Texas Instruments LaunchPads.
This repository contains tested JSON index files and hadware platform cores for the Texas Instruments MSP430, MSP432, and Tiva C microcontrollers for use with the Arduino IDE or CLI. In addition, platform cores for msp432e (ethernet), cc13xx, cc3220emt, and cc3200 are also included but have not been tested.
Platform cores are used to add support for boards to the Arduino development software. The cores in this repo were originally developed for the Energia IDE, which is a fork of the Arduino IDE specifically for Texas Instruments processors. Software for many TI processors can now be developed directly using the Arduino IDE once the appropriate platform core is installed.
In addition to being able to use the Arduino IDE/CLI to develop for TI processors, it is also possible to use the compile-arduino-sketches
GitHub action to automatically verify that sketches compile whenever they are checked into GitHub. Since the action uses the Arduino CLI, all you need to do is configure the workflow to install the appropriate platform core to have the action compile for TI processors.
Because compiling a sketch does not need all the data and tools required for a full development environment, I created some slimmed-down platform index files used by Arduino to load the cores. Only boards from a related family are defined, and only the compiler for that family of boards is downloaded (no debugger or other tools are configured).
If your GitHub action exits with a timeout error similar to this:
ERRO[0130] Error updating indexes: Error downloading index 'http://energia.nu/packages/package_energia_index.json':
Get "http://energia.nu/packages/package_energia_index.json":
dial tcp 107.180.20.87:80: connect: connection timed out
Then try replacing the index file with the corresponding "minimal" file from this repo. The "minimal" platform configurations should slightly speed up the run times and reduce timeout errors when running the compile-arduino-sketches action.
GitHub user ndroid has created updated MSP432 board packages based on the Energia version 5.29.1 board package. These updated packages add support for the MSP432P4111 LaunchPad and fix several issues with the board package as described in the change log.
Later versions of Energia include support for multi-tasking for MSP432 boards based on TI-RTOS. The MSP432 board package for Arduino continues to support multi-tasking, which can be accessed by using the methods demonstrated in the Energia-MultiTasking examples or through the Galaxia library created by Rei Vilo.
This section is provided to document the creation of updated MSP432 board packages that turned out to be unnecessary.
At the time I created this repo, the latest Energia-supplied board package for MSP432 that I could find was version 5.29.0. That version (and all earlier versions) has an issue that made it incompatible with the Arduino build tools, as documented in this thread (archived version) and this unmerged pull request. The issue has to do with accessing a temporary path from within the build scripts. The Energia builder makes use of a variable called "build.project_path" which is not available with the arduino-builder. However, a global predefined property named "build.source.path" is available for use in platform.txt
and defines the path needed for building MSP432 with Arduino.
In addition, the ino2cpp
tool version 1.0.6 used during the MSP432 build process makes some assumptions on the availability and location of Java during the build process. This can cause issues when building locally with Arduino and when running the compile-arduino-sketches GitHub action both locally using nektos/act and on GitHub's servers.
So I created new MSP432 board package versions 5.29.1 and 5.29.2 based off of version 5.29.0. The only differences are changes to the platform.txt
file as listed below. Version 5.29.1 fixes the Java issue for MacOS and Linux, and version 5.29.2 also adds a fix for Windows.
- Update
recipe.hooks.sketch.prebuild.1.pattern
definition to change{build.project_path}
to{build.source.path}
- Change
java.path.macosx
value to/usr/bin/java
- Change
build.ino2cpp.cmd.linux
value to"/usr/bin/java"
- Change
build.ino2cpp.cmd.windows
value to"java"
(5.29.2 only) - Update
version
to5.29.2
- Update
version.string
to5292
As it turns out, an Energia-supplied board package version 5.29.1 is available that fixes the Arduino build issue and removes the Java dependency (by using ino2cpp
version 1.0.7).
Because I was unaware of the Energia MSP432 version 5.29.1, there are two MSP432 board packages archived in this repo with a version 5.29.1: I added suffixes to the filenames to differentiate them.
If using the latest board package for MPS432 (version 5.29.4 or later), it is not necessary to install Java.
When using an older MSP432 board package, then Java needs to be installed on the build machine. I have successfully tested the 5.29.2 board package with both the Microsoft and Temurin Java distributions.
I ran the following steps to create the new board package using MacOS:
- Download version 5.29.0 (https://github.com/Andy4495/TI_Platform_Cores_For_Arduino/raw/main/boards/msp432r-5.29.0.tar.bz2)
- Decompress and extract files (in MacOS, this can be done by double-clicking the downloaded file)
- Change directory into the extracted folder
- Duplicate
platform.txt
and rename the copy toplatform_orig.txt
- Update
platform.txt
as noted above - Rename the parent folder to
msp432r-core-5.29.2
- Recompress the updated folder:
tar cvyf msp432r-5.29.2.tar.bz2 msp432r-core-5.29.2
- Calculate SHA-256 checksum:
shasum -a 256 msp432r-5.29.2.tar.bz2
- Note the new file's size:
ls -l msp432r-5.29.2.tar.bz2
- Udpate appropriate key values
url
,archiveFileName
,checksum
, andsize
in the package index file
Located in the json
folder.
The Package Index file names need to follow the convention specified in the Arduino Package Index Specification. Specifically, the file name needs be of the form package_YOURNAME_PACKAGENAME_index.json
. The prefix package_
and suffix _index.json
are mandatory, while the choice of YOURNAME_PACKAGENAME
is left to the packager.
Package Index File | MSP Board Version | Tiva Board Version | Notes |
---|---|---|---|
package_energia_index.json |
1.0.5 | 1.0.3 | Official board manager URL version from Energia. |
package_Energia23_index.json |
1.0.6 | 1.0.3 | Version installed by Energia23. |
package_energia_latest_index.json |
1.0.7 | 1.0.4 | See Note 1 below. |
package_energia_optimized_index.json |
1.0.7 | 1.0.4 | Latest version of each board only. Use as Board Manger URL. |
package_msp430_elf_GCC_index.json |
See Note 2 below. | ||
package_energia_minimal_MSP_105_index.json |
1.0.5 | N/A | MSP430 boards only and installs from this repo. |
package_energia_minimal_MSP_107_index.json |
1.0.7 | N/A | MSP430 boards only and installs from this repo. |
package_energia_minimal_MSP_107_alternate_index.json |
1.0.7 | N/A | MSP430 boards only, installs from this repo, compiler from Release. |
package_energia_minimal_TM4C_103_index.json |
N/A | 1.0.3 | TM4C boards only and installs from this repo. |
package_energia_minimal_TM4C_104_index.json |
N/A | 1.0.4 | TM4C boards only and installs from this repo. |
package_energia_minimal_TM4C_104_alternate_index.json |
N/A | 1.0.4 | TM4C boards only, installs from this repo, compiler from Release. |
package_energia_development_MSP432r_index.json |
5.29.5 | N/A | MSP432P401R board only, use with local Arduino IDE/CLI. |
package_energia_minimal_MSP432r_index.json |
5.29.5 | N/A | MSP432P401R board only, installs minimal tools. |
package_msp432_index.json |
5.29.5 | N/A | MPS432 package index created by ndroid |
- This version of the package index is loaded by Energia23 when using the Board Manager menu item in Energia. Note that the filename loaded as-is (
platform_index.json
) does not conform to the Package Index Specification naming convention. It is renamed in this repo with a valid name. package_msp430_elf_GCC_index.json
is an alternate package index file which defines 2.0.x versions of the msp430 platform. The 2.0.x vesions are not part of the official Energia application and use a much newer GCC compiler (V2.x) which supports C99. This package index file only includes definitions for msp430 and not any other platforms. This thread (archived version) explains the differences and the file can be downloaded from the Energia.
Located in the boards
directory. These files are referenced by the package index json files.
These are copies of the board package files avaialble from Energia (with the exception of the mps432 packages as explained above).
msp430-1.0.5.tar.bz2
msp430-1.0.6.tar.bz2
msp430-1.0.7.tar.bz2
msp430elf-2.0.7.tar.bz2
msp430elf-2.0.10.tar.bz2
msp432r-5.29.2.tar.bz2
msp432-5.29.5.tar.bz2
tivac-1.0.3.tar.bz2
tivac-1.0.4.tar.bz2
The tools are specific to the board package platform and version.
Board Version | Compiler | dslite | mspdebug | ino2cpp |
---|---|---|---|---|
MSP430 1.0.7 | msp430-gcc 4.6.6 | 9.3.0.1863 | 0.24 | N/A |
MSP430 1.0.6 | msp430-gcc 4.6.6 | 9.2.0.1793 | 0.24 | N/A |
MSP430 1.0.5 | msp430-gcc 4.6.6 | 8.2.0.1400 | 0.24 | N/A |
MSP430 2.0.10 | msp430-elf-gcc 9.2.0.50 | 9.3.0.1863 | 0.24 | 1.0.4 |
MSP430 2.0.7 | msp430-elf-gcc 8.3.0.16 | 9.3.0.1863 | 0.24 | 1.0.4 |
MSP432 5.29.5 | arm-none-eabi-gcc 8.3.1-20190703 | 9.3.0.1863 | N/A | 1.0.7 |
MSP432 5.29.2 | arm-none-eabi-gcc 6.3.1-20170620 | 9.2.0.1793 | N/A | 1.0.6 |
Tiva 1.0.4 | arm-none-eabi-gcc 8.3.1-20190703 | 9.3.0.1863 | N/A | N/A |
Tiva 1.0.3 | arm-none-eabi-gcc 6.3.1-20170620 | 7.2.0.2096 | N/A | N/A |
Tool Download Links | |||
---|---|---|---|
msp430-gcc 4.6.6 | Wndows | MacOS | Linux |
msp430-elf-gcc 9.2.0.50 | Wndows | MacOS | Linux |
msp430-elf-gcc 8.3.0.16 | Wndows | MacOS | Linux |
arm-none-eabi-gcc 8.3.1-20190703 | Wndows | MacOS | Linux |
arm-none-eabi-gcc 6.3.1-20170620 | Wndows | MacOS | Linux |
dslite 9.3.0.1863 | Wndows | MacOS | Linux |
dslite 9.2.0.1793 | Wndows | MacOS | Linux |
dslite 8.2.0.1400 | Wndows | MacOS | Linux |
dslite 7.2.0.2096 | Wndows | MacOS | Linux |
mspdebug 0.24 | Wndows | MacOS | Linux |
ino2cpp 1.0.4 | Wndows | MacOS | Linux |
ino2cpp 1.0.6 | Wndows | MacOS | Linux |
ino2cpp 1.0.7 | Wndows | MacOS | Linux |
In addition to the board package files listed above, the following untested board packages are included in this repo:
cc13xx-4.9.1.tar.bz2
cc3200-1.0.3.tar.bz2
cc3220emt-5.6.2.tar.bz2
msp432e-5.19.0.tar.bz2
These are included for historical purposes:
msp432r-5.29.0.tar.bz2
- Used as a baseline to create verstions 5.29.1 and 5.29.2. It will not work correctly with Arduino as mentioned above.
msp432r-5.29.1-Andy4495_version.tar.bz2
- Package inadvertently created to fix a build issue - see MSP432 Support above. Note that this has the same version number as a board package provided by Energia, and has "
Andy4495_version
" added to the file name.
- Package inadvertently created to fix a build issue - see MSP432 Support above. Note that this has the same version number as a board package provided by Energia, and has "
msp432r-5.29.1-Energia_version.tar.bz2
- Version provided by Energia, and is differentiated from the other 5.29.1 package with
Energia_version
added to the file name.
- Version provided by Energia, and is differentiated from the other 5.29.1 package with
Located in the actions
directory.
These files contain example yaml configuration files for arduino-compile-sketches actions for MSP and Tiva platforms.
You can generally use the latest version of the board package for the platform you are compiling. Configuration files for older platform versions are included in case there is a specific compatibility issue with a particular sketch or library.
Workflow action files should be placed in the .github/workflows
directory in your repo.
compile_arduino_sketch_standard-MSP430-105.yml
- Compile for MSP430G2 using the standard Energia platform index and board packages version 1.0.5 downloaded from energia.nu
compile_arduino_sketch_standard-MSP430-107.yml
- Compile for MSP430G2 using the standard Energia platform index and board packages version 1.0.7 downloaded from energia.nu
compile_arduino_sketch_standard-TivaC-103.yml
- Compile for Tiva TM4C123 using the standard Energia platform index and board packages version 1.0.3 downloaded from energia.nu
compile_arduino_sketch_standard-TivaC-104.yml
- Compile for Tiva TM4C123 using the standard Energia platform index and board packages version 1.0.4 downloaded from energia.nu
compile_arduino_sketch_minimal-MSP430G2-105.yml
- Compile for MSP430G2 with minimal package index file and board package 1.0.5 downloaded from this repo.
compile_arduino_sketch_minimal-MSP430G2-107.yml
- Compile for MSP430G2 with minimal package index file and board package 1.0.7 downloaded from this repo.
compile_arduino_sketch_minimal-MSP430F5529-105.yml
- Compile for MSP430F5529 with minimal package index file and board package 1.0.5 downloaded from this repo.
compile_arduino_sketch_minimal-MSP430F5529-107.yml
- Compile for MSP430F5529 with minimal package index file and board package 1.0.7 downloaded from this repo.
compile_arduino_sketch_minimal-MSP432R.yml
- Compile for MSP432P401 with minimal package index file and board package 5.29.5 downloaded from this repo.
compile_arduino_sketch_minimal-TM4C123-103.yml
- Compile for TM4C123 with minimal package index file and tivac board package 1.0.3 downloaded from this repo.
compile_arduino_sketch_minimal-TM4C123-104.yml
- Compile for TM4C123 with minimal package index file and tivac board package 1.0.4 downloaded from this repo.
- Energia IDE application and source code repo
- Website source pages repo for energia.nu
- Energia MSP430 core repo
- Energia MSP432 core repo
- Energia Tiva C core repo
- Arduino Platform Specification
- Arduino instructions for installing cores
- Arduino Package Index JSON Specification
- GitHub documentation for managing GitHub Actions workflows
- Compile Arduino Sketches GitHub action
- Arduino JSON package index file
- Unofficial list of Arduino 3rd Party Board Manager URLs
- Updated MSP432 board package repo created by ndroid
- Galaxia multi-tasking library created by Rei Vilo
- Info on using Arduino cores with PlatformIO: here and here
- Board Manager URLs:
- Optimized LaunchPad URL:
- https://raw.githubusercontent.com/Andy4495/TI_Platform_Cores_For_Arduino/main/json/package_energia_optimized_index.json
- Streamlined version which defines only the latest version of each platform.
- This the URL you would most likely use with the Arduino IDE.
- Standard Energia URL:
- https://energia.nu/packages/package_energia_index.json
- This is the official URL published by Energia, but specifies older board package versions.
- This would only be used in specialized cases, and is mainly here for archival purposes.
- Standard Energia URL with latest board versions:
- https://raw.githubusercontent.com/Andy4495/TI_Platform_Cores_For_Arduino/main/json/package_energia_latest_index.json
- This specifies the latest official board versions (along with all the older board version). The original file is available here. The above URL has the same file contents, but the name is changed to conform to the spec.
- MSP430 boards using later compiler version:
- http://s3.amazonaws.com/energiaUS/packages/package_msp430_elf_GCC_index.json
- Thread (archived version) explaining why MSP430 elf compiler option is availble.
- MSP432 board manager URL when using local Arduino IDE/CLI:
- https://raw.githubusercontent.com/Andy4495/TI_Platform_Cores_For_Arduino/main/json/package_energia_development_MSP432r_index.json
- Includes the MSP432432P401R (red) and MSPP4111 platform definitions.
- MSP432 board manager URL when using with
compile-arduino-sketches
GitHub action: - ESP8266 board manager URL:
- Arduino board manager URL (can be useful when configuring build matrix):
- STM32 board manager URL:
- https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
- Note that many of the devices in this package require additional options as part of the FQBN, for example:
STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8
- Optimized LaunchPad URL:
The majority of the files in this repo are either a copy or a derivation of Energia platform cores, which are licensed under the GNU Lesser General Public License v2.1 per Energia. For consistency, the non-Energia derived software and files in this repository are also released released under LGPL v2.1. See the file LICENSE.txt
in this repository.