-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,459 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.packages/ | ||
.jaguar | ||
/build/ | ||
/synthesized/ | ||
/toit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# Copyright (C) 2023 Toitware ApS. | ||
# | ||
# Use of this source code is governed by an MIT-style license that can be | ||
# found in the tools/LICENSE file. | ||
|
||
SHELL := bash | ||
.SHELLFLAGS := -eu -o pipefail -c | ||
|
||
ifeq ($(OS),Windows_NT) | ||
EXE_SUFFIX := .exe | ||
else | ||
EXE_SUFFIX := | ||
endif | ||
|
||
TOIT_EXEC := toit.run$(EXE_SUFFIX) | ||
|
||
TOIT_DIRECTORY := toit | ||
BUILD_DIRECTORY := build | ||
VARIANTS_DIRECTORY := variants | ||
SYNTHESIZED_DIRECTORY := synthesized | ||
TOIT_SDK_DIRECTORY := $(BUILD_DIRECTORY)/host/sdk | ||
|
||
TOOL_ENTRY := tools/main.toit | ||
TOOL_RUN := "$(TOIT_EXEC)" "$(TOOL_ENTRY)" | ||
|
||
TOIT_GIT_URL := https://github.com/toitlang/toit.git | ||
|
||
.PHONY: all | ||
all: | ||
@echo "Please specify a target to build." | ||
|
||
.PHONY: download-toit | ||
download-toit: | check-toit-version create-toit-directory | ||
@# If this is not yet a git repository initial it: | ||
if [ ! -d $(TOIT_DIRECTORY)/.git ] ; then \ | ||
cd "$(TOIT_DIRECTORY)"; \ | ||
git init; \ | ||
git remote add origin "$(TOIT_GIT_URL)"; \ | ||
fi | ||
@# Fetch. | ||
(cd "$(TOIT_DIRECTORY)" && git fetch origin) | ||
@# Checkout the version of the toit repo that we want to use, and initialize | ||
@# the submodules. | ||
(cd "$(TOIT_DIRECTORY)" && git checkout "${TOIT_VERSION}") | ||
(cd "$(TOIT_DIRECTORY)" && git submodule update --init --recursive) | ||
|
||
.PHONY: check-toit-version | ||
check-toit-version: | ||
@if [ -z "$(TOIT_VERSION)" ]; then \ | ||
echo "TOIT_VERSION is not set"; \ | ||
exit 1; \ | ||
fi | ||
|
||
.PHONY: create-toit-directory | ||
create-toit-directory: | ||
mkdir -p "$(TOIT_DIRECTORY)" | ||
|
||
.PHONY: synthesize-all | ||
synthesize-all: | create-build-directory create-synthesized-directory | ||
$(TOOL_RUN) synthesize \ | ||
--toit-root="$(TOIT_DIRECTORY)" \ | ||
--build-root="$(BUILD_DIRECTORY)" \ | ||
--output-root="$(SYNTHESIZED_DIRECTORY)" \ | ||
--sdk-path="$(TOIT_SDK_DIRECTORY)" \ | ||
--variants-root="$(VARIANTS_DIRECTORY)" \ | ||
$(shell $(TOOL_RUN) list variants) | ||
|
||
.PHONY: create-build-directory | ||
create-build-directory: | ||
mkdir -p "$(BUILD_DIRECTORY)" | ||
|
||
.PHONY: create-synthesized-directory | ||
create-synthesized-directory: | ||
mkdir -p "$(SYNTHESIZED_DIRECTORY)" | ||
|
||
.PHONY: build-all | ||
build-all: | ||
for variant in $(shell $(TOOL_RUN) list variants); do \ | ||
$(MAKE) -C "$(SYNTHESIZED_DIRECTORY)/$$variant"; \ | ||
done | ||
|
||
.PHONY: build-host | ||
build-host: | ||
$(MAKE) -C "$(TOIT_DIRECTORY)" BUILD=$(abspath $(BUILD_DIRECTORY)) sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,68 @@ | ||
# Envelopes | ||
|
||
Envelopes for Toit. | ||
|
||
This repository contains a tool to generate envelopes for Toit. It | ||
also automatically builds envelopes for the variants that are stored in | ||
this repository. | ||
|
||
For the tool see [the Envelope Tool README](tools/README.md). | ||
|
||
We call "variant" configurations (mostly `sdkconfig`) that produce | ||
different builds of firmwares. For example, the `esp32-eth-clk-out17` | ||
variant is for a firmware that uses Ethernet and has the clock output | ||
on pin 17 (like the Olimex Ethernet boards). | ||
|
||
Compiled envelopes for specific SDK versions are found in the | ||
release page of this repository. For example, envelopes that are | ||
compiled with and for SDK v2.0.0-alpha.90 are found on the | ||
[v2.0.0-alpha.90 release](https://github.com/toitlang/envelopes/releases/tag/v2.0.0-alpha.90) | ||
page. | ||
|
||
## Contributing | ||
|
||
Feel free to open issues and pull requests with new variants. Make sure | ||
they have a description (README.md) with the purpose and the changes. | ||
We will automatically build them whenever a new Toit version is released. | ||
|
||
Note that some variants are featured here. Consult the | ||
Toit team before adding new variants to this README. | ||
|
||
## Variants | ||
|
||
### esp32 | ||
|
||
A generic ESP32 variant. This is the default variant when using Toit. | ||
It is built for maximum compatibility. | ||
|
||
This variant supports Ethernet, but without the clock output. | ||
|
||
### esp32-eth-clk-out17 | ||
|
||
A variant for ESP32 boards with Ethernet and a clock output on pin 17. | ||
|
||
Olimex boards with Ethernet should use this variant. | ||
|
||
### esp32c3 | ||
|
||
A generic [ESP32-C3 variant](variants/esp32c). This is the default variant | ||
when using Toit on ESP32-C3 boards. | ||
|
||
### esp32s2 | ||
|
||
A generic [ESP32-S2 variant](variants/esp32s2). This is the default variant | ||
when using Toit on ESP32-S2 boards. | ||
|
||
### esp32s3 | ||
|
||
A generic [ESP32-S3 variant](variants/esp32s3). This is the default variant | ||
when using Toit on ESP32-S3 boards. | ||
|
||
This variant is configured for external Quad PSRAM. | ||
|
||
### esp32s3-spiram-octo | ||
|
||
A [variant](variants/esp32s3-spiram-octo/) for ESP32-S3 boards with external | ||
octal PSRAM. | ||
|
||
These boards are faster, but often more expensive. |
Oops, something went wrong.