Skip to content

Dataset

Embedded firmware code datasets for AI training

An embedded code dataset is firmware source in C, C++ and assembly for microcontrollers and real-time devices, paired with the hardware documents it was written against: board support packages, linker scripts, register maps, schematics and datasheets, plus hardware-in-the-loop test results and field-issue records. SourceX sources these to a buyer's spec from established device makers and embedded design houses, and reviews who owns each part, since silicon-vendor code is common in firmware trees. Each dataset is de-identified and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
Firmware source paired to the hardware documents, build description and test evidence it depends on
Typical systems
Git or Subversion, IAR Embedded Workbench, Keil MDK, STM32CubeIDE, MPLAB X IDE, Zephyr and FreeRTOS projects
Typical history
Set by the buyer; a device line can carry several board revisions and many firmware releases
Modality
C, C++ and assembly source, linker scripts and register descriptions, PDF documents, test logs
Delivery formats
Repository with history, in-house register headers, schematic PDFs, map and ELF files where agreed, JSONL links between code and documents
Preparation
Names replaced; confirm signing keys, credentials and device identifiers are removed and vendor SDK code and NDA documents are excluded or cleared
Licensing
Scoped per product or firmware line; permitted use agreed per license; vendor content stays outside it
Availability
Sourced to your spec; supply is not guaranteed and depends on ownership and export review
CodeIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
firmware_idstringPseudonymous ID of one firmware line and variant.
targetobjectProcessor core, microcontroller family, board revision and clock source the build is for.
toolchainobjectCompiler and version, flags, build system and the vendor SDK release the project expects.
source_unitsarrayFiles with language, role such as driver, startup, interrupt handler or bootloader, and whether written in house.
memory_layoutobjectLinker script or scatter file, memory regions and the map file from a release build.
register_mapobjectDevice SVD or header reference and in-house register definitions for custom logic or external chips.
pin_maparrayEach pin with its schematic net name, function, electrical mode, active level and sheet.
hardware_docsarraySchematic sheets, datasheet sections and errata, each linked to the source files that depend on it.
timing_constraintsarrayInterrupt priorities, handler time budgets and bus timings, with the document that sets each.
rtos_configobjectKernel or bare-metal loop, with tasks, priorities and stack sizes.
hil_resultsarrayHardware-in-the-loop runs by build hash and board revision, with test case, measured values and verdict.
field_issuesarrayDefects reported from deployed devices, with symptom, root cause in code or hardware and the fixing commit.
vendor_contentobjectVendor SDK code, NDA documents and third-party stacks in the tree, and whether each was excluded or cleared.
release_artifactsobjectWhich ELF, HEX or BIN outputs are delivered, and confirmation that signing material was removed.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "firmware_id": "fw_valve_ctrl_b",
  "target": {
    "core": "arm cortex-m4f",
    "mcu_family": "[VENDOR_FAMILY]",
    "board_rev": "C"
  },
  "toolchain": {
    "compiler": "arm-none-eabi-gcc",
    "version": "pinned in ci/toolchain.lock",
    "flags": [
      "-Os",
      "-mcpu=cortex-m4"
    ],
    "vendor_sdk": "excluded, release named in manifest"
  },
  "source_units": [
    {
      "path": "startup/startup_board.s",
      "lang": "asm",
      "role": "startup",
      "origin": "in_house"
    },
    {
      "path": "drivers/afe_spi.c",
      "lang": "c",
      "role": "driver",
      "origin": "in_house"
    }
  ],
  "memory_layout": {
    "linker_script": "ld/board_c.ld",
    "regions": [
      {
        "name": "APP",
        "origin": "0x08008000",
        "length": "480K"
      }
    ]
  },
  "register_map": {
    "device": "cmsis-svd, vendor file referenced by name",
    "custom": "hw/afe_regs.h"
  },
  "pin_map": [
    {
      "pin": "PB12",
      "net": "VALVE_EN_N",
      "mode": "push-pull output",
      "active": "low",
      "sheet": "sch_05"
    }
  ],
  "hardware_docs": [
    {
      "doc": "ds_afe_sec_7",
      "type": "datasheet_section",
      "topic": "power-up delay before first SPI frame",
      "linked_code": [
        "drivers/afe_spi.c"
      ]
    }
  ],
  "timing_constraints": [
    {
      "item": "TIM2 capture ISR",
      "priority": 1,
      "budget_us": 40
    }
  ],
  "rtos_config": {
    "kernel": "FreeRTOS",
    "tasks": [
      {
        "name": "ctrl",
        "prio": 5
      }
    ]
  },
  "hil_results": [
    {
      "build": "a41c9e2",
      "board_rev": "C",
      "case": "valve_close_on_overpressure",
      "measured_ms": 11.8,
      "limit_ms": 15,
      "result": "pass"
    }
  ],
  "field_issues": [
    {
      "id": "fi_0031",
      "symptom": "Valve chatter after brownout",
      "root_cause": "VALVE_EN_N floated between reset and GPIO init, while the pin is still a high-impedance input. Rev B has no pull-up.",
      "fix": "Commit 77d0b1c drives the pin high first thing in the reset handler, before data init and PLL setup. Rev C adds the pull-up."
    }
  ],
  "vendor_content": {
    "sdk_hal": "excluded",
    "nda_documents": "none delivered"
  },
  "release_artifacts": {
    "elf_with_symbols": true,
    "signing_keys": "removed",
    "signed_images": "withheld"
  }
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Coding assistants for firmware engineers

Models learn drivers, interrupt handlers and startup code as written against a specific part and board.

Driver writing from datasheets

A datasheet section paired with the driver written against it is a direct example of turning register descriptions and timing rules into code.

Hardware-aware code review

Field issues traced to a floating pin or a wrong interrupt priority label defects that reviewers of ordinary software never see.

Porting between boards and parts

Diffs across board revisions and microcontroller families show which lines change when a pin moves or a peripheral is replaced.

Evaluations graded on hardware evidence

Recorded test results, map-file size budgets and timing limits give pass criteria that a compile-only check cannot.

Use-case guides: Coding agents, Private evaluation sets, Robotics and embodied AI

What makes this data valuable

Code linked to documents

Each driver points to the schematic sheet, datasheet section and erratum it was written against.

Complete build description

Compiler version, flags, SDK release and linker script are recorded.

In-house low-level code

Startup, interrupt and bootloader files written by the partner are marked apart from vendor templates.

Test results tied to a build

Hardware-in-the-loop runs name the build hash and board revision.

Field issues with root cause

Defect records say whether the cause was code, hardware or their interaction, and link the fix.

Vendor code separated

SDK, middleware and third-party stacks are listed by path with their license.

Document stack

Embedded code dataset

This page covers embedded firmware codebases with hardware documents.Illustrative

Why firmware is delivered with its hardware documents

Firmware cannot be judged from source alone, because whether a line is correct depends on facts held outside the repository. A statement that writes a constant to an address is right or wrong according to the register map. On many peripherals a status flag is cleared by writing a one to it, reading a data register clears a flag as a side effect, and some fields can only be changed while the peripheral is disabled. A device header gives names, addresses and bit positions. A CMSIS-SVD file can also mark a field as read-only, cleared by writing a one or changed by a read, where the vendor filled those elements in. The sequence rules are in the reference manual, and the exceptions to them are in the errata sheet.

The board adds a second layer. Which pin carries the SPI clock, whether an enable line is active low, whether a pull-up is fitted and what the crystal frequency is all come from the schematic, and they change between board revisions while the driver source looks the same. Timing adds a third: how long a sensor needs after power-up before it answers, which clock must be enabled before a peripheral is touched, how quickly an interrupt handler must return.

So a useful dataset pairs code to documents, instead of setting one beside the other. A driver is linked to the schematic sheet that wires its pins, the datasheet section that defines its registers and any erratum it works around. A model trained on firmware source alone can learn to write plausible-looking accesses to registers that the part in front of it does not have. Paired data lets it check a line against the hardware. In a board design dataset the schematic is the product. Here it is the specification the code is read against.

One toolchain, one board, and the scarce assembly

Server code builds on most machines. A firmware project builds with one compiler at one version, against one release of a vendor SDK, through one linker script, for one board. Commercial compilers need a license and keep settings in their own project files. A different compiler version can change code size and timing, so an image that fit in flash can overflow. To verify anything, a buyer needs the compiler name and version, the flags, the SDK release, the linker script or scatter file and a map file from the partner's release build to compare against.

Running the result is harder. Emulators cover some processor cores and common peripherals, but seldom a custom board with its own sensors and analog parts. The practical evidence of behavior is the hardware-in-the-loop record: which build hash, on which board revision, passed which test, with what measured timing, and the capture behind it. Ask which results you can rerun and which you can only read.

Assembly is the scarcest part. Most firmware is C, and the assembly in a project is a few files: the reset handler that copies initialized data from flash to RAM and zeroes the .bss section before main runs, the vector table, the context switch in the RTOS port and fault handlers. Many projects use vendor or RTOS templates for these unchanged, and those files are not the partner's to license. In-house startup and interrupt code, written for a custom bootloader, a memory test at boot or a low-power wake path, is short, specific to one architecture and one assembler syntax, and thin in public corpora. Ask how much of the assembly the partner wrote.

What to check before licensing

  • Check that silicon-vendor SDK, HAL and middleware code is excluded, or that its license allows your intended use, and ask for the list of vendor files by path.
  • Confirm that datasheets, reference manuals and errata received under NDA are excluded or cleared with the vendor.
  • Confirm that signing keys, secure-boot certificates, provisioning scripts and device credentials were removed from every commit, not only the latest.
  • Ask for the export-control status in writing where firmware serves defense products or implements cryptography, and have counsel confirm the classification before delivery.
  • Check the build description on the sample: compiler and version, flags, SDK release, linker script and a map file to compare with your own build.
  • Check that hardware-in-the-loop results name the build hash and board revision, and ask whether raw captures or only verdicts are included.
  • Ask who owns the firmware where a design house wrote it for a client, and whether a licensed commercial RTOS kernel or protocol stack is in the tree.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

Can the firmware be built without the vendor SDK?

Usually not until you obtain the SDK yourself. Most firmware calls a silicon vendor's device headers, HAL and middleware, and that code is typically left out of the delivery because the partner does not own it. Ask that the manifest record the SDK name and release the build expects, so you can obtain it under the vendor's own terms.

Which architectures and operating systems can be requested?

Any target a partner has shipped can be requested. Typical targets are Arm Cortex-M, RISC-V, AVR, PIC, MSP430 and 8051-class microcontrollers, running bare metal with a main loop or an RTOS such as FreeRTOS, Zephyr or ThreadX. State the architecture, the compiler and the RTOS in your spec, because assembly syntax, startup code and interrupt handling differ for each. Supply is not guaranteed.

How much of a firmware codebase is assembly?

Little, by line count. Most projects are C with some C++, and assembly is confined to the startup file, the vector table, the RTOS context switch, fault handlers and a few timing-critical routines. Much of it comes from vendor or RTOS templates. If assembly is your goal, ask for projects with in-house bootloaders or hand-written interrupt code, and specify the architecture and assembler syntax.

Can firmware behavior be checked without the physical board?

Partly. You can compile with the recorded toolchain and compare your map file and image size with the partner's release build. Emulators and simulators such as QEMU and Renode model some cores, boards and peripherals, but rarely a custom board's sensors and analog parts. For behavior on real hardware you rely on the recorded hardware-in-the-loop results, so check which build and board revision they ran on.

Are schematics and datasheets part of the delivery?

Schematics can be, and datasheets mostly by reference. Schematics the partner drew for its own board can be included, with net names kept so that pins can be traced to code. Datasheets and reference manuals belong to the component makers, so public ones are best referenced by part number and document revision. Confirm that anything the partner received under NDA is excluded unless the vendor cleared it.

Does the dataset include compiled images and debug files?

It can, if you ask and the partner agrees. ELF files with debug symbols, map files and HEX or BIN images are useful for binary analysis, size-budget tasks and checking a rebuild. Signed production images and anything that would help someone clone a shipping device are normally withheld. Signing keys have no place in a delivery, so confirm on the sample that none remain.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 25 November 2026.

See if your company qualifies