Add initial support for briki core (#294)
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "mbcwb",
|
||||
"extra_flags": "-DBRIKI_MBC_WB_ESP -DBRIKI_ABC -w",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
"variant": "briki_mbcwb_esp32",
|
||||
"partitions": "8MB_ffat.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_board": "esp-wroom-32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
],
|
||||
"name": "Briki ABC (MBC-WB) - ESP32",
|
||||
"upload": {
|
||||
"protocol": "mbctool",
|
||||
"flash_size": "8MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 3407872,
|
||||
"require_upload_port": true,
|
||||
"speed": 1500000
|
||||
|
||||
},
|
||||
"url": "https://briki.org",
|
||||
"vendor": "meteca"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino":{
|
||||
"ldscript": "esp32_out.ld"
|
||||
},
|
||||
"core": "mbcwb",
|
||||
"extra_flags": "-DBRIKI_MBC_WB_ESP -DBRIKI_MBC_WB -w",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "dio",
|
||||
"mcu": "esp32",
|
||||
"variant": "briki_mbcwb_esp32",
|
||||
"partitions": "8MB_ffat.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi",
|
||||
"bluetooth",
|
||||
"ethernet",
|
||||
"can"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_board": "esp-wroom-32.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino"
|
||||
],
|
||||
"name": "Briki MBC-WB - ESP32",
|
||||
"upload": {
|
||||
"protocol": "mbctool",
|
||||
"flash_size": "8MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 3407872,
|
||||
"require_upload_port": true,
|
||||
"speed": 1500000
|
||||
|
||||
},
|
||||
"url": "https://briki.org",
|
||||
"vendor": "meteca"
|
||||
}
|
||||
@@ -27,10 +27,17 @@ from os.path import join
|
||||
from SCons.Script import DefaultEnvironment, SConscript
|
||||
|
||||
env = DefaultEnvironment()
|
||||
board = env.BoardConfig()
|
||||
build_core = board.get("build.core", "").lower()
|
||||
|
||||
SConscript("_embed_files.py", exports="env")
|
||||
|
||||
if "espidf" not in env.subst("$PIOFRAMEWORK"):
|
||||
if build_core == "mbcwb":
|
||||
SConscript(
|
||||
join(DefaultEnvironment().PioPlatform().get_package_dir(
|
||||
"framework-arduino-mbcwb"), "tools", "platformio-esp-build.py"))
|
||||
|
||||
elif "espidf" not in env.subst("$PIOFRAMEWORK"):
|
||||
SConscript(
|
||||
join(DefaultEnvironment().PioPlatform().get_package_dir(
|
||||
"framework-arduinoespressif32"), "tools", "platformio-build.py"))
|
||||
|
||||
@@ -341,6 +341,34 @@ elif upload_protocol == "esptool":
|
||||
env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")
|
||||
]
|
||||
|
||||
|
||||
elif upload_protocol == "mbctool":
|
||||
env.Replace(
|
||||
UPLOADER=join(
|
||||
platform.get_package_dir("tool-mbctool") or "", "bin", "mbctool"),
|
||||
UPLOADERFLAGS=[
|
||||
"--device", "esp",
|
||||
"--speed", "1500000",
|
||||
"--port", "$UPLOAD_PORT",
|
||||
"--upload",
|
||||
"0x1000", join(
|
||||
platform.get_package_dir("framework-arduino-mbcwb"),
|
||||
"tools", "sdk", "bin", "bootloader_qio_80m.bin"),
|
||||
"0x8000", join("$BUILD_DIR", "partitions.bin"),
|
||||
"0xe000", join(
|
||||
platform.get_package_dir("framework-arduino-mbcwb"),
|
||||
"tools", "partitions", "boot_app0.bin"),
|
||||
"0x10000", join("$BUILD_DIR", "${PROGNAME}.bin"),
|
||||
],
|
||||
UPLOADCMD='"$UPLOADER" $UPLOADERFLAGS'
|
||||
)
|
||||
upload_actions = [
|
||||
env.VerboseAction(env.AutodetectUploadPort,
|
||||
"Looking for upload port..."),
|
||||
env.VerboseAction("$UPLOADCMD", "Uploading $SOURCE")
|
||||
]
|
||||
|
||||
|
||||
elif upload_protocol in debug_tools:
|
||||
openocd_args = ["-d%d" % (2 if int(ARGUMENTS.get("PIOVERBOSE", 0)) else 1)]
|
||||
openocd_args.extend(
|
||||
|
||||
@@ -7,6 +7,16 @@
|
||||
; Please visit documentation for the other options and examples
|
||||
; http://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env:briki_abc_esp32]
|
||||
platform = espressif32
|
||||
board = briki_abc_esp32
|
||||
framework = arduino
|
||||
|
||||
[env:briki_mbc-wb_esp32]
|
||||
platform = espressif32
|
||||
board = briki_mbc-wb_esp32
|
||||
framework = arduino
|
||||
|
||||
[env:esp wrover kit]
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
|
||||
@@ -7,6 +7,16 @@
|
||||
; Please visit documentation for the other options and examples
|
||||
; http://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[env:briki_abc_esp32]
|
||||
platform = espressif32
|
||||
board = briki_abc_esp32
|
||||
framework = arduino
|
||||
|
||||
[env:briki_mbc-wb_esp32]
|
||||
platform = espressif32
|
||||
board = briki_mbc-wb_esp32
|
||||
framework = arduino
|
||||
|
||||
[env:esp32dev]
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
|
||||
+11
-1
@@ -17,7 +17,8 @@
|
||||
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
|
||||
"http://dl.platformio.org/packages/manifest.json",
|
||||
"https://raw.githubusercontent.com/eerimoq/simba/master/make/platformio/manifest.json",
|
||||
"https://raw.githubusercontent.com/eerimoq/pumbaa/master/make/platformio/manifest.json"
|
||||
"https://raw.githubusercontent.com/eerimoq/pumbaa/master/make/platformio/manifest.json",
|
||||
"https://briki.org/download/resources/manifest.json"
|
||||
],
|
||||
"frameworks": {
|
||||
"arduino": {
|
||||
@@ -52,6 +53,11 @@
|
||||
"optional": true,
|
||||
"version": "~3.10004.191002"
|
||||
},
|
||||
"framework-arduino-mbcwb": {
|
||||
"type": "framework",
|
||||
"optional": true,
|
||||
"version": ">=2.1.1"
|
||||
},
|
||||
"framework-espidf": {
|
||||
"type": "framework",
|
||||
"optional": true,
|
||||
@@ -71,6 +77,10 @@
|
||||
"type": "uploader",
|
||||
"version": "~1.20600.0"
|
||||
},
|
||||
"tool-mbctool": {
|
||||
"type": "uploader",
|
||||
"version": ">=2.0.0"
|
||||
},
|
||||
"tool-openocd-esp32": {
|
||||
"type": "debugger",
|
||||
"optional": true,
|
||||
|
||||
@@ -35,6 +35,13 @@ class Espressif32Platform(PlatformBase):
|
||||
self.packages[p]['optional'] = False
|
||||
self.packages['toolchain-xtensa32']['version'] = "~2.80200.0"
|
||||
|
||||
build_core = variables.get(
|
||||
"board_build.core", self.board_config(variables.get("board")).get(
|
||||
"build.core", "arduino")).lower()
|
||||
if build_core == 'mbcwb':
|
||||
self.packages["framework-arduinoespressif32"]["optional"] = True
|
||||
self.packages["framework-arduino-mbcwb"]["optional"] = False
|
||||
|
||||
return PlatformBase.configure_default_packages(self, variables,
|
||||
targets)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user