I was trying out the new platform_packages
to point to a custom framework-arduinoteensy
(GitHub - aforren1/custom-teensy-pio), with the platformio.ini below:
[env:teensy_custom_device]
platform = teensy
; local works fine, and detects the correct version
;platform_packages = framework-arduinoteensy @ file://C://Users//adf//Documents//teensy//custom-teensy-pio
; remote reports the version as the hash, which then fails
platform_packages = framework-arduinoteensy @ https://github.com/aforren1/custom-teensy-pio.git
board = teensy31
framework = arduino
and ran into this error:
IndexError: list index out of range:
File "C:\Users\adf\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 156:
env.SConscript("$BUILD_SCRIPT")
File "C:\Users\adf\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\adf\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 250:
exec _file_ in call_stack[-1].globals
File "C:\Users\adf\.platformio\platforms\teensy\builder\main.py", line 144:
target_elf = env.BuildProgram()
File "C:\Users\adf\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "C:\Users\adf\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 61:
env.ProcessProgramDeps()
File "C:\Users\adf\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "C:\Users\adf\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 118:
env.BuildFrameworks(env.get("PIOFRAMEWORK"))
File "C:\Users\adf\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 224:
return self.method(*nargs, **kwargs)
File "C:\Users\adf\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 330:
SConscript(env.GetFrameworkScript(f), exports="env")
File "C:\Users\adf\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 604:
return method(*args, **kw)
File "C:\Users\adf\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 541:
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\adf\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 250:
exec _file_ in call_stack[-1].globals
File "C:\Users\adf\.platformio\platforms\teensy\builder\frameworks\arduino.py", line 75:
("TEENSYDUINO", int(FRAMEWORK_VERSION.split(".")[1])),
During debugging, I looked at the FRAMEWORK_VERSION
, which is reported as u'25d9701'
(the short hash from the most recent commit on the remote repository), rather than the expected 1.152.0
(bumped to differentiate the default package).
When I point to a local version of the repository (commented out in the platformio.ini above), all works well-- it reports the right version number, compiles, links, etc.
I’m not savvy enough on the internals of PlatformIO or the Teensy build process, but there might be an issue with how get_platform_version
detects the package version? Or any pointers on how to structure the framework-arduinoteensy
properly?