> For the complete documentation index, see [llms.txt](https://docs.petoi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.petoi.com/thai/biboard/demo-applications/13.add-hardware-partition-configuration-option-in-arduino-ide.md).

# 13.Add hardware partition configuration option in Arduino IDE

หน่วยความจำแฟลชของบอร์ด ESP32 มี 16M และช่วงของที่อยู่จัดเก็บที่แสดงเป็นเลขฐานสิบหกคือ: 0x0-0x01000000

นี่คือตารางพาร์ติชันที่ระบบกำหนดค่าไว้ ดังแสดงในรูปด้านล่าง:

![](/files/-MchvFIkmIVuYEVWN9ct)

ตำแหน่งที่เก็บไฟล์ตารางพาร์ติชันนี้บนคอมพิวเตอร์:

C:\Users\\{YourUserName}\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.\*\tools\partitions\large\_spiffs\_16MB.csv

สามารถเห็นได้จากตารางพาร์ติชันด้านบน: พื้นที่ APP0 และพื้นที่ APP1 มีพื้นที่ 4.5M พื้นที่ข้อมูลคือ SPIFFS ขนาด 6.9M

แต่ใน Arduino IDE การกำหนดค่านี้ไม่รวมอยู่ในตัวเลือกการกำหนดค่าพาร์ติชันฮาร์ดแวร์ของโมดูล ESP32 Dev:

![](/files/-MclnVKhlt-zGbnEWCmB)

เราจำเป็นต้องเพิ่มการกำหนดค่านี้ในโมดูล ESP32 Dev

เปิดไฟล์การกำหนดค่าบอร์ดพัฒนา:

C:\Users\\{YourUserName}\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.\*\boards.txt

ค้นหาชื่อของบอร์ดพัฒนา: esp32.name=ESP32 Dev Module ดังแสดงในรูปด้านล่าง:

![](/files/-Mchz3nNhx0WxXBTBXvr)

บรรทัดข้อความในการกำหนดค่าพาร์ติชัน ESP32 Dev Module ในไฟล์กำหนดค่า:

```
esp32.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
```

เพิ่มข้อความ 3 บรรทัดต่อไปนี้ใต้บรรทัดนี้:

```
esp32.menu.PartitionScheme.large_spiffs=BiBoard V0(4.5 MB APP with OTA /6.9 MB SPIFFS)
esp32.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB
esp32.menu.PartitionScheme.large_spiffs.upload.maximum_size=4685824
```

ต่อไปนี้จะอธิบายความหมายของข้อความสามบรรทัด:

```
esp32.menu.PartitionScheme.large_spiffs=BiBoard V0(4.5 MB APP with OTA /6.9 MB SPIFFS)
```

ชื่อของการกำหนดค่าพาร์ติชัน ESP32 เราตั้งชื่อว่า BiBoard V0 (4.5M APP พร้อม OTA /6.9 MB SPIFFS) หรือสามารถแทนที่ด้วยชื่ออื่นที่คุณคุ้นเคย

```
esp32.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB
```

ข้อมูลไฟล์การกำหนดค่าพาร์ติชัน นคือไฟล์ large\_spiffs\_16MB.csv คุณยังสามารถเขียนไฟล์พาร์ติชั่นเพื่อปรับขนาดไฟล์ของแอพและพื้นที่ข้อมูล

```
esp32.menu.PartitionScheme.large_spiffs.upload.maximum_size=4685824
```

ข้อความบรรทัดนี้ระบุว่าขนาดโปรแกรมอัปโหลดสูงสุดคือ 4685824 ไบต์

ลองรวบรวมโปรแกรมอย่างง่ายเพื่อทดสอบว่าการตั้งค่าข้างต้นสำเร็จหรือไม่

เปิด Arduino IDE อีกครั้ง เราจะเห็นว่า BiBoard เพิ่งกำหนดค่า:

<figure><img src="/files/Hkb0eSUsBvny1ZFtKisv" alt=""><figcaption></figcaption></figure>

หลังจากคอมไพล์โปรแกรมแล้วจะได้ผลลัพธ์ดังรูปด้านล่าง

![](/files/-MciBDzLnc9v63bQr_3E)

การคอมไพล์เสร็จสมบูรณ์ โดยใช้ Flash ขนาด 213KB (4%) และขนาดสูงสุดที่ใช้งานได้คือ 4,685,824 ไบต์

ในข้อนี้ “4685824 ไบต์” ถูกระบุในบรรทัดที่สามของข้อความที่เพิ่งเพิ่มไปยังไฟล์กำหนดค่า

ถึงตอนนี้ คุณได้ทำการกำหนดค่าบอร์ดพัฒนาที่มีพื้นที่หน่วยความจำแฟลชที่ใหญ่ที่สุดใน Arduino IDE เรียบร้อยแล้ว


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.petoi.com/thai/biboard/demo-applications/13.add-hardware-partition-configuration-option-in-arduino-ide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
