Skip to content

Commit

Permalink
Merge pull request #34 from stc1988/merge/v4.9.0
Browse files Browse the repository at this point in the history
Merge/v4.9.0
  • Loading branch information
meganetaaan authored Jul 29, 2024
2 parents 2aa1622 + bec4dc8 commit 9ae4fb5
Show file tree
Hide file tree
Showing 283 changed files with 11,586 additions and 859 deletions.
4 changes: 3 additions & 1 deletion build/devices/esp32/targets/esp32c6_cdc/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
],
"build":{
"ESP32_SUBCLASS": "esp32c6",
"USE_USB": "2"
"USE_USB": "2",
"PROGRAMMING_MODE_MESSAGE": "INSTRUCTIONS: Hold the BOOT button and press then release the RST button.",
"BEFORE_DEBUGGING_MESSAGE": "Press and release the RST button."
},
"modules": {
"setup/target": "./setup-target"
Expand Down
4 changes: 2 additions & 2 deletions build/devices/esp32/targets/esp32h2_cdc/host/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Analog from "embedded:io/analog";
import Digital from "embedded:io/digital";
import DigitalBank from "embedded:io/digitalbank";
import I2C from "embedded:io/i2c";
import PulseCount from "embedded:io/pulsecount";
// import PulseCount from "embedded:io/pulsecount";
import PWM from "embedded:io/pwm";
import Serial from "embedded:io/serial";
import SMBus from "embedded:io/smbus";
Expand Down Expand Up @@ -59,7 +59,7 @@ const device = {
pin: 1
}
},
io: {Analog, Digital, DigitalBank, I2C, PulseCount, PWM, Serial, SMBus, SPI},
io: {Analog, Digital, DigitalBank, I2C, PWM, Serial, SMBus, SPI},
pin: {
button: 9
}
Expand Down
4 changes: 3 additions & 1 deletion build/devices/esp32/targets/esp32h2_cdc/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"ESP32_SUBCLASS": "esp32h2",
"USE_USB": "2",
"SDKCONFIGPATH": "./sdkconfig",
"PARTITIONS_FILE": "./sdkconfig/partitions.csv"
"PARTITIONS_FILE": "./sdkconfig/partitions.csv",
"PROGRAMMING_MODE_MESSAGE": "INSTRUCTIONS: Hold the BOOT button and press then release the RST button.",
"BEFORE_DEBUGGING_MESSAGE": "Press and release the RST button."
},
"include": [
"$(MODULES)/drivers/button/manifest.json",
Expand Down
4 changes: 2 additions & 2 deletions build/devices/esp32/targets/esp32h2_ili9341/host/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Analog from "embedded:io/analog";
import Digital from "embedded:io/digital";
import DigitalBank from "embedded:io/digitalbank";
import I2C from "embedded:io/i2c";
import PulseCount from "embedded:io/pulsecount";
// import PulseCount from "embedded:io/pulsecount";
import PWM from "embedded:io/pwm";
import Serial from "embedded:io/serial";
import SMBus from "embedded:io/smbus";
Expand Down Expand Up @@ -59,7 +59,7 @@ const device = {
pin: 2
}
},
io: {Analog, Digital, DigitalBank, I2C, PulseCount, PWM, Serial, SMBus, SPI},
io: {Analog, Digital, DigitalBank, I2C, PWM, Serial, SMBus, SPI},
pin: {
button: 9
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
CONFIG_ESP32_REV_MIN_3=y

CONFIG_ESP_INT_WDT=y

CONFIG_SPIRAM=y
CONFIG_SPIRAM_TYPE_ESPPSRAM64=y
CONFIG_SPIRAM_SPEED_80M=y
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE_8MB=n
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"

CONFIG_ESP_INT_WDT=y
CONFIG_SPIRAM=y
CONFIG_ESP32_REV_MIN_0=n
CONFIG_ESP32_REV_MIN_1=y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ CONFIG_TINYUSB_DESC_SERIAL_STRING="123456"
CONFIG_TINYUSB_DESC_CDC_STRING="xsbug"
# end of Descriptor configuration

CONFIG_CONSOLE_UART_DEFAULT=y
CONFIG_CONSOLE_UART=y
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
CONFIG_ESP_CONSOLE_UART=y
CONFIG_CONSOLE_UART_NUM=0
CONFIG_CONSOLE_UART_BAUDRATE=115200
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200

# CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
Expand Down
6 changes: 6 additions & 0 deletions build/devices/esp32/targets/moddable_display_6/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"build": {
"SUBPLATFORM": "moddable_six"
},
"include": "../moddable_six/manifest.json"
}
94 changes: 94 additions & 0 deletions build/devices/esp32/targets/moddable_six/host/provider.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* Copyright (c) 2021-2023 Moddable Tech, Inc.
*
* This file is part of the Moddable SDK Runtime.
*
* The Moddable SDK Runtime is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Moddable SDK Runtime is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
*
*/

import Analog from "embedded:io/analog";
import Digital from "embedded:io/digital";
import DigitalBank from "embedded:io/digitalbank";
import I2C from "embedded:io/i2c";
import PulseCount from "embedded:io/pulsecount";
import PWM from "embedded:io/pwm";
import Serial from "embedded:io/serial";
import SMBus from "embedded:io/smbus";
import SPI from "embedded:io/spi";
import Touch from "embedded:sensor/Touch/GT911";
import PulseWidth from "embedded:io/pulsewidth";

const device = {
I2C: {
default: {
io: I2C,
data: 4,
clock: 5
}
},
SPI: {
default: {
io: SPI,
clock: 15,
in: 16,
out: 17,
port: 1
}
},
io: {Analog, Digital, DigitalBank, I2C, PulseCount, PulseWidth, PWM, Serial, SMBus, SPI},
pin: {
//@@ button
button: 0,
},
sensor: {
Touch: class {
constructor(options) {
const address = [0x14, 0x5D].find(address => {
let result = 1, i;
try {
i = new I2C({
...device.I2C.default,
hz: 200_000,
address
});
result = i.write(new ArrayBuffer); // SMBus write quick (see linux/drivers/i2c/i2c-core-base.c => i2c_default_probe)
}
catch {
}
i?.close();
return undefined === result;
});

const result = new Touch({
...options,
sensor: {
...device.I2C.default,
io: device.io.I2C,
address
},
interrupt: {
io: Digital,
mode: Digital.Input,
pin: 38
}
});
result.configure({threshold: 20});
return result;
}
}
}
};

export default device;
96 changes: 96 additions & 0 deletions build/devices/esp32/targets/moddable_six/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"build": {
"SDKCONFIGPATH": "./sdkconfig",
"PARTITIONS_FILE": "./sdkconfig/partitions.csv",
"ESP32_SUBCLASS": "esp32s3"
},
"include": [
"$(MODDABLE)/modules/io/manifest.json",
"$(MODULES)/drivers/button/manifest.json",
"$(MODULES)/drivers/neopixel/manifest.json",
"$(MODDABLE)/modules/drivers/ili9341_p8/manifest.json",
"$(MODULES)/drivers/sensors/gt911/manifest.json",
"$(MODULES)/pins/pwm/manifest.json"
],
"modules": {
"setup/target": "./setup-target"
},
"preload": [
"setup/target",
"neopixel"
],
"config": {
"screen": "ili9341_p8",
"backlight": 14,
"led": {
"pin": 48,
"rainbow": true,
"brightness": 32
}
},
"creation": {
"static": 0,
"chunk": {
"initial": 78848,
"incremental": 0
},
"heap": {
"initial": 4928,
"incremental": 0
},
"stack": 512
},
"defines": {
"i2c": {
"sda_pin": 4,
"scl_pin": 5
},
"spi": {
"miso_pin": 37,
"mosi_pin": 35,
"sck_pin": 36
},
"ili9341p8": {
"width": 240,
"height": 320,
"hz": 20000000,
"dc_pin": 21,
"pclk_pin": 18,
"read_pin": 17,
"data0_pin": 6,
"data1_pin": 7,
"data2_pin": 8,
"data3_pin": 9,
"data4_pin": 10,
"data5_pin": 11,
"data6_pin": 12,
"data7_pin": 13,
"tearingEffect_pin": 47
},
"ft6206": {
"threshold": 20,
"flipX": false,
"flipY": false,
"raw_left": 10,
"raw_right": 232,
"raw_top": 8,
"raw_bottom": 315
},
"audioOut": {
"bitsPerSample": 16,
"numChannels": 1,
"sampleRate": 24000,
"streams": 1,
"queueLength": 64,
"volume_divider": 1,
"amplifier": {
"power": 46
},
"i2s": {
"PDM": 1,
"PDM_PIN": 45,
"bitsPerSample": 16
}
}
}
}
24 changes: 24 additions & 0 deletions build/devices/esp32/targets/moddable_six/sdkconfig/partitions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Copyright (c) 2016-2023 Moddable Tech, Inc.
#
# This file is part of the Moddable SDK Tools.
#
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# The Moddable SDK Tools is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
#

# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild,,,,
nvs, data, nvs, 0x9000, 0x006000,
phy_init, data, phy, 0xf000, 0x001000,
factory, app, factory, 0x10000, 0x7F0000,
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# Serial flasher config
#
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=n
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=n
CONFIG_ESPTOOLPY_FLASHSIZE="8MB"

# for ESP32-S3 module N8R8
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_MODE_QUAD=n
CONFIG_SPIRAM_SPEED_80M=y
CONFIG_SPIRAM_SPEED_40M=n
CONFIG_SPIRAM_SPEED_26M=n
CONFIG_SPIRAM_SPEED_20M=n
CONFIG_SPIRAM_BOOT_INIT=y
CONFIG_SPIRAM_IGNORE_NOTFOUND=y
CONFIG_SPIRAM_TYPE_AUTO=y
SPIRAM_USE_CAPS_ALLOC=y

# for ESP32-S3 module P2N8
# CONFIG_SPIRAM_MODE_OCT=n
# CONFIG_SPIRAM_MODE_QUAD=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Automatically generated file; DO NOT EDIT.
# Espressif IoT Development Framework Configuration
#

# CONFIG_ESP_DEBUG_STUBS_ENABLE=n
CONFIG_ESP_TASK_WDT_EN=n
CONFIG_ESP_TASK_WDT_INIT=y
CONFIG_ESP_TASK_WDT_PANIC=y
CONFIG_ESP_TASK_WDT_TIMEOUT_S=5
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=n
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=n

# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y
# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=n
# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=n
# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=n

CONFIG_ESP_CONSOLE_UART_DEFAULT=y
CONFIG_ESP_CONSOLE_UART_CUSTOM=n
CONFIG_ESP_CONSOLE_NONE=n
CONFIG_ESP_CONSOLE_UART_NUM=0
30 changes: 30 additions & 0 deletions build/devices/esp32/targets/moddable_six/sdkconfig/sdkconfig.inst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
##### TEST INSTRUMENTATION
#
# ESP32-specific
#
CONFIG_ESP_COREDUMP_ENABLE_TO_UART=y

#
# ESP32-specific
#
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
CONFIG_ESP_CONSOLE_UART_CUSTOM=n
CONFIG_ESP_CONSOLE_NONE=n
CONFIG_ESP_CONSOLE_UART_NUM=0


#
# Log output
#
CONFIG_LOG_DEFAULT_LEVEL_NONE=n
CONFIG_LOG_DEFAULT_LEVEL_ERROR=n
CONFIG_LOG_DEFAULT_LEVEL_WARN=y
CONFIG_LOG_DEFAULT_LEVEL_INFO=n
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=n
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=n
CONFIG_LOG_DEFAULT_LEVEL=2

CONFIG_ESP_DEBUG_STUBS_ENABLE=y
CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y

CONFIG_ESP_TASK_WDT_EN=y
Loading

0 comments on commit 9ae4fb5

Please sign in to comment.