0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Platformio.ini を整理する

0
Posted at

platformio.iniに複数のボードの情報をまとめたいとき、

  • [env:] に各ボード固有の情報をまとめる
  • [env] に共通の情報をまとめる
  • [platformio] でターゲットを指定する

のようにするとすっきりします。

platformio.ini
; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
#default_envs = seeed-xiao-samd
default_envs = seeed-xiao-esp32-c3
#default_envs = seeed-xiao-esp32-c6

[env]
framework = arduino
lib_deps = sparkfun/SparkFun VL53L5CX Arduino Library@^1.0.3

[env:seeed-xiao-samd]
platform = Seeed Studio
board = seeed-xiao-samd
build_flags = -D INI_XIAO_SAMD

[env:seeed-xiao-esp32-c3]
platform = Seeed Studio
board = seeed-xiao-esp32-c3
build_flags = -D INI_XIAO_ESP32C3

[env:seeed-xiao-esp32-c6]
platform = Seeed Studio
board = seeed-xiao-esp32-c6
build_flags = -D INI_XIAO_ESP32C6

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?