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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/wrong-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ body:
attributes:
label: embcc --version
description: The first line it prints.
placeholder: EmbCC 0.0.1-beta (the Emb toolchain's C and C++ compiler, ...)
placeholder: EmbCC 0.1.0 (the Emb toolchain's C and C++ compiler, ...)
validations:
required: true
- type: input
Expand Down
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ and a flash programmer.** One `embcc` binary targets every chip in the
table below, from an 8-bit AVR to a 64-bit RISC-V, and it preprocesses,
compiles, assembles and links without starting any other program.

> **Status: beta.** The one release so far, 0.0.1-beta (October 2026), is
> a pre-release, and `main` has moved well past it. Every change is tested
> on QEMU and EmbSim; no real board is part of CI yet. What 1.0 will
> promise, and how far each promise is today, is in the
> [roadmap](docs/roadmap.md).
> **Status: beta.** The current release is 0.1.0 (November 2026). CI
> builds and tests every pull request on QEMU and EmbSim; no real board is
> part of CI yet. What 1.0 will promise, and how far each promise is
> today, is in the [roadmap](docs/roadmap.md).

## Why EmbCC

Expand Down Expand Up @@ -180,16 +179,14 @@ unknown `--target=` lists every triple EmbCC accepts. EmbSim's boards

## Building and installing

A release installs on Linux and macOS, x86-64 and arm64. The first one,
0.0.1-beta, is a pre-release, so name it:
A release installs on Linux and macOS, x86-64 and arm64:

```sh
curl -fsSL https://raw.githubusercontent.com/EmbLinkOs/EmbCC/main/install.sh | sh -s -- --version v0.0.1-beta
curl -fsSL https://raw.githubusercontent.com/EmbLinkOs/EmbCC/main/install.sh | sh
```

The script installs into `~/.local` (`/usr/local` as root), after
checking the download's SHA-256. Once a release without a suffix is out,
`| sh` alone installs the latest one. The `.deb` packages and the
The script installs the latest release into `~/.local` (`/usr/local` as
root), after checking the download's SHA-256. The `.deb` packages and the
script's options are described in
[Installing](docs/manual/getting-started.md#installing); the Homebrew tap
is not published yet.
Expand Down
10 changes: 5 additions & 5 deletions docs/manual/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@ it prints the line to add to the shell's startup file. It needs `curl` or
`wget`, `tar`, and `sha256sum` or `shasum`, and runs under any POSIX
shell.

GitHub never counts a pre-release as the latest release, so while every
release is one (0.0.1-beta is the first), the script needs
`--version v0.0.1-beta`, as in the example below.
GitHub never counts a pre-release (a version with a suffix, such as
0.0.1-beta) as the latest release, so the script installs one only when
it is named with `--version`.

Options follow `sh -s --`:

```sh
curl -fsSL https://raw.githubusercontent.com/EmbLinkOs/EmbCC/main/install.sh |
sh -s -- --prefix /opt/embcc --version v0.0.1-beta
sh -s -- --prefix /opt/embcc --version v0.1.0
```

| Option | Meaning |
Expand Down Expand Up @@ -352,7 +352,7 @@ PREFIX/share/man/man1/embcc.1
PREFIX/share/embcc/cmake/embcc.cmake
```

`VERSION` is the version `embcc --version` prints (`0.0.1-beta`).
`VERSION` is the version `embcc --version` prints (`0.1.0`).
Nothing in the binary refers to `PREFIX`: the compiler finds this
directory relative to its own location, so an installation can be moved
or unpacked anywhere. Check what a compiler found with:
Expand Down
10 changes: 5 additions & 5 deletions docs/manual/invoking.md
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ executable, so a build tree and an installation both work without `-I`:
3. Otherwise, if `BINDIR/../lib/embcc/VERSION/include/stdio.h` exists,
that installation is used.

`VERSION` is the string `--version` prints (`0.0.1-beta`). The
`VERSION` is the string `--version` prints (`0.1.0`). The
executable's own path is read from the operating system on macOS and
Linux; on other hosts none of the steps after the first can apply, and
every header needs an explicit `-I`. `--print-search-dirs` shows the
Expand Down Expand Up @@ -1940,7 +1940,7 @@ status 0. Recognized anywhere on the command line; a `--target=` on the
same command line changes the target it reports:

```text
EmbCC 0.0.1-beta (the Emb toolchain's C and C++ compiler, for embedded systems and operating systems)
EmbCC 0.1.0 (the Emb toolchain's C and C++ compiler, for embedded systems and operating systems)
Target: x86_64-elf
Default target: x86_64-elf
Targets (every family; make TARGETS= builds fewer):
Expand Down Expand Up @@ -2125,9 +2125,9 @@ header it includes, to standard output (or to the `-MF` file). Use it with
```sh
$ embcc -M -c m.c
m.o: m.c \
/opt/embcc/lib/embcc/0.0.1-beta/include/stdio.h \
/opt/embcc/lib/embcc/0.0.1-beta/freestanding/stddef.h \
/opt/embcc/lib/embcc/0.0.1-beta/freestanding/stdarg.h \
/opt/embcc/lib/embcc/0.1.0/include/stdio.h \
/opt/embcc/lib/embcc/0.1.0/freestanding/stddef.h \
/opt/embcc/lib/embcc/0.1.0/freestanding/stdarg.h \
loc.h
$ embcc --deps-only -c m.c
m.o: m.c loc.h
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ toolchain on the host.
line:

```text
EmbCC 0.0.1-beta (the Emb toolchain's C and C++ compiler, for embedded systems and operating systems)
EmbCC 0.1.0 (the Emb toolchain's C and C++ compiler, for embedded systems and operating systems)
```

## Components
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/reproducible-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ carries it in `.debug_embcc_sbom`.
{
"spdxVersion": "SPDX-2.3",
"name": "fw.elf",
"creationInfo": { "created": "2023-11-14T22:13:20Z", "creators": ["Tool: EmbCC-0.0.1-beta"] },
"creationInfo": { "created": "2023-11-14T22:13:20Z", "creators": ["Tool: EmbCC-0.1.0"] },
"files": [
{ "fileName": "/src/motor.c", "checksums": [{"algorithm": "SHA256", "checksumValue": "..."}],
"licenseInfoInFiles": ["MIT"] },
Expand Down
91 changes: 91 additions & 0 deletions docs/releases/0.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# EmbCC 0.1.0

November 2026. The second release, and the first without a pre-release
suffix: `install.sh` with no `--version` installs it.

```sh
curl -fsSL https://raw.githubusercontent.com/EmbLinkOs/EmbCC/main/install.sh | sh
```

What changed since [0.0.1-beta](https://github.com/EmbLinkOs/EmbCC/releases/tag/v0.0.1-beta)
(October 2026), in about 540 commits. The numbers are pull requests.

## A change that can break a build

**The default target is the machine EmbCC runs on**, as with GCC and
clang (#198). `embcc hello.c` on an Apple-silicon Mac now builds for
`aarch64-apple-darwin`, and on x86-64 Linux for `x86_64-linux-gnu`.
Before, it built for `x86_64-elf`. A build that relied on that names
it: `--target=x86_64-elf`, or `EMBCC_DEFAULT_TARGET=x86_64-elf` in the
environment. See [The default target](../manual/invoking.md#the-default-target).

## Code

- Code size against GCC, two rounds (#183, #196): Thumb-2 64-bit shifts
without branches, `cmn`, `bic` and `orn` for negative and inverted
constants, bit tests as shifts, 8-byte single-integer structs passed in
registers on AAPCS, RV32 and Xtensa, and more.
- Xtensa: the density option's 16-bit instructions, `addx2/4/8`, and
`beqz.n`/`bnez.n` (#185).
- `-O3` is a level of its own: loop unswitching, constant parameters
propagated into callees, and inlining weighed by optimized size (#178).
- Performance rounds for embedded code (#165, #181): AVR interrupt
handlers as short as avr-gcc's, invariant loads hoisted after
unrolling, RV64 integer indices, `lr` used as a register on Thumb.
- Against clang 23 on 2026-11-08 (see the
[scoreboard](../internals/scoreboard.md#2026-11-08)), code size per
object at `-Os` is 1.04 on Cortex-M4, 1.10 on Cortex-M0 and 1.12 on
RV32 (below 1.0 on Cortex-M4 without the math library), and the
benchmark's speed is within 6% on Cortex-M4 and RV32.

## Debugging optimized code

- Lexical blocks: a variable declared in an inner block or a `for`
clause is shown only there, so sibling loops' `i` are told apart (#197).
- Inlined calls appear as frames of their own in `bt`, with the
variables of the inlined function (#197).
- A new test steps through a program in GDB on four QEMU boards
(Cortex-M3, Cortex-M0, RV32, MIPS) at `-O0`, `-O2` and `-Os`, and
checks every value GDB shows against clang `-O0` (#197).
- `.debug_frame` on AVR, and `embdbg` unwinds by `.debug_frame` on every
target that has it (#185).

## Languages

- C23 features, GNU vector types, integer `_Complex`, `asm goto`, and
the gaps to GCC and clang listed in #163 and #171.
- `_Thread_local` with local-exec TLS on ARM and RISC-V; `_Atomic`
floats and structs with GCC's layout (#185).
- Inline asm: outputs wider than a register, ARM's `%Q`/`%R`/`%H`, the
RISC-V `"f"` constraint; callee-saved clobbers saved on every backend
(#185).

## Targets, boards and tools

- `riscv32-none-elf` and `riscv64-none-elf` (#147).
- `--board=uno`, `nano`, `mega2560` and `esp32-devkit` (#177).
- EmbSim: ESP32-C3, Arduino Zero (#144) and a Cortex-M23 (#185).
- `embflash`: Arduino boards through their STK500 bootloaders (#172,
#177), and ESP32 flash write and read-back (#176).
- `embld`: Xtensa images laid out from linker scripts (#174).
- Assemblers: NASM syntax, 16- and 32-bit x86, Arm MVE and NEON,
AVX-512, TriCore, and `PHDRS` in linker scripts (#179, #180).
- The C library: POSIX threads, semaphores, regex, glob, `iconv`, the
resolver API and more (#162, #166-#169).

## Fixes

Wrong code, all with tests:

- 16-byte atomic nand on x86-64 (#154).
- A Win64 `va_arg` (#175).
- A 64-bit widening of a parameter that lost its high word (#185).
- Crashes and slow compiles that GCC's torture suite found (#159).

## Testing

- CI builds and tests every pull request: GCC and clang on Linux and
macOS, the whole test suite on QEMU in four parts, 150 fuzz seeds, and
EmbCC compiling itself (#152, #182).
- Every night, GCC's torture suite, and 200 new fuzz programs on x86-64
and four QEMU boards (#157).
9 changes: 8 additions & 1 deletion docs/roadmap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Road to EmbCC 1.0

EmbCC 0.0.1-beta is the first public release. This page says what
EmbCC 0.1.0 is the current release; 0.0.1-beta was the first. This page says what
1.0.0 will promise, how far EmbCC is from each promise today, and the
releases that close the distance, in order. It is for people trying the
beta who want to know what is coming, and for contributors choosing
Expand Down Expand Up @@ -70,6 +70,13 @@ depending on one developer's machine.
**Done when:** a pull request cannot merge with a failing check, and
three nightly runs in a row are clean.

**At the release** (2026-11-09, [notes](releases/0.1.0.md)): CI on
every pull request, the nightly torture and fuzz runs, the target tables
checked by a test, the issue forms, the security policy and the
contributor guide are in place, and `main` requires the 17 CI checks to
pass before a pull request merges. Not yet: three nightly runs in a row
clean (the one on 2026-11-08 was).

### 0.2.0: a stable interface

*Target: December 2026.*
Expand Down
2 changes: 1 addition & 1 deletion src/driver/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
#ifndef EMBCC_DRIVER_VERSION_H
#define EMBCC_DRIVER_VERSION_H

#define EMBCC_VERSION "0.0.1-beta"
#define EMBCC_VERSION "0.1.0"

#endif
Loading