CoHDL
  1. Blog
  2. CoHDL 0.9.0

CoHDL 0.9.0: Enforced
Antenna Keepouts

ESP32 antenna areas now reach KiCad as enforceable rule areas. The compiler preserves their copper and component exclusions through rotation, bottom-side placement, and export.

Compiler v0.9.0 was released on . It is available for all five supported platforms.

An antenna outline on silkscreen is useful to a board designer, but it does not stop routing or placement. Earlier ESP32 footprints carried those visible outlines without the corresponding rule areas. CoHDL 0.9.0 adds the compiler support needed to preserve them as actual constraints in KiCad.

A keepout travels with the module

A footprint can now contain a rectangular keepout block. This is the antenna region in the hand-audited ESP32-S3-WROOM-1 footprint, alongside its existing pads and graphics:

A region inside FP_ESP32_S3_WROOM_1
keepout {
    shape: rect,
    at: (0mm, -9.75mm),
    size: (18mm, 6mm)
}

Both .kicad_mod and .kicad_pcb output prohibit tracks, vias, pads, copper pours, and other footprints in that region on every copper layer. Inner layers remain covered when the board's stackup changes. The region follows the module when it rotates or moves to the bottom of the board. Formatting, validation, and API documentation also preserve the new declaration.

Update the compiler and the ESP32 package

The published @espressif/esp32@0.3.0 package adds keepouts to twenty generated footprints and the hand-audited S3-WROOM-1 footprint. Pin mappings and pad geometry stay unchanged. Modules with an external antenna and no source antenna region do not gain an invented exclusion.

cohdl self-update
cohdl update ./board --dep @espressif/esp32
cohdl build ./board --emit kicad_pcb

Compiler 0.8.1 cannot parse the new keepout syntax. Use compiler 0.9.0 or later with ESP32 package 0.3.0. The compiler and package are versioned separately, so update both before rebuilding a project.

What the footprint can guarantee

The source antenna rectangles are retained. The pinned S31-WROOM-3 source listed front, back, and one inner copper layer; the library conservatively extends its rectangle to all copper layers and records the original list. Additional RF clearance, board-edge placement, cutouts, and housing constraints still come from the particular module's datasheet.

IPC-2581 export currently fails explicitly for used footprints with keepouts, because that exporter cannot preserve the full copper and component exclusion contract. Use --emit kicad_pcb for these designs. The rectangular syntax is a documented provisional extension; this release does not declare a new Accepted RFC.

Checked in KiCad

A fresh registry install built all 70 exact module parts that use the affected footprints. KiCad 10.0.4 loaded every instance with its rule area. A separate four-layer test exercised five rotations on both board sides: DRC rejected all 70 deliberate track, via, pad, and component intrusions while allowing all 40 outside control tracks. Imported footprints and native board output agreed on the transformed geometry.

Get the update

Install the latest compiler, which includes these changes:

cohdl self-update

For a new installation, follow the getting-started guide. The v0.9.0 release page has this version's platform archives and checksums; the full comparison records the source changes.