File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed
builder/frameworks/arduino Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 1+ # ToDo: readout core and call correct builder script (e.g., mbed-core/arduino-core-mbed.py)
Original file line number Diff line number Diff line change 2222 "frameworks" : {
2323 "arduino" : {
2424 "package" : " framework-arduino-mbed" ,
25- "script" : " builder/frameworks/arduino/mbed-core/ arduino-core-mbed .py"
25+ "script" : " builder/frameworks/arduino/arduino.py"
2626 }
2727 },
2828 "packages" : {
3737 "owner" : " platformio" ,
3838 "version" : " ~2.1.0"
3939 },
40+ "framework-arduino-pico-earlephilhower" : {
41+ "type" : " framework" ,
42+ "optional" : true ,
43+ "owner" : " maxgerhardt" ,
44+ "version" : " ~1.10902.0"
45+ },
4046 "tool-rp2040tools" : {
4147 "type" : " uploader" ,
4248 "owner" : " platformio" ,
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ import sys
1516import copy
1617import platform
1718
@@ -24,6 +25,24 @@ def is_embedded(self):
2425 return True
2526
2627 def configure_default_packages (self , variables , targets ):
28+ # configure arduino core package.
29+ # select the right one based on the build.core, disable other one.
30+ board = variables .get ("board" )
31+ board_config = self .board_config (board )
32+ build_core = variables .get (
33+ "board_build.core" , board_config .get ("build.core" , "arduino" ))
34+
35+ frameworks = variables .get ("pioframework" , [])
36+ if "arduino" in frameworks :
37+ if build_core == "arduino" :
38+ self .frameworks ["arduino" ]["package" ] = "framework-arduino-mbed"
39+ self .packages ["framework-arduino-pico-earlephilhower" ]["optional" ] = True
40+ elif build_core == "earlephilhower" :
41+ self .frameworks ["arduino" ]["package" ] = "framework-arduino-pico-earlephilhower"
42+ self .packages ["framework-arduino-mbed" ]["optional" ] = True
43+ else :
44+ sys .stderr .write ("Error! Unknown build.core value '%s'. Don't know which Arduino core package to use." % build_core )
45+
2746 # configure J-LINK tool
2847 jlink_conds = [
2948 "jlink" in variables .get (option , "" )
You can’t perform that action at this time.
0 commit comments