Skip to content

Commit 2e4a1b9

Browse files
authored
Merge branch 'master' into esp-idf-v5.1-libs
2 parents 1e4d5bf + 3ec5f4e commit 2e4a1b9

File tree

6 files changed

+341
-27
lines changed

6 files changed

+341
-27
lines changed

boards.txt

+192
Original file line numberDiff line numberDiff line change
@@ -12265,6 +12265,198 @@ m5stack-core2.menu.EraseFlash.all.upload.erase_cmd=-e
1226512265

1226612266
##############################################################
1226712267

12268+
m5stack-cores3.name=M5Stack-CoreS3
12269+
m5stack-cores3.vid.0=0x303a
12270+
m5stack-cores3.pid.0=0x1001
12271+
12272+
m5stack-cores3.bootloader.tool=esptool_py
12273+
m5stack-cores3.bootloader.tool.default=esptool_py
12274+
12275+
m5stack-cores3.upload.tool=esptool_py
12276+
m5stack-cores3.upload.tool.default=esptool_py
12277+
m5stack-cores3.upload.tool.network=esp_ota
12278+
12279+
m5stack-cores3.upload.maximum_size=1310720
12280+
m5stack-cores3.upload.maximum_data_size=327680
12281+
m5stack-cores3.upload.flags=
12282+
m5stack-cores3.upload.extra_flags=
12283+
m5stack-cores3.upload.use_1200bps_touch=false
12284+
m5stack-cores3.upload.wait_for_upload_port=false
12285+
12286+
m5stack-cores3.serial.disableDTR=false
12287+
m5stack-cores3.serial.disableRTS=false
12288+
12289+
m5stack-cores3.build.tarch=xtensa
12290+
m5stack-cores3.build.bootloader_addr=0x0
12291+
m5stack-cores3.build.target=esp32s3
12292+
m5stack-cores3.build.mcu=esp32s3
12293+
m5stack-cores3.build.core=esp32
12294+
m5stack-cores3.build.variant=m5stack_cores3
12295+
m5stack-cores3.build.board=M5STACK_CORES3
12296+
12297+
m5stack-cores3.build.usb_mode=1
12298+
m5stack-cores3.build.cdc_on_boot=0
12299+
m5stack-cores3.build.msc_on_boot=0
12300+
m5stack-cores3.build.dfu_on_boot=0
12301+
m5stack-cores3.build.f_cpu=240000000L
12302+
m5stack-cores3.build.flash_size=4MB
12303+
m5stack-cores3.build.flash_freq=80m
12304+
m5stack-cores3.build.flash_mode=dio
12305+
m5stack-cores3.build.boot=qio
12306+
m5stack-cores3.build.boot_freq=80m
12307+
m5stack-cores3.build.partitions=default
12308+
m5stack-cores3.build.defines=
12309+
m5stack-cores3.build.loop_core=
12310+
m5stack-cores3.build.event_core=
12311+
m5stack-cores3.build.psram_type=qspi
12312+
m5stack-cores3.build.memory_type={build.boot}_{build.psram_type}
12313+
12314+
m5stack-cores3.menu.JTAGAdapter.default=Disabled
12315+
m5stack-cores3.menu.JTAGAdapter.default.build.copy_jtag_files=0
12316+
m5stack-cores3.menu.JTAGAdapter.builtin=Integrated USB JTAG
12317+
m5stack-cores3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg
12318+
m5stack-cores3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1
12319+
m5stack-cores3.menu.JTAGAdapter.external=FTDI Adapter
12320+
m5stack-cores3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg
12321+
m5stack-cores3.menu.JTAGAdapter.external.build.copy_jtag_files=1
12322+
m5stack-cores3.menu.JTAGAdapter.bridge=ESP USB Bridge
12323+
m5stack-cores3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg
12324+
m5stack-cores3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1
12325+
12326+
m5stack-cores3.menu.PSRAM.disabled=Disabled
12327+
m5stack-cores3.menu.PSRAM.disabled.build.defines=
12328+
m5stack-cores3.menu.PSRAM.disabled.build.psram_type=qspi
12329+
m5stack-cores3.menu.PSRAM.enabled=QSPI PSRAM
12330+
m5stack-cores3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
12331+
m5stack-cores3.menu.PSRAM.enabled.build.psram_type=qspi
12332+
m5stack-cores3.menu.PSRAM.opi=OPI PSRAM
12333+
m5stack-cores3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM
12334+
m5stack-cores3.menu.PSRAM.opi.build.psram_type=opi
12335+
12336+
m5stack-cores3.menu.FlashMode.qio=QIO 80MHz
12337+
m5stack-cores3.menu.FlashMode.qio.build.flash_mode=dio
12338+
m5stack-cores3.menu.FlashMode.qio.build.boot=qio
12339+
m5stack-cores3.menu.FlashMode.qio.build.boot_freq=80m
12340+
m5stack-cores3.menu.FlashMode.qio.build.flash_freq=80m
12341+
m5stack-cores3.menu.FlashMode.qio120=QIO 120MHz
12342+
m5stack-cores3.menu.FlashMode.qio120.build.flash_mode=dio
12343+
m5stack-cores3.menu.FlashMode.qio120.build.boot=qio
12344+
m5stack-cores3.menu.FlashMode.qio120.build.boot_freq=120m
12345+
m5stack-cores3.menu.FlashMode.qio120.build.flash_freq=80m
12346+
m5stack-cores3.menu.FlashMode.dio=DIO 80MHz
12347+
m5stack-cores3.menu.FlashMode.dio.build.flash_mode=dio
12348+
m5stack-cores3.menu.FlashMode.dio.build.boot=dio
12349+
m5stack-cores3.menu.FlashMode.dio.build.boot_freq=80m
12350+
m5stack-cores3.menu.FlashMode.dio.build.flash_freq=80m
12351+
m5stack-cores3.menu.FlashMode.opi=OPI 80MHz
12352+
m5stack-cores3.menu.FlashMode.opi.build.flash_mode=dout
12353+
m5stack-cores3.menu.FlashMode.opi.build.boot=opi
12354+
m5stack-cores3.menu.FlashMode.opi.build.boot_freq=80m
12355+
m5stack-cores3.menu.FlashMode.opi.build.flash_freq=80m
12356+
12357+
m5stack-cores3.menu.FlashSize.4M=4MB (32Mb)
12358+
m5stack-cores3.menu.FlashSize.4M.build.flash_size=4MB
12359+
m5stack-cores3.menu.FlashSize.8M=8MB (64Mb)
12360+
m5stack-cores3.menu.FlashSize.8M.build.flash_size=8MB
12361+
m5stack-cores3.menu.FlashSize.8M.build.partitions=default_8MB
12362+
m5stack-cores3.menu.FlashSize.16M=16MB (128Mb)
12363+
m5stack-cores3.menu.FlashSize.16M.build.flash_size=16MB
12364+
#m5stack-cores3.menu.FlashSize.32M=32MB (256Mb)
12365+
#m5stack-cores3.menu.FlashSize.32M.build.flash_size=32MB
12366+
12367+
m5stack-cores3.menu.LoopCore.1=Core 1
12368+
m5stack-cores3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
12369+
m5stack-cores3.menu.LoopCore.0=Core 0
12370+
m5stack-cores3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
12371+
12372+
m5stack-cores3.menu.EventsCore.1=Core 1
12373+
m5stack-cores3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
12374+
m5stack-cores3.menu.EventsCore.0=Core 0
12375+
m5stack-cores3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
12376+
12377+
m5stack-cores3.menu.USBMode.hwcdc=Hardware CDC and JTAG
12378+
m5stack-cores3.menu.USBMode.hwcdc.build.usb_mode=1
12379+
m5stack-cores3.menu.USBMode.default=USB-OTG (TinyUSB)
12380+
m5stack-cores3.menu.USBMode.default.build.usb_mode=0
12381+
12382+
m5stack-cores3.menu.CDCOnBoot.default=Disabled
12383+
m5stack-cores3.menu.CDCOnBoot.default.build.cdc_on_boot=0
12384+
m5stack-cores3.menu.CDCOnBoot.cdc=Enabled
12385+
m5stack-cores3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
12386+
12387+
m5stack-cores3.menu.MSCOnBoot.default=Disabled
12388+
m5stack-cores3.menu.MSCOnBoot.default.build.msc_on_boot=0
12389+
m5stack-cores3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode)
12390+
m5stack-cores3.menu.MSCOnBoot.msc.build.msc_on_boot=1
12391+
12392+
m5stack-cores3.menu.DFUOnBoot.default=Disabled
12393+
m5stack-cores3.menu.DFUOnBoot.default.build.dfu_on_boot=0
12394+
m5stack-cores3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode)
12395+
m5stack-cores3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1
12396+
12397+
m5stack-cores3.menu.UploadMode.default=UART0 / Hardware CDC
12398+
m5stack-cores3.menu.UploadMode.default.upload.use_1200bps_touch=false
12399+
m5stack-cores3.menu.UploadMode.default.upload.wait_for_upload_port=false
12400+
m5stack-cores3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
12401+
m5stack-cores3.menu.UploadMode.cdc.upload.use_1200bps_touch=true
12402+
m5stack-cores3.menu.UploadMode.cdc.upload.wait_for_upload_port=true
12403+
12404+
m5stack-cores3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
12405+
m5stack-cores3.menu.PartitionScheme.default.build.partitions=default
12406+
m5stack-cores3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
12407+
m5stack-cores3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
12408+
m5stack-cores3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS)
12409+
m5stack-cores3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
12410+
m5stack-cores3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
12411+
12412+
m5stack-cores3.menu.CPUFreq.240=240MHz (WiFi)
12413+
m5stack-cores3.menu.CPUFreq.240.build.f_cpu=240000000L
12414+
m5stack-cores3.menu.CPUFreq.160=160MHz (WiFi)
12415+
m5stack-cores3.menu.CPUFreq.160.build.f_cpu=160000000L
12416+
m5stack-cores3.menu.CPUFreq.80=80MHz (WiFi)
12417+
m5stack-cores3.menu.CPUFreq.80.build.f_cpu=80000000L
12418+
m5stack-cores3.menu.CPUFreq.40=40MHz
12419+
m5stack-cores3.menu.CPUFreq.40.build.f_cpu=40000000L
12420+
m5stack-cores3.menu.CPUFreq.20=20MHz
12421+
m5stack-cores3.menu.CPUFreq.20.build.f_cpu=20000000L
12422+
m5stack-cores3.menu.CPUFreq.10=10MHz
12423+
m5stack-cores3.menu.CPUFreq.10.build.f_cpu=10000000L
12424+
12425+
m5stack-cores3.menu.UploadSpeed.921600=921600
12426+
m5stack-cores3.menu.UploadSpeed.921600.upload.speed=921600
12427+
m5stack-cores3.menu.UploadSpeed.115200=115200
12428+
m5stack-cores3.menu.UploadSpeed.115200.upload.speed=115200
12429+
m5stack-cores3.menu.UploadSpeed.256000.windows=256000
12430+
m5stack-cores3.menu.UploadSpeed.256000.upload.speed=256000
12431+
m5stack-cores3.menu.UploadSpeed.230400.windows.upload.speed=256000
12432+
m5stack-cores3.menu.UploadSpeed.230400=230400
12433+
m5stack-cores3.menu.UploadSpeed.230400.upload.speed=230400
12434+
m5stack-cores3.menu.UploadSpeed.460800.linux=460800
12435+
m5stack-cores3.menu.UploadSpeed.460800.macosx=460800
12436+
m5stack-cores3.menu.UploadSpeed.460800.upload.speed=460800
12437+
m5stack-cores3.menu.UploadSpeed.512000.windows=512000
12438+
m5stack-cores3.menu.UploadSpeed.512000.upload.speed=512000
12439+
12440+
m5stack-cores3.menu.DebugLevel.none=None
12441+
m5stack-cores3.menu.DebugLevel.none.build.code_debug=0
12442+
m5stack-cores3.menu.DebugLevel.error=Error
12443+
m5stack-cores3.menu.DebugLevel.error.build.code_debug=1
12444+
m5stack-cores3.menu.DebugLevel.warn=Warn
12445+
m5stack-cores3.menu.DebugLevel.warn.build.code_debug=2
12446+
m5stack-cores3.menu.DebugLevel.info=Info
12447+
m5stack-cores3.menu.DebugLevel.info.build.code_debug=3
12448+
m5stack-cores3.menu.DebugLevel.debug=Debug
12449+
m5stack-cores3.menu.DebugLevel.debug.build.code_debug=4
12450+
m5stack-cores3.menu.DebugLevel.verbose=Verbose
12451+
m5stack-cores3.menu.DebugLevel.verbose.build.code_debug=5
12452+
12453+
m5stack-cores3.menu.EraseFlash.none=Disabled
12454+
m5stack-cores3.menu.EraseFlash.none.upload.erase_cmd=
12455+
m5stack-cores3.menu.EraseFlash.all=Enabled
12456+
m5stack-cores3.menu.EraseFlash.all.upload.erase_cmd=-e
12457+
12458+
##############################################################
12459+
1226812460
m5stack-timer-cam.name=M5Stack-Timer-CAM
1226912461

1227012462
m5stack-timer-cam.bootloader.tool=esptool_py

cores/esp32/HardwareSerial.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,6 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
367367
}
368368
break;
369369
#endif
370-
default:
371-
log_e("Bad UART Number");
372-
return;
373370
}
374371
}
375372

docs/source/faq.rst

+17
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,20 @@ How to compile libs with different debug level?
1515
-----------------------------------------------
1616

1717
The short answer is ``esp32-arduino-lib-builder/configs/defconfig.common:44``. A guide explaining the process can be found here <guides/core_debug>
18+
19+
SPIFFS mount failed
20+
-------------------
21+
When you come across and error like this:
22+
23+
.. code-block:: shell
24+
25+
E (588) SPIFFS: mount failed, -10025
26+
[E][SPIFFS.cpp:47] begin(): Mounting SPIFFS failed! Error: -1
27+
28+
Try enforcing format on fail in your code by adding ``true`` in the ``begin`` method such as this:
29+
30+
.. code-block:: c++
31+
32+
SPIFFS.begin(true);
33+
34+
See the method prototype for reference: ``bool begin(bool formatOnFail=false, const char * basePath="/spiffs", uint8_t maxOpenFiles=10, const char * partitionLabel=NULL);``

docs/source/tutorials/preferences.rst

+31-18
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ Like so:
233233

234234
.. code-block:: arduino
235235
236-
String myString = myPreferences.getString("myStringKey");
236+
float myFloat = myPreferences.getFloat("pi");
237237
238-
This will retrieve the String value from the namespace key ``"myStringKey"`` and assign it to the String type variable ``myString``.
238+
This will retrieve the float value from the namespace key ``"pi"`` and assign it to the float type variable ``myFloat``.
239239

240240

241241
Summary
@@ -277,9 +277,10 @@ When started, the system has no way of knowing which of the above conditions is
277277
// not the complete setup(), but in setup(), include this...
278278
279279
stcPrefs.begin("STCPrefs", RO_MODE); // Open our namespace (or create it
280-
// if it doesn't exist) in in RO mode.
280+
// if it doesn't exist) in RO mode.
281281
282-
bool tpInit = stcPrefs.isKey("nvsInit"); // Test for the existence of the "already initialized" key.
282+
bool tpInit = stcPrefs.isKey("nvsInit"); // Test for the existence
283+
// of the "already initialized" key.
283284
284285
if (tpInit == false) {
285286
// If tpInit is 'false', the key "nvsInit" does not yet exist therefore this
@@ -289,13 +290,15 @@ When started, the system has no way of knowing which of the above conditions is
289290
290291
291292
// The .begin() method created the "STCPrefs" namespace and since this is our
292-
// first-time run we will create our keys and store the initial "factory default" values.
293+
// first-time run we will create
294+
// our keys and store the initial "factory default" values.
293295
stcPrefs.putUChar("curBright", 10);
294296
stcPrefs.putString("talChan", "one");
295297
stcPrefs.putLong("talMax", -220226);
296298
stcPrefs.putBool("ctMde", true);
297299
298-
stcPrefs.putBool("nvsInit", true); // Create the "already initialized" key and store a value.
300+
stcPrefs.putBool("nvsInit", true); // Create the "already initialized"
301+
// key and store a value.
299302
300303
// The "factory defaults" are created and stored so...
301304
stcPrefs.end(); // Close the namespace in RW mode and...
@@ -456,10 +459,12 @@ This is best explained with an example. Here the ``Bytes`` methods are used to s
456459
Serial.begin(115200);
457460
delay(250);
458461
459-
mySketchPrefs.begin("myPrefs", RW_MODE); // open (or create) the namespace "myPrefs" in RW mode
462+
mySketchPrefs.begin("myPrefs", RW_MODE); // open (or create) the namespace
463+
// "myPrefs" in RW mode
460464
mySketchPrefs.clear(); // delete any previous keys in this namespace
461465
462-
// Create an array of test values. We're using hex numbers throughout to better show how the bytes move around.
466+
// Create an array of test values. We're using hex numbers
467+
// throughout to better show how the bytes move around.
463468
int16_t myArray[] = { 0x1112, 0x2122, 0x3132, 0x4142, 0x5152, 0x6162, 0x7172 };
464469
465470
Serial.println("Printing myArray...");
@@ -468,22 +473,28 @@ This is best explained with an example. Here the ``Bytes`` methods are used to s
468473
}
469474
Serial.println("\r\n");
470475
471-
// In the next statement, the second sizeof() needs to match the data type of the elements of myArray
472-
Serial.print("The number of elements in myArray is: "); Serial.println( sizeof(myArray) / sizeof(int16_t) );
473-
Serial.print("But the size of myArray in bytes is: "); Serial.println( sizeof(myArray) );
476+
// In the next statement, the second sizeof() needs
477+
// to match the data type of the elements of myArray
478+
Serial.print("The number of elements in myArray is: ");
479+
Serial.println( sizeof(myArray) / sizeof(int16_t) );
480+
Serial.print("But the size of myArray in bytes is: ");
481+
Serial.println( sizeof(myArray) );
474482
Serial.println("");
475483
476-
Serial.println("Storing myArray into the Preferences namespace \"myPrefs\" against the key \"myPrefsBytes\".");
484+
Serial.println(
485+
"Storing myArray into the Preferences namespace \"myPrefs\" against the key \"myPrefsBytes\".");
477486
// Note: in the next statement, to store the entire array, we must use the
478487
// size of the arrray in bytes, not the number of elements in the array.
479488
mySketchPrefs.putBytes( "myPrefsBytes", myArray, sizeof(myArray) );
480-
Serial.print("The size of \"myPrefsBytes\" is (in bytes): "); Serial.println( mySketchPrefs.getBytesLength("myPrefsBytes") );
489+
Serial.print("The size of \"myPrefsBytes\" is (in bytes): ");
490+
Serial.println( mySketchPrefs.getBytesLength("myPrefsBytes") );
481491
Serial.println("");
482492
483-
int16_t myIntBuffer[20] = {}; // No magic about 20. Just making a buffer (array) big enough.
493+
int16_t myIntBuffer[20] = {}; // No magic about 20. Just making a buffer (array) big enough.
484494
Serial.println("Retrieving the value of myPrefsBytes into myIntBuffer.");
485495
Serial.println(" - Note the data type of myIntBuffer matches that of myArray");
486-
mySketchPrefs.getBytes( "myPrefsBytes", myIntBuffer, mySketchPrefs.getBytesLength("myPrefsBytes") );
496+
mySketchPrefs.getBytes("myPrefsBytes", myIntBuffer,
497+
mySketchPrefs.getBytesLength("myPrefsBytes"));
487498
488499
Serial.println("Printing myIntBuffer...");
489500
// In the next statement, sizeof() needs to match the data type of the elements of myArray
@@ -492,9 +503,11 @@ This is best explained with an example. Here the ``Bytes`` methods are used to s
492503
}
493504
Serial.println("\r\n");
494505
495-
Serial.println("We can see how the data from myArray is actually stored in the namespace as follows.");
496-
uint8_t myByteBuffer[40] = {}; // No magic about 40. Just making a buffer (array) big enough.
497-
mySketchPrefs.getBytes( "myPrefsBytes", myByteBuffer, mySketchPrefs.getBytesLength("myPrefsBytes") );
506+
Serial.println(
507+
"We can see how the data from myArray is actually stored in the namespace as follows.");
508+
uint8_t myByteBuffer[40] = {}; // No magic about 40. Just making a buffer (array) big enough.
509+
mySketchPrefs.getBytes("myPrefsBytes", myByteBuffer,
510+
mySketchPrefs.getBytesLength("myPrefsBytes"));
498511
499512
Serial.println("Printing myByteBuffer...");
500513
for (int i = 0; i < mySketchPrefs.getBytesLength("myPrefsBytes"); i++) {

0 commit comments

Comments
 (0)