diff --git a/arduino/libretuya/core/ChipType.h b/arduino/libretuya/core/ChipType.h index 6488c82..e9fde00 100644 --- a/arduino/libretuya/core/ChipType.h +++ b/arduino/libretuya/core/ChipType.h @@ -13,6 +13,7 @@ enum ChipFamily { F_BK7231N = 0x7B3EF230, // Beken 7231N F_BL602 = 0xDE1270B7, // Boufallo 602 F_XR809 = 0x51E903A8, // Xradiotech 809 + F_NATIVE = 0xDEADBEEF, // Host-native }; enum ChipType { diff --git a/boards/SUMMARY.md b/boards/SUMMARY.md index 9915ed0..4f2767c 100644 --- a/boards/SUMMARY.md +++ b/boards/SUMMARY.md @@ -3,3 +3,4 @@ - [BW12](../boards/bw12/README.md) - [WB2L Wi-Fi Module](../boards/wb2l/README.md) - [WR3 Wi-Fi Module](../boards/wr3/README.md) +- [Generic - Host-native](../boards/generic-native/README.md) diff --git a/boards/generic-native.json b/boards/generic-native.json new file mode 100644 index 0000000..8c412c8 --- /dev/null +++ b/boards/generic-native.json @@ -0,0 +1,43 @@ +{ + "build": { + "family": "NATIVE", + "mcu": "native", + "f_cpu": "1000000000L", + "variant": "generic-native" + }, + "flash": { + "bootloader": "0x000000+0x10000", + "system": "0x010000+0x10000", + "ota1": "0x020000+0x100000", + "ota2": "0x120000+0x100000", + "download": "0x220000+0x100000", + "kvs": "0x320000+0x40000", + "userdata": "0x360000+0xA0000" + }, + "connectivity": [ + "wifi" + ], + "frameworks": [ + "host-native-sdk", + "host-native-arduino" + ], + "upload": { + "maximum_ram_size": 4194304, + "flash_size": 4194304, + "maximum_size": 1048576 + }, + "doc": { + "params": { + "manufacturer": "N/A", + "series": "N/A", + "voltage": "5V" + }, + "extra": [ + "## Description", + "`generic-native` is a dummy board using the `host-native` family, which also serves as a template for building new families, as well as for testing flash-related modules (i.e. Fat FS, OTA, etc)." + ] + }, + "name": "Generic - Host-native", + "vendor": "N/A", + "symbol": "Native" +} diff --git a/boards/generic-native/README.md b/boards/generic-native/README.md new file mode 100644 index 0000000..8f332c5 --- /dev/null +++ b/boards/generic-native/README.md @@ -0,0 +1,33 @@ +# Generic - Host-native + +*by N/A* + +Parameter | Value +-------------|------- +MCU | NATIVE +Manufacturer | N/A +Series | N/A +Frequency | 1 GHz +Flash size | 4 MiB +RAM size | 4 MiB +Voltage | 5V + +## Flash memory map + +Flash size: 4 MiB / 4,194,304 B / 0x400000 + +Hex values are in bytes. + +Name | Start | Length | End +----------------|----------|-------------------|--------- +Bootloader | 0x000000 | 64 KiB / 0x10000 | 0x010000 +System Data | 0x010000 | 64 KiB / 0x10000 | 0x020000 +OTA1 Image | 0x020000 | 1 MiB / 0x100000 | 0x120000 +OTA2 Image | 0x120000 | 1 MiB / 0x100000 | 0x220000 +OTA Image | 0x220000 | 1 MiB / 0x100000 | 0x320000 +Key-Value Store | 0x320000 | 256 KiB / 0x40000 | 0x360000 +User Data | 0x360000 | 640 KiB / 0xA0000 | 0x400000 + +## Description + +`generic-native` is a dummy board using the `host-native` family, which also serves as a template for building new families, as well as for testing flash-related modules (i.e. Fat FS, OTA, etc). diff --git a/boards/generic-native/pins_arduino.h b/boards/generic-native/pins_arduino.h new file mode 100644 index 0000000..1de3ade --- /dev/null +++ b/boards/generic-native/pins_arduino.h @@ -0,0 +1 @@ +#include "variant.h" diff --git a/boards/generic-native/variant.h b/boards/generic-native/variant.h new file mode 100644 index 0000000..4c3b6cd --- /dev/null +++ b/boards/generic-native/variant.h @@ -0,0 +1,7 @@ +/* This file was auto-generated from generic-native.json using boardgen */ + +#pragma once + +#include + +// clang-format off diff --git a/docs/supported_boards.md b/docs/supported_boards.md index 7da7a23..767999d 100644 --- a/docs/supported_boards.md +++ b/docs/supported_boards.md @@ -1,9 +1,11 @@ -Name | MCU | Flash | RAM | Pins* | Wi-Fi | BLE | ZigBee | Family name ----------------------------------|-----------|-------|---------|-------------|-------|-----|--------|--------------- -**Ai-Thinker Co., Ltd.** | | | | | | | | -[BW12](../boards/bw12/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` -**Tuya Inc.** | | | | | | | | -[WB2L](../boards/wb2l/README.md) | BK7231T | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` -[WR3](../boards/wr3/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +Name | MCU | Flash | RAM | Pins* | Wi-Fi | BLE | ZigBee | Family name +---------------------------------------------|-----------|-------|---------|-------------|-------|-----|--------|--------------- +**Ai-Thinker Co., Ltd.** | | | | | | | | +[BW12](../boards/bw12/README.md) | RTL8710BX | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +**Tuya Inc.** | | | | | | | | +[WB2L](../boards/wb2l/README.md) | BK7231T | 2 MiB | 256 KiB | 7 (5 I/O) | ✔️ | ✔️ | ❌ | `beken-7231t` +[WR3](../boards/wr3/README.md) | RTL8710BN | 2 MiB | 256 KiB | 16 (12 I/O) | ✔️ | ❌ | ❌ | `realtek-ambz` +**N/A** | | | | | | | | +[Native](../boards/generic-native/README.md) | NATIVE | 4 MiB | 4 MiB | - | ✔️ | ❌ | ❌ | `host-native` diff --git a/docs/supported_chips.md b/docs/supported_chips.md index ff7dbae..66017e3 100644 --- a/docs/supported_chips.md +++ b/docs/supported_chips.md @@ -3,5 +3,6 @@ - BK7231S - BK7231T - BK7231U +- NATIVE - RTL8710BN - RTL8710BX diff --git a/docs/supported_families.md b/docs/supported_families.md index fec0459..04c965c 100644 --- a/docs/supported_families.md +++ b/docs/supported_families.md @@ -10,3 +10,4 @@ Realtek AmebaD | `-` Beken 7231N | `-` | `-` | `BK7231N` (0x7B3EF230) | ❌ | - Boufallo 602 | `-` | `-` | `BL602` (0xDE1270B7) | ❌ | - Xradiotech 809 | `-` | `-` | `XR809` (0x51E903A8) | ❌ | - +Native host architecture | `host-native` | `native` | `NATIVE` (0xDEADBEEF) | ❌ | - diff --git a/families.json b/families.json index 03c4ac4..dc731fa 100644 --- a/families.json +++ b/families.json @@ -59,5 +59,15 @@ "id": "0x51E903A8", "short_name": "XR809", "description": "Xradiotech 809" + }, + { + "id": "0xDEADBEEF", + "short_name": "NATIVE", + "description": "Native host architecture", + "name": "host-native", + "code": "native", + "mcus": [ + "NATIVE" + ] } ] diff --git a/tools/boardgen b/tools/boardgen index ee7f7d3..77c4d6c 160000 --- a/tools/boardgen +++ b/tools/boardgen @@ -1 +1 @@ -Subproject commit ee7f7d37c6ab42feffcb974c2f626b79142ae650 +Subproject commit 77c4d6c0665eef57999ffa458a8020048ff285a8