Datasets:
messages listlengths 3 5 | meta unknown |
|---|---|
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm int adxl345_write_reg(int fd, uint8_t reg, uint8_t value) g... | {
"task_id": "t_spi_0022",
"category": "spi",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "repair",
"lang": "vi",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Initialize a SEN0193 soil-moisture sensor via its digital D0 pin.\nT... | {
"task_id": "t_gpio_0019",
"category": "gpio",
"difficulty": "easy",
"type": "init",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"solutio... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Write function int adxl354b_read_xyz_temp(int fd, int32_t *x, int32_... | {
"task_id": "t_spi_0050",
"category": "spi",
"difficulty": "hard",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Read pressure-as-voltage from an MLX90824 sensor over an already ope... | {
"task_id": "t_i2c_0081",
"category": "i2c",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm nhấp nháy LED trạng thái 3 lần.\nHàm nhận req là request đa... | {
"task_id": "t_gpio_0034",
"category": "gpio",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Wait for a PWM channel directory to appear after export, for a gener... | {
"task_id": "t_pwm_0002",
"category": "pwm",
"difficulty": "easy",
"type": "init",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"solution_... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm đọc 16 bit thô từ cảm biến nhiệt độ MAX6675 qua spidev đã m... | {
"task_id": "t_spi_0020",
"category": "spi",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm uart_verify_sds011 kiểm tra một khung dữ liệu 10 byte của c... | {
"task_id": "t_uart_0005",
"category": "uart",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Đặt độ sáng LED generic bằng PWM theo phần trăm duty.\nint pwm_set_l... | {
"task_id": "t_pwm_0012",
"category": "pwm",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Take an already-open fd to a Modbus RTU device.\nRead one reply fram... | {
"task_id": "t_uart_0054",
"category": "uart",
"difficulty": "hard",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Khởi tạo một kênh LED dùng MOSFET IRLB8721 ở tần số 1000 Hz bằng các... | {
"task_id": "t_pwm_0006",
"category": "pwm",
"difficulty": "easy",
"type": "init",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "repair",
"lang": "vi",
"prompt_style": "detailed",
"solution_... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Đọc trục Z của la bàn AK8963 qua bus I2C đã mở.\nChữ ký: int ak8963_... | {
"task_id": "t_i2c_0018",
"category": "i2c",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm int flash_program_protect_check(int fd, uint32_t addr) kiểm... | {
"task_id": "t_spi_0059",
"category": "spi",
"difficulty": "hard",
"type": "error_handling",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Read the MCP9808 ambient temperature over an already opened I2C bus,... | {
"task_id": "t_i2c_0085",
"category": "i2c",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm int flash_read_data(int fd, uint32_t addr, uint8_t *buf, si... | {
"task_id": "t_spi_0011",
"category": "spi",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "repair",
"lang": "vi",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Kiểm tra <chip_dir>/pwm<channel> tồn tại dạng thư mục: 1 nếu đã expo... | {
"task_id": "t_pwm_0024",
"category": "pwm",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "short",
"solu... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Đọc độ ẩm tương đối từ cảm biến HIH-6130 trên bus I2C đã mở.\nChữ ký... | {
"task_id": "t_i2c_0067",
"category": "i2c",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Dat toc do hai chieu cho cau H L298N qua PWM sysfs generic.\nTham so... | {
"task_id": "t_pwm_0029",
"category": "pwm",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Read LM393 DO via passed req (caller INPUT, active-high/active_low=f... | {
"task_id": "t_gpio_0115",
"category": "gpio",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "short",
"so... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Đếm xung cạnh lên từ ngõ ra xung YFS201 trong cửa sổ 1500 ms.\nHàm m... | {
"task_id": "t_gpio_0006",
"category": "gpio",
"difficulty": "easy",
"type": "event",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "repair",
"lang": "vi",
"prompt_style": "detailed",
"soluti... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "ĐK TB6612 qua 3 line AIN1/AIN2/STBY: output active-high chung 1 requ... | {
"task_id": "t_gpio_0078",
"category": "gpio",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "short",
"so... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm int adis16460_check_diag(int fd, uint16_t *diag) đọc từ trạ... | {
"task_id": "t_spi_0061",
"category": "spi",
"difficulty": "hard",
"type": "error_handling",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Check frame SDS011 10 byte: NULL->-1; len!=10->-1; [0]!=0xAA hoặc [1... | {
"task_id": "t_uart_0005",
"category": "uart",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "short",
"solu... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm tăng công suất động cơ DRV8833 theo cấp số nhân:\nint drv88... | {
"task_id": "t_pwm_0062",
"category": "pwm",
"difficulty": "hard",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm uart_build_mhz19b_abc điền lệnh bật/tắt tự hiệu chuẩn (ABC)... | {
"task_id": "t_uart_0058",
"category": "uart",
"difficulty": "hard",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "repair",
"lang": "vi",
"prompt_style": "detailed",
"s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Configure ISM330DLC accelerometer to 104 Hz mode over an already ope... | {
"task_id": "t_i2c_0008",
"category": "i2c",
"difficulty": "easy",
"type": "init",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "repair",
"lang": "en",
"prompt_style": "detailed",
"solution_... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Read the PWM period of one channel in nanoseconds, for a generic PWM... | {
"task_id": "t_pwm_0014",
"category": "pwm",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Read logical level of offset line from held request (input, bias as-... | {
"task_id": "t_gpio_0002",
"category": "gpio",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "short",
"solu... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "This function was written for an older Raspberry Pi setup. It does n... | {
"task_id": "t_i2c_0024",
"category": "i2c",
"difficulty": "easy",
"type": "error_handling",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "migration",
"lang": "en",
"prompt_style": "legacy_cod... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Read one ADS1115 channel over an opened I2C bus and convert to milli... | {
"task_id": "t_i2c_0051",
"category": "i2c",
"difficulty": "easy",
"type": "error_handling",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Write function int max31865_read_fault(int fd, uint16_t *rtd, uint8_... | {
"task_id": "t_spi_0065",
"category": "spi",
"difficulty": "hard",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm int flash_chip_erase_wait(int fd, int timeout_ms) xóa toàn ... | {
"task_id": "t_spi_0053",
"category": "spi",
"difficulty": "hard",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Read the raw UT value of a BMP085 sensor on the I2C bus.\nSignature:... | {
"task_id": "t_i2c_0063",
"category": "i2c",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Write function int bme280_read_calib(int fd, uint8_t *c26, uint8_t *... | {
"task_id": "t_spi_0051",
"category": "spi",
"difficulty": "hard",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Blink an SOS beacon on one GPIO line.\nOpen the GPIO chip given by c... | {
"task_id": "t_gpio_0118",
"category": "gpio",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Set SG90 servo angle from a given degree:\nint sg90_set_angle(const ... | {
"task_id": "t_pwm_0017",
"category": "pwm",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Init one SRD-05VDC-SL line as output holding relay off. Chip from ch... | {
"task_id": "t_gpio_0008",
"category": "gpio",
"difficulty": "easy",
"type": "init",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "short",
"solution_s... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Read the integer temperature of an STTS751 sensor on the I2C bus.\nS... | {
"task_id": "t_i2c_0062",
"category": "i2c",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "repair",
"lang": "en",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm lấy tổng số line của chip GPIO.\nChữ ký: int get_chip_num_l... | {
"task_id": "t_gpio_0140",
"category": "gpio",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm khởi tạo công tắc nghiêng KY-020 bằng libgpiod v2 (API v2).... | {
"task_id": "t_gpio_0112",
"category": "gpio",
"difficulty": "medium",
"type": "init",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"solut... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Đọc độ rọi sáng từ cảm biến OPT4001 qua bus I2C đã mở.\nChữ ký: int ... | {
"task_id": "t_i2c_0020",
"category": "i2c",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Write a configuration sequence to an ICM-42605 sensor over an alread... | {
"task_id": "t_i2c_0006",
"category": "i2c",
"difficulty": "easy",
"type": "init",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"solution_... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Viết hàm int nrf24_write_tx_addr(int fd, const uint8_t addr[5]) ghi ... | {
"task_id": "t_spi_0056",
"category": "spi",
"difficulty": "hard",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "vi",
"prompt_style": "detailed",
"sol... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Write function int flash_program_protect_check(int fd, uint32_t addr... | {
"task_id": "t_spi_0059",
"category": "spi",
"difficulty": "hard",
"type": "error_handling",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Scan one membrane keypad row. row_req is an active request held by t... | {
"task_id": "t_gpio_0080",
"category": "gpio",
"difficulty": "medium",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "This function was written for an older Raspberry Pi setup. It does n... | {
"task_id": "t_i2c_0063",
"category": "i2c",
"difficulty": "easy",
"type": "read_write",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "migration",
"lang": "en",
"prompt_style": "legacy_code",
... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Điều khiển 3 kênh relay SRD-05VDC: xử lý trường hợp subset rỗng.\nHà... | {
"task_id": "t_gpio_0133",
"category": "gpio",
"difficulty": "medium",
"type": "error_handling",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "repair",
"lang": "vi",
"prompt_style": "detailed"... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "Init three HD44780 control lines (RS, EN, backlight) as outputs insi... | {
"task_id": "t_gpio_0028",
"category": "gpio",
"difficulty": "easy",
"type": "init",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "single",
"lang": "en",
"prompt_style": "detailed",
"solutio... |
[
{
"role": "system",
"content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."
},
{
"role": "user",
"content": "This function was written for an older Raspberry Pi setup. It does n... | {
"task_id": "t_gpio_0006",
"category": "gpio",
"difficulty": "easy",
"type": "event",
"verify_level": "L3",
"generator": "muse-spark-1.3-contributor",
"harness_version": "0.3.0",
"source": "generated",
"license": "cc-by-4.0",
"kind": "migration",
"lang": "en",
"prompt_style": "legacy_code",
"... |
Dataset Card for EdgeCoder RPi5 C SFT v1
Dataset Summary
EdgeCoder RPi5 C SFT v1 is an instruction-tuning dataset for teaching small language models to write correct, current C code for Raspberry Pi 5 (Raspberry Pi OS / Debian 13, Linux userspace, gcc 14). It covers five peripheral families:
| Peripheral | Interface |
|---|---|
| GPIO | libgpiod v2 |
| I2C | i2c-dev SMBus |
| SPI | spidev |
| UART | termios |
| PWM | sysfs |
Small open models perform poorly on this domain. In the project's baseline evaluation, five 1.5–3.7B models
reached 0.8–5.0% pass@1, and none solved a single GPIO or I2C task. They typically used deprecated interfaces
(libgpiod v1, /sys/class/gpio, wiringPi, pigpio) or APIs that do not exist.
This dataset targets those failure modes. Every assistant answer was compiled, scanned for deprecated APIs, and executed against a simulated device before it was kept.
| Examples | 1,357 (train 1,278 / validation 79) |
| Distinct tasks | 386 |
| Languages | English 683, Vietnamese 674 |
| Verification level | 100% behaviour-tested (L3) |
| Median answer length | 346 tokens |
Supported Tasks
- Code generation (supervised fine-tuning). Write one C function from a natural-language specification and a given signature.
- Legacy code migration. Port code written for older Raspberry Pi setups (wiringPi, sysfs GPIO, libgpiod v1,
/dev/mem) to Raspberry Pi 5. - Self-repair. Revise a failed attempt using compiler and test feedback, for agentic generate–verify–fix loops.
Languages
Task descriptions are in English (en) or Vietnamese (vi). Code, identifiers and the format instruction are in
English. Self-repair feedback messages come from the verifier and are in Vietnamese.
Dataset Structure
Data Instances
{
"messages": [
{"role": "system", "content": "You are an expert embedded Linux C programmer. Target platform: Raspberry Pi 5, Raspberry Pi OS (Debian 13 Trixie, 64-bit), gcc 14, C11 (gnu11), Linux userspace."},
{"role": "user", "content": "Init push-button with in-chip pull-up: open chip_path (caller-provided, never hard-code), line offset 0-based ...\n\nFunction signature:\nstruct gpiod_line_request *init_button_pullup(const char *chip_path, unsigned int offset);\n\nReply with exactly one ```c code block ..."},
{"role": "assistant", "content": "```c\n#include <gpiod.h>\n...\n```"}
],
"meta": {
"id": "ecv1-t_gpio_0005-single-en-short-25", "task_id": "t_gpio_0005", "kind": "single", "lang": "en",
"prompt_style": "short", "category": "gpio", "difficulty": "easy", "type": "init", "verify_level": "L3",
"solution_source": "reference", "generator": "muse-spark-1.3-contributor", "harness_version": "0.3.0",
"source": "generated", "license": "cc-by-4.0", "train_on": "all_assistant", "answer_tokens": 469,
"total_tokens": 712
}
}
Data Fields
messages: list of{role, content}turns (system,user,assistant), ready forapply_chat_template. Assistant answers are exactly one fenced C code block.meta.task_id: source task. Several examples can share one task, using different prompts or solutions.meta.kind:single: task description to code (911 examples).migration: legacy code plus requirements to Raspberry Pi 5 code (103).repair: multi-turn dialogue of task, failed attempt, verifier feedback, fixed code (343).
meta.train_on: which assistant turns to train on.all_assistantfor single-turn examples.last_assistantforrepairexamples, whose first assistant turn is an incorrect attempt and must be masked out of the loss.
meta.lang:enorvi.meta.prompt_style:detailed: full specification.short: concise engineer-style note that keeps every constant but omits API hints.legacy_code: the migration prompt.
meta.category:gpio,i2c,spi,uartorpwm.meta.difficulty:easy,mediumorhard.meta.type:init,read_write,error_handlingorevent.meta.solution_source:reference,alternate(a second correct implementation in a different style), orindep(written from the description alone, without seeing the test).meta.student_failed_layer: forrepaironly. The verification layer at which the original attempt failed (1 = compile/link, 3 = behaviour).meta.verify_level,meta.harness_version: verification depth and verifier version.meta.generator: model that produced the task text and solutions.meta.answer_tokens,meta.total_tokens: lengths under the Ministral 3 tokenizer.
Data Splits
| Split | Examples | Tasks |
|---|---|---|
| train | 1,278 | 364 |
| validation | 79 | 22 |
Splits are made by task, so no task contributes examples to both splits.
Composition
| Peripheral | GPIO | I2C | PWM | SPI | UART |
|---|---|---|---|---|---|
| Examples | 414 | 328 | 227 | 221 | 167 |
| Difficulty | Easy | Medium | Hard |
|---|---|---|---|
| Examples | 694 | 488 | 175 |
Usage
from datasets import load_dataset
ds = load_dataset("vanty120/edgecoder-rpi5-c-sft-v1")
example = ds["train"][0]
Train only on the final assistant turn: mask the prompt and, for repair examples, the failed first attempt.
def encode(example, tokenizer):
msgs = example["messages"]
full = tokenizer.apply_chat_template(msgs, tokenize=False)
prefix = tokenizer.apply_chat_template(msgs[:-1], tokenize=False)
ids = tokenizer(full, add_special_tokens=False)["input_ids"]
n_prefix = len(tokenizer(prefix, add_special_tokens=False)["input_ids"])
return {"input_ids": ids, "labels": [-100] * n_prefix + ids[n_prefix:]}
For Mistral-family tokenizers (e.g. Ministral 3), load the tokenizer with fix_mistral_regex=True.
Dataset Creation
Curation Rationale
Public code corpora for Raspberry Pi are dominated by libraries and interfaces that no longer work on Raspberry Pi 5, where GPIO is handled by the RP1 chip. The few existing instruction datasets for this hardware either rely on those interfaces or verify only that code compiles. This dataset favours correctness over volume: an example is included only if its code demonstrably behaves as specified.
Source Data
- Topics. Function-level topics were planned from a skill taxonomy, for example the libgpiod v2 request flow, edge events, line information, SMBus block transactions, termios framing, SPI command framing, and sysfs PWM sequencing. Real part numbers seen in prompts of NOKHAB-Lab/LLM_4_HW-SW_Interface (CC BY 4.0) served as topic ideas. Only device names were used, no text or code from that dataset.
- Tasks and solutions. For each topic,
muse-spark-1.3-contributorproduced:- a bilingual task description and a function signature;
- a reference solution and an alternative solution;
- a test against a simulated device;
- 2–4 deliberately incorrect "mutant" solutions.
- Student attempts. The failed first turns in
repairexamples were produced byMinistral-3-3B-Instruct-2512(Q4_K_M, temperature 0.7) on the same tasks. Feedback turns are the verifier's actual compiler and test output.
Verification
Each task passed all of the following before any example was derived from it.
- Compile. gcc 14.2 with
-std=gnu11 -Wall -Wextra -fsanitize=undefined. Warnings that indicate real bugs are treated as errors. The code is linked against the task's test. - API scan. No sysfs GPIO, wiringPi, pigpio or bcm2835, no
/dev/memor/dev/gpiomem*, no hard-codedgpiochipN, no libgpiod v1, and no GPIO v1 ioctls. - Behaviour. The test runs in a network-isolated, unprivileged container against simulated hardware:
- the
gpio-simkernel module (GPIO); - the
i2c-stubkernel module (I2C); - pseudo-terminals (UART);
- a fake spidev device (SPI);
- a fake sysfs PWM tree (PWM).
- the
- Test strength. Every mutant must be rejected.
- Test fairness. An independent solution, written from the description alone with the same prompt used at deployment, must also pass. This protects against tests that reject correct code.
- Stability. All accepted tasks were re-run through the verifier, and none was flaky.
Filtering and Decontamination
- Deduplication. Near-duplicate tasks were removed: MinHash, Jaccard ≥ 0.8 on code and descriptions.
- Prompt hygiene. Prompts that mention the testing setup were removed. Answers longer than 900 tokens were removed, because the target deployment caps output at 1,024 tokens.
- Benchmark decontamination. The project evaluates models on a separate, non-public benchmark of 120 tasks. Training topics close to benchmark topics were rejected at planning time. Tasks whose description or code reaches Jaccard ≥ 0.5 with any benchmark task, or that reuse a benchmark function name, were dropped. The highest similarity of any kept task to the benchmark is 0.42.
Personal and Sensitive Information
The dataset contains no personal data. It was scanned for file-system paths, credentials, e-mail addresses and IP addresses, and none were found.
Considerations for Using the Data
Limitations
- Explicit descriptions. Many descriptions spell out registers, formulas and error codes, so they are more explicit than typical engineer requests. Short paraphrases cover only part of the tasks in v1.
- Device constants. Register maps and conversion formulas are stated in each task. Treat them as the task specification, not as authoritative datasheet values.
- Simulated hardware. Behaviour was verified on simulated devices. Timing is checked at about 10 ms resolution, and baud rates and electrical characteristics are not simulated.
- Easy-skewed. Coverage leans towards easy and medium tasks; hard tasks make up 13% of examples.
- Generated content. All task text and solutions were generated by language models and then filtered by automated verification. Review code before deploying it on real hardware.
Intended Use
Supervised fine-tuning and evaluation of code models for embedded Linux on Raspberry Pi 5, including models that run on the device itself.
Additional Information
Licensing
This dataset is released under CC BY 4.0. When using it, please also credit NOKHAB-Lab/LLM_4_HW-SW_Interface for the device topic ideas.
Terms of the Generator Model
Task text and solutions were generated with the Meta Model API. Its Terms of Service (section 10.1(ix)) restrict using outputs to train, fine-tune or distill models that compete with Meta's models or services. Users are responsible for making sure their use is compatible with those terms.
Version History
- v1 (2026-10): first release, with 386 tasks and 1,357 examples. A larger v2 with more tasks and more short paraphrases is planned.
Citation
@misc{edgecoder_rpi5_c_sft_v1,
title = {EdgeCoder RPi5 C SFT v1: Execution-Verified Instruction Data for Raspberry Pi 5 C Programming},
author = {vanty120},
year = {2026},
howpublished = {\url{https://huggingface.co/datasets/vanty120/edgecoder-rpi5-c-sft-v1}}
}
- Downloads last month
- 23