mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
esp32c3: add support for this chip
This change adds support for the ESP32-C3, a new chip from Espressif. It is a RISC-V core so porting was comparatively easy. Most peripherals are shared with the (original) ESP32 chip, but with subtle differences. Also, the SVD file I've used gives some peripherals/registers a different name which makes sharing code harder. Eventually, when an official SVD file for the ESP32 is released, I expect that a lot of code can be shared between the two chips. More information: https://www.espressif.com/en/products/socs/esp32-c3 TODO: - stack scheduler - interrupts - most peripherals (SPI, I2C, PWM, etc)
This commit is contained in:
committed by
Ron Evans
parent
c830f878c6
commit
cb147b9475
@@ -428,11 +428,14 @@ func readSVD(path, sourceURL string) (*Device, error) {
|
||||
licenseBlock = regexp.MustCompile(`\s+\n`).ReplaceAllString(licenseBlock, "\n")
|
||||
}
|
||||
|
||||
// Remove "-" characters from the device name because such characters cannot
|
||||
// be used in build tags. Necessary for the ESP32-C3 for example.
|
||||
nameLower := strings.ReplaceAll(strings.ToLower(device.Name), "-", "")
|
||||
metadata := &Metadata{
|
||||
File: filepath.Base(path),
|
||||
DescriptorSource: sourceURL,
|
||||
Name: device.Name,
|
||||
NameLower: strings.ToLower(device.Name),
|
||||
NameLower: nameLower,
|
||||
Description: strings.TrimSpace(device.Description),
|
||||
LicenseBlock: licenseBlock,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user