๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Arduino | ESP32

VSC Platform.io ์ปค์Šคํ…€๋ณด๋“œ ์ถ”๊ฐ€ํ•˜๊ธฐ

๋ชฉํ‘œ: ์ œ๋ชฉ ๊ทธ๋Œ€๋กœ Visual Studio Code ํ™•์žฅ ํ”„๋กœ๊ทธ๋žจ Platform.io์— ๋ณด๋“œ ๋ชฉ๋ก์— ์—†๋Š” ์ปค์Šคํ…€ ๋ณด๋“œ๋ฅผ ์ถ”๊ฐ€ํ•ด๋ณด์ž. 

ํ™˜๊ฒฝ: ๋งฅ M1 Ventura 13.2.1 / VSC 1.81.1 / PlatformIO IDE 3.3.1

์ถ”๊ฐ€ํ•˜๊ณ ์ž ํ•˜๋Š” ๋ณด๋“œ: esp32-s3-devkitc-1-n16r8v (๋‹ค๋ฅธ ๋ณด๋“œ ์ฐพ๊ธฐ)

ํ˜„์ƒ: ESP32 ์›น์„œ๋ฒ„ ํŠœํ† ๋ฆฌ์–ผ์„ ๋”ฐ๋ผํ•˜๊ณ  ์žˆ์—ˆ๋Š”๋ฐ ๋‹จ์ˆœํžˆ ์™€์ดํŒŒ์ด ์—ฐ๊ฒฐํ•ด์„œ html ํŒŒ์ผ ์š”์ฒญํ•˜๋ฉด ์ „์†กํ•˜๋Š” ์•„์ฃผ ๊ฐ„๋‹จํ•œ ์˜ˆ์ œ๋„ ์‹คํ–‰์ด ๋˜์ง€ ์•Š๋Š” ๊ฒƒ์ด์—ˆ๋‹ค. ๋ณด๋“œ ์ด๋ฆ„์ด ๋ญ”๊ฐ€ ์ •ํ™•ํ•˜์ง€ ์•Š์•„๋ณด์—ฌ์„œ ๋‹ค์‹œ ๋ชฉ๋ก์—์„œ ๋‚ด๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋ณด๋“œ๋ฅผ ์ฐพ์•„๋ณด์•˜์ง€๋งŒ ๋ณด์ด์ง€ ์•Š์•˜๋‹ค. ๊ตฌ๊ธ€๋ง์„ ํ•ด๋ณด๋‹ˆ ์ปค์Šคํ…€ ๋ณด๋“œ๋ฅผ ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ๊ธ€๋“ค์ด ๋ณด์˜€๋‹ค. 

์ฐธ๊ณ ํ•œ ๊ธ€:

https://community.platformio.org/t/how-do-you-set-up-a-new-board-esp32-s3-n16r8/32306

 

How do you set up a new board ESP32-S3 N16R8

Hi, I’m new to this, I have just read a topic about the new esp32-s3 n16r8 board and it is not clear to me how this is done. ie add the board to PlatformIO what to put in the platformio.ini file. Also what is ‘xtensa-esp32s3-elf-g++’ is not recognize

community.platformio.org

https://docs.platformio.org/en/stable/platforms/creating_board.html

 

Custom Embedded Boards — PlatformIO v6.1 documentation

© Copyright 2014-present, PlatformIO.

docs.platformio.org

์ถ”๊ฐ€ํ•˜๊ธฐ: 

๋จผ์ € Platform.io๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ๋Š” ๊ฒฝ๋กœ๋ฅผ ์•Œ์•„์•ผํ•˜๋Š”๋ฐ ๋‚˜์˜ ๊ธฐ์ค€์œผ๋กœ root ๋””๋ ‰ํ„ฐ๋ฆฌ์— .platformio์— ์„ค์น˜๋˜์–ด ์žˆ์—ˆ๋‹ค. ๊ทผ๋ฐ ๋‹ท ํŒŒ์ผ์ด๋ผ์„œ ์ˆจ๊ฒจ์ ธ์„œ ์•ˆ๋ณด์ด๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์„ํ…๋ฐ ๋ช…๋ น์–ด๋กœ๋Š” ls -a, Finder์—์„œ๋Š” cmd +  shift + . (dot)์„ ๋ˆ„๋ฅด๋ฉด ์ˆจ๊ฒจ์ ธ ์žˆ๋˜ ํŒŒ์ผ๋“ค์ด ๋ณด์ด๊ฒŒ ๋œ๋‹ค. 

๊ทธ ๋‹ค์Œ์€ .platformio/platforms/*/boards/ ์ด ๊ฒฝ๋กœ๋ฅผ ์ฐพ์•„๋“ค์–ด๊ฐ€์ค€๋‹ค. ๊ทธ๋Ÿฌ๋ฉด ์ด๋ฏธ ์žˆ๋˜ ๋ณด๋“œ๋“ค์˜ json ํŒŒ์ผ๋“ค์ด ์ญ‰ ๋ณด์ผ ๊ฑฐ๋‹ค. 

์ด์ œ๋Š” ์šฐ๋ฆฌ์˜ ์ปค์Šคํ…€ ๋ณด๋“œ์˜ JSONํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•  ์ฐจ๋ก€์ด๋‹ค. ์•„๋ž˜์˜ ๋งํฌ์—์„œ ํ•„์š”ํ•œ ๋ณด๋“œ์˜ JSON ํŒŒ์ผ์„ ์ฐพ์•„์ฃผ๊ณ  ๋‹ค์šด๋กœ๋“œํ•˜๊ฑฐ๋‚˜ ๋ณต์‚ฌํ•ด์ค€๋‹ค. ๊ทธ๋ฆฌ๊ณ  .platformio/platforms/*/boards/ ์ด ๊ฒฝ๋กœ์— JSON ํŒŒ์ผ์„ ๋„ฃ์–ด์ฃผ๋ฉด ๋์ด๋‹ค. ํ„ฐ๋ฏธ๋„์—์„œ ๋ฐ”๋กœ ๋งŒ๋“ค์–ด์ค˜๋„ ๋˜๊ณ  ๋‚˜๋Š” ์ € ๊ฒฝ๋กœ๋ฅผ VSCode๋กœ ์—ด์–ด์„œ ๋‹ค๋ฅธ JSON ํŒŒ์ผ๊ณผ ๋น„๊ต๋„ ํ•ด๋ณผ๊ฒธ ์ƒˆ๋กœ์šด ํŒŒ์ผ์„ ์ƒ์„ฑํ•ด์„œ ์ฝ”๋“œ๋ฅผ ๋ถ™์—ฌ๋„ฃ์–ด์ฃผ์—ˆ๋‹ค. 

https://github.com/handledexception/platform-espressif32/blob/deb6aa342245ad7bcb3d9ed69050f203779833ab/boards/esp32-s3-devkitc-1-n16r8v.json

๊ทธ๋ฆฌ๊ณ  VSCode๋ฅผ ๋‹ค์‹œ ๋ถ€ํŒ…ํ•ด์ฃผ๋ฉด ์ƒˆ๋กœ์šด ํ”„๋กœ์ ํŠธ๋ฅผ ์ƒ์„ฑํ•  ๋•Œ ๋ฐฉ๊ธˆ ์ถ”๊ฐ€ํ•ด์ค€ ์ปค์Šคํ…€ ๋ณด๋“œ๊ฐ€ ์ง ํ•˜๊ณ  ๋‚˜ํƒ€๋‚  ๊ฑฐ๋‹ค. 

๊ทธ ๋ณด๋“œ์™€ ํ•จ๊ป˜ ๋‹ค์Œ ์—ฌ์ •์„ ๊ณ„์† ํ•ด๋‚˜๊ฐ€๋ฉด ๋œ๋‹ค.

ํŠœํ† ๋ฆฌ์–ผ ์ฒ˜๋Ÿผ ์•„์ฃผ ์„ธ์„ธํ•˜๊ฒŒ ์ ์–ด๋‘์ง€๋Š” ์•Š์•˜๋Š”๋ฐ ํ˜น์‹œ ๊ถ๊ธˆํ•œ ์ ์ด ์žˆ๊ฑฐ๋‚˜ ๋ง‰ํžˆ๋Š” ๋ถ€๋ถ„์ด ์žˆ๋‹ค๋ฉด ๋Œ“๊ธ€๋กœ ๋ฌธ์˜ ์ฃผ์„ธ์š” :)

 

JSON ํŒŒ์ผ ์ƒ˜ํ”Œ

{
    "build": {
      "arduino":{
        "ldscript": "esp32s3_out.ld",
        "partitions": "default_16MB.csv",
        "memory_type": "qio_opi"
      },
      "core": "esp32",
      "extra_flags": [
        "-DARDUINO_ESP32S3_DEV",
        "-DBOARD_HAS_PSRAM",
        "-DARDUINO_USB_MODE=1",
        "-DARDUINO_USB_CDC_ON_BOOT=1"
      ],
      "f_cpu": "240000000L",
      "f_flash": "80000000L",
      "flash_mode": "qio",
      "psram_type": "opi",
      "hwids": [
        [
          "0x303A",
          "0x1001"
        ]
      ],
      "mcu": "esp32s3",
      "variant": "esp32s3"
    },
    "connectivity": [
      "wifi",
      "bluetooth"
    ],
    "debug": {
      "default_tool": "esp-builtin",
      "onboard_tools": [
        "esp-builtin"
      ],
      "openocd_target": "esp32s3.cfg"
    },
    "frameworks": [
      "arduino",
      "espidf"
    ],
    "name": "Espressif ESP32-S3-DevKitC-1-N16R8V (16 MB QD, 8MB PSRAM)",
    "upload": {
      "flash_size": "16MB",
      "maximum_ram_size": 327680,
      "maximum_size": 16777216,
      "require_upload_port": true,
      "speed": 921600
    },
    "url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html",
    "vendor": "Espressif"
  }

'Arduino | ESP32' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

mDNS(Multicase Domain Name System)  (0) 2024.06.08
Mac serial port๐Ÿคฏ  (0) 2024.05.01
Running a new project  (0) 2024.02.26
ESP32-S3-Devkit ๊ด€๋ จ ์‚ฌ์ดํŠธ ๋ชจ์Œ  (0) 2023.09.08