Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# AGENTS.md

## Cursor Cloud specific instructions

### Overview

TuyaOpen is a cross-platform IoT SDK (C/C++) for smart hardware. It supports Tuya T-series MCUs, ESP32, Raspberry Pi, and Linux/Ubuntu. On Cursor Cloud, the LINUX target can be compiled and run natively on the host.

### Communication and behavior

- Always respond in Simplified Chinese unless explicitly requested otherwise.
- Prefer concise progress updates while running commands.
- Do not use interactive workflows unless the task explicitly requires them.

### Environment setup

Initialize the environment from repository root:

```bash
cd /workspace && . ./export.sh
```

What this does:
- Creates or reuses `.venv/`
- Installs Python dependencies from `requirements.txt`
- Exports `OPEN_SDK_ROOT`, `OPEN_SDK_PYTHON`, and `OPEN_SDK_PIP`
- Makes `tos.py` available in the current shell

### Build workflow

Standard flow:
1. `tos.py check` to verify required tools and submodules
2. `cd examples/<category>/<project>`
3. `tos.py build`
4. Use binaries from `<project>/dist/` (LINUX target produces native ELF)

### Non-interactive configuration guidance

- `tos.py config choice` and `tos.py config menu` are interactive TTY flows. Avoid them in non-interactive cloud runs.
- Prefer editing `app_default.config` directly for deterministic builds.
- To avoid prompt blocks from platform commit checks, create:

```bash
mkdir -p .cache && touch .cache/.dont_prompt_update_platform
```

### Lint and formatting

- Single file or directory checks:
- `python tools/check_format.py --debug --files <file>`
- `python tools/check_format.py --debug --dir <dir>`
- PR-style checks:
- `python tools/check_format.py --base <branch>`

### System dependencies

Expected packages (see `Dockerfile`):
`build-essential`, `libsystemd-dev`, `locales`, `libc6-i386`, `libusb-1.0-0`, `libusb-1.0-0-dev`, `python3`, `python3-pip`, `python3-venv`, `clang-format`

### Validation expectations

- For source changes, run the smallest relevant build or check for the touched area.
- For formatting-only updates, run `tools/check_format.py` against changed files.
- For docs-only updates, verify file content, command correctness, and path validity.

### Artifacts and output locations

- Build intermediates: `<project>/.build/`
- Final outputs: `<project>/dist/`
- Platform SDK cache: `platform/LINUX/`
4 changes: 2 additions & 2 deletions platform/platform_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ platforms:

- name: ESP32
repo: https://github.com/tuya/TuyaOpen-esp32
branch: dev-esp32
commit: 35bb1fc21a63f7bb2a2ee3bba348099e191179d7
branch: master
commit: f5ce809e89f5f8ba61758e2675fd31fa6d474737

- name: LN882H
repo: https://github.com/tuya/TuyaOpen-ln882h
Expand Down
2 changes: 1 addition & 1 deletion src/liblvgl/v8/conf/lv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
#define LV_FONT_FMT_TXT_LARGE 1

/*Enables/disables support for compressed fonts.*/
#define LV_USE_FONT_COMPRESSED 0
#define LV_USE_FONT_COMPRESSED 1

/*Enable subpixel rendering*/
#define LV_USE_FONT_SUBPX 0
Expand Down