Skip to content

Commit

Permalink
Merge branch 'release/v2.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Apr 19, 2018
2 parents fac7cc1 + 39161f3 commit 1807f04
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 40 deletions.
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,28 @@ MSP430 microcontrollers (MCUs) from Texas Instruments (TI) are 16-bit, RISC-base

# Usage

1. [Install PlatformIO Core](http://docs.platformio.org/page/core.html)
2. Install TI MSP430 development platform:
```bash
# install the latest stable version
> platformio platform install timsp430

# install development version
> platformio platform install https://github.com/platformio/platform-timsp430.git
1. [Install PlatformIO](http://platformio.org)
2. Create PlatformIO project and configure a platform option in [platformio.ini](http://docs.platformio.org/page/projectconf.html) file:

## Stable version

```ini
[env:stable]
platform = timsp430
board = ...
...
```

## Development version

```ini
[env:development]
platform = https://github.com/platformio/platform-timsp430.git
board = ...
...
```

# Configuration

Please navigate to [documentation](http://docs.platformio.org/page/platforms/timsp430.html).

2 changes: 1 addition & 1 deletion boards/lpmsp430f5529.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
},
"url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430f5529lp.html",
"vendor": "TI"
}
}
4 changes: 2 additions & 2 deletions boards/lpmsp430fr4133.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"core": "msp430",
"extra_flags": "-DENERGIA_ARCH_MSP430 -DENERGIA_MSP_EXP430FR4133LP",
"f_cpu": "8000000L",
"mcu": "msp430fr4133",
"hwids": [
[
"0x2341",
"0x0c9f"
]
],
"mcu": "msp430fr4133",
"variant": "MSP-EXP430FR4133LP"
},
"debug": {
Expand Down Expand Up @@ -38,4 +38,4 @@
},
"url": "http://www.ti.com/tool/msp-exp430fr4133",
"vendor": "TI"
}
}
4 changes: 2 additions & 2 deletions boards/lpmsp430fr5739.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"core": "msp430",
"extra_flags": "-DENERGIA_ARCH_MSP430 -DENERGIA_MSP_EXP430FR5739LP",
"f_cpu": "16000000L",
"mcu": "msp430fr5739",
"hwids": [
[
"0x2341",
"0x0c9f"
]
],
"mcu": "msp430fr5739",
"variant": "MSP-EXP430FR5739LP"
},
"debug": {
Expand Down Expand Up @@ -58,4 +58,4 @@
},
"url": "http://www.ti.com/tool/msp-exp430fr5739",
"vendor": "TI"
}
}
4 changes: 2 additions & 2 deletions boards/lpmsp430fr5969.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"core": "msp430",
"extra_flags": "-DENERGIA_ARCH_MSP430 -DENERGIA_MSP_EXP430FR5969LP",
"f_cpu": "8000000L",
"mcu": "msp430fr5969",
"hwids": [
[
"0x2341",
"0x0c9f"
]
],
"mcu": "msp430fr5969",
"variant": "MSP-EXP430FR5969LP"
},
"debug": {
Expand Down Expand Up @@ -38,4 +38,4 @@
},
"url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430fr5969.html",
"vendor": "TI"
}
}
4 changes: 2 additions & 2 deletions boards/lpmsp430fr6989.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"core": "msp430",
"extra_flags": "-DENERGIA_ARCH_MSP430 -DENERGIA_MSP_EXP430FR6989LP",
"f_cpu": "8000000L",
"mcu": "msp430fr6989",
"hwids": [
[
"0x2341",
"0x0c9f"
]
],
"mcu": "msp430fr6989",
"variant": "MSP-EXP430FR6989LP"
},
"debug": {
Expand Down Expand Up @@ -38,4 +38,4 @@
},
"url": "http://www.ti.com/tool/msp-exp430fr6989",
"vendor": "TI"
}
}
2 changes: 1 addition & 1 deletion boards/lpmsp430g2553.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
},
"url": "http://www.ti.com/ww/en/launchpad/launchpads-msp430-msp-exp430g2.html",
"vendor": "TI"
}
}
22 changes: 11 additions & 11 deletions boards/panStampNRG.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"build": {
"core": "panstamp",
"f_cpu": "12000000L",
"mcu": "cc430f5137",
"core": "panstamp",
"f_cpu": "12000000L",
"mcu": "cc430f5137",
"variant": "panstamp_nrg_1.1"
},
},
"frameworks": [
"arduino"
],
"name": "PanStamp NRG 1.1",
],
"name": "PanStamp NRG 1.1",
"upload": {
"maximum_ram_size": 4096,
"maximum_size": 32640,
"maximum_ram_size": 4096,
"maximum_size": 32640,
"protocol": "flash-bsl"
},
"url": "http://www.panstamp.com/product/197/",
},
"url": "http://www.panstamp.com/product/197/",
"vendor": "PanStamp"
}
}
7 changes: 2 additions & 5 deletions builder/frameworks/arduino.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
platform = env.PioPlatform()

FRAMEWORK_DIR = platform.get_package_dir("framework-arduinomsp430")
FRAMEWORK_VERSION = platform.get_package_version("framework-arduinomsp430")
assert isdir(FRAMEWORK_DIR)

env.Append(
CPPDEFINES=[("ARDUINO", int(FRAMEWORK_VERSION.split(".")[1]))],
CPPDEFINES=[("ARDUINO", 10805)],

CPPPATH=[
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core"))
Expand Down Expand Up @@ -63,9 +62,7 @@
join(FRAMEWORK_DIR, "variants", env.BoardConfig().get("build.variant"))
))

envsafe = env.Clone()

libs.append(envsafe.BuildLibrary(
libs.append(env.BuildLibrary(
join("$BUILD_DIR", "FrameworkArduino"),
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core"))
))
Expand Down
2 changes: 1 addition & 1 deletion builder/frameworks/energia.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

env.Append(
CPPDEFINES=[
("ARDUINO", 10610),
("ARDUINO", 10805),
("ENERGIA", int(FRAMEWORK_VERSION.split(".")[1]))
],

Expand Down
10 changes: 6 additions & 4 deletions builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
ASFLAGS=["-x", "assembler-with-cpp"],

CCFLAGS=[
"-g", # include debugging info (so errors include line numbers)
"-O2",
"-ffunction-sections", # place each function in its own section
"-fdata-sections",
Expand Down Expand Up @@ -71,7 +70,6 @@
],
UPLOADCMD='$UPLOADER $UPLOADERFLAGS "prog $SOURCES"',

PROGNAME="firmware",
PROGSUFFIX=".elf"
)

Expand All @@ -94,16 +92,20 @@
)
)

# Allow user to override via pre:script
if env.get("PROGNAME", "program") == "program":
env.Replace(PROGNAME="firmware")

#
# Target: Build executable and linkable firmware
#

target_elf = None
if "nobuild" in COMMAND_LINE_TARGETS:
target_firm = join("$BUILD_DIR", "firmware.hex")
target_firm = join("$BUILD_DIR", "${PROGNAME}.hex")
else:
target_elf = env.BuildProgram()
target_firm = env.ElfToHex(join("$BUILD_DIR", "firmware"), target_elf)
target_firm = env.ElfToHex(join("$BUILD_DIR", "${PROGNAME}"), target_elf)

AlwaysBuild(env.Alias("nobuild", target_firm))
target_buildprog = env.Alias("buildprog", target_firm, target_firm)
Expand Down
2 changes: 1 addition & 1 deletion platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "git",
"url": "https://github.com/platformio/platform-timsp430.git"
},
"version": "2.0.3",
"version": "2.0.4",
"packageRepositories": [
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
"http://dl.platformio.org/packages/manifest.json"
Expand Down

0 comments on commit 1807f04

Please sign in to comment.