diff --git a/.gitignore b/.gitignore index dfcb0c78..89257136 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ docs/_build dist build +.cache diff --git a/HISTORY.rst b/HISTORY.rst index 3771ce8a..7e1722e2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,11 +17,25 @@ PlatformIO 3.0 PlatformIO 2.0 -------------- -2.10.2 (2016-06-??) +2.10.4 (2016-06-??) +~~~~~~~~~~~~~~~~~~~ + +* Fixed issue with ``platformio init --ide`` command for Python 2.6 + +2.10.3 (2016-06-15) +~~~~~~~~~~~~~~~~~~~ + +* Fixed issue with ``platformio init --ide`` command + +2.10.2 (2016-06-15) ~~~~~~~~~~~~~~~~~~~ * Added support for ST Nucleo L031K6 board to ARM mbed framework -* Fixed issue with ARM mbed framework with ``-u _printf_float`` and +* Process ``build_unflags`` option for ARM mbed framework +* Updated Intel ARC32 Arduino framework to v1.0.6 + (`issue #695 `_) +* Improved a check of program size before uploading to the board +* Fixed issue with ARM mbed framework ``-u _printf_float`` and ``-u _scanf_float`` when parsing ``$LINKFLAGS`` * Fixed issue with ARM mbed framework and extra includes for the custom boards, such as Seeeduino Arch Pro diff --git a/docs/frameworks/mbed.rst b/docs/frameworks/mbed.rst index ca428b05..df5d4c00 100644 --- a/docs/frameworks/mbed.rst +++ b/docs/frameworks/mbed.rst @@ -629,6 +629,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_l031k6`` + - `ST Nucleo L031K6 `_ + - STM32L031K6T6 + - 32 MHz + - 32 Kb + - 8 Kb + * - ``nucleo_l053r8`` - `ST Nucleo L053R8 `_ - STM32L053R8T6 diff --git a/docs/platforms/embedded_boards.rst b/docs/platforms/embedded_boards.rst index 7095dd76..23721690 100644 --- a/docs/platforms/embedded_boards.rst +++ b/docs/platforms/embedded_boards.rst @@ -2013,6 +2013,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_l031k6`` + - `ST Nucleo L031K6 `_ + - STM32L031K6T6 + - 32 MHz + - 32 Kb + - 8 Kb + * - ``nucleo_l053r8`` - `ST Nucleo L053R8 `_ - STM32L053R8T6 diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst index 789d0b6f..fb1acfa4 100644 --- a/docs/platforms/ststm32.rst +++ b/docs/platforms/ststm32.rst @@ -357,6 +357,13 @@ ST - 512 Kb - 128 Kb + * - ``nucleo_l031k6`` + - `ST Nucleo L031K6 `_ + - STM32L031K6T6 + - 32 MHz + - 32 Kb + - 8 Kb + * - ``nucleo_l053r8`` - `ST Nucleo L053R8 `_ - STM32L053R8T6 diff --git a/platformio/builder/tools/pioupload.py b/platformio/builder/tools/pioupload.py index 5c7730ac..88b1d4ff 100644 --- a/platformio/builder/tools/pioupload.py +++ b/platformio/builder/tools/pioupload.py @@ -37,13 +37,15 @@ def FlushSerialBuffer(env, port): def TouchSerialPort(env, port, baudrate): + port = env.subst(port) + print "Forcing reset using %dbps open/close on port %s" % (baudrate, port) if system() != "Windows": try: - s = Serial(env.subst(port)) + s = Serial(port) s.close() except: # pylint: disable=W0702 pass - s = Serial(port=env.subst(port), baudrate=baudrate) + s = Serial(port=port, baudrate=baudrate) s.setDTR(False) s.close() sleep(0.4) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 5745a51f..17e3128f 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -36,9 +36,11 @@ SRC_DEFAULT_FILTER = " ".join([ def BuildProgram(env): def _append_pio_macros(): - env.AppendUnique( + if any(["PLATFORMIO=" in str(d) for d in env.get("CPPDEFINES", [])]): + return + env.Append( CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format( - *pioversion_to_intstr())], + *pioversion_to_intstr())] ) _append_pio_macros() diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index 894e8182..44e3b8ea 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -52,6 +52,8 @@ def cli(): r = None try: for cmd in cmds: + if sys.version_info < (2, 7, 0): + cmd[0] += ".__main__" cmd = [os.path.normpath(sys.executable), "-m"] + cmd r = None r = util.exec_command(cmd) diff --git a/platformio/ide/projectgenerator.py b/platformio/ide/projectgenerator.py index 2afd9d40..b4be53a3 100644 --- a/platformio/ide/projectgenerator.py +++ b/platformio/ide/projectgenerator.py @@ -66,7 +66,12 @@ class ProjectGenerator(object): envdata = self.get_project_env() if "env_name" not in envdata: return data - cmd = [normpath(sys.executable), "-m", "platformio", "-f"] + cmd = [ + normpath(sys.executable), "-m", + "platformio" + ( + ".__main__" if sys.version_info < (2, 7, 0) else ""), + "-f" + ] if app.get_session_var("caller_id"): cmd.extend(["-c", app.get_session_var("caller_id")]) cmd.extend(["run", "-t", "idedata", "-e", envdata['env_name']]) diff --git a/tests/commands/test_init.py b/tests/commands/test_init.py index 3cea718a..b702e323 100644 --- a/tests/commands/test_init.py +++ b/tests/commands/test_init.py @@ -44,6 +44,14 @@ def test_init_ext_folder(platformio_setup, clirunner, validate_cliresult): validate_pioproject(join(getcwd(), ext_folder_name)) +def test_init_ide_eclipse(platformio_setup, clirunner, validate_cliresult): + with clirunner.isolated_filesystem(): + result = clirunner.invoke(cli, ["-b", "uno", "--ide", "eclipse"]) + validate_cliresult(result) + validate_pioproject(getcwd()) + assert all([isfile(f) for f in (".cproject", ".project")]) + + def test_init_special_board(platformio_setup, clirunner, validate_cliresult): with clirunner.isolated_filesystem(): result = clirunner.invoke(cli, ["-b", "uno"])