forked from espressif/esp-idf
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from espressif/release/v4.4
update 22.06.2022
- Loading branch information
Showing
298 changed files
with
6,588 additions
and
6,818 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,75 @@ | ||
name: docker | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'release/*' | ||
tags: | ||
- 'v*.*' | ||
|
||
env: | ||
# Platforms to build the image for | ||
BUILD_PLATFORMS: linux/amd64,linux/arm64 | ||
DOCKERHUB_REPO: ${{ github.repository_owner }}/idf | ||
|
||
jobs: | ||
docker: | ||
# Disable the job in forks | ||
if: ${{ github.repository_owner == 'espressif' }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
# Depending on the branch/tag, set CLONE_BRANCH_OR_TAG variable (used in the Dockerfile | ||
# as a build arg) and TAG_NAME (used when tagging the image). | ||
# | ||
# The following 3 steps cover the alternatives (tag, release branch, master branch): | ||
- name: Set variables (tags) | ||
if: ${{ github.ref_type == 'tag' }} | ||
run: | | ||
echo "CLONE_BRANCH_OR_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV | ||
echo "TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV | ||
- name: Set variables (release branches) | ||
if: ${{ github.ref_type == 'branch' && startsWith(github.ref_name, 'release/') }} | ||
run: | | ||
echo "CLONE_BRANCH_OR_TAG=$GITHUB_REF_NAME" >> $GITHUB_ENV | ||
echo "TAG_NAME=release-${GITHUB_REF_NAME##release/}" >> $GITHUB_ENV | ||
- name: Set variables (main branch) | ||
if: ${{ github.ref_type == 'branch' && github.ref_name == 'master' }} | ||
run: | | ||
echo "CLONE_BRANCH_OR_TAG=master" >> $GITHUB_ENV | ||
echo "TAG_NAME=latest" >> $GITHUB_ENV | ||
# Display the variables set above, just in case. | ||
- name: Check variables | ||
run: | | ||
echo "CLONE_BRANCH_OR_TAG: $CLONE_BRANCH_OR_TAG" | ||
echo "CHECKOUT_REF: $CHECKOUT_REF" | ||
echo "TAG_NAME: $TAG_NAME" | ||
# The following steps are the standard boilerplate from | ||
# https://github.com/marketplace/actions/build-and-push-docker-images | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Set up QEMU for multiarch builds | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: tools/docker | ||
push: true | ||
tags: ${{ env.DOCKERHUB_REPO }}:${{ env.TAG_NAME }} | ||
platforms: ${{ env.BUILD_PLATFORMS }} | ||
build-args: | | ||
IDF_CLONE_URL=${{ github.server_url }}/${{ github.repository }}.git | ||
IDF_CLONE_BRANCH_OR_TAG=${{ env.CLONE_BRANCH_OR_TAG }} |
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
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
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
101 changes: 101 additions & 0 deletions
101
components/bootloader_support/include/bootloader_flash_override.h
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,101 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
#pragma once | ||
|
||
#include "esp_err.h" | ||
#include "esp_attr.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
typedef unsigned (*bootloader_flash_read_status_fn_t)(void); | ||
typedef void (*bootloader_flash_write_status_fn_t)(unsigned); | ||
|
||
typedef struct __attribute__((packed)) | ||
{ | ||
const char *manufacturer; | ||
uint8_t mfg_id; /* 8-bit JEDEC manufacturer ID */ | ||
uint16_t flash_id; /* 16-bit JEDEC flash chip ID */ | ||
uint16_t id_mask; /* Bits to match on in flash chip ID */ | ||
bootloader_flash_read_status_fn_t read_status_fn; | ||
bootloader_flash_write_status_fn_t write_status_fn; | ||
uint8_t status_qio_bit; | ||
} bootloader_qio_info_t; | ||
|
||
/** | ||
* @brief Read 8 bit status using RDSR command | ||
* | ||
* @return Value of SR1. | ||
*/ | ||
unsigned bootloader_read_status_8b_rdsr(void); | ||
|
||
/** | ||
* @brief Read 8 bit status (second byte) using RDSR2 command | ||
* | ||
* @return Value of SR2 | ||
*/ | ||
unsigned bootloader_read_status_8b_rdsr2(void); | ||
|
||
/** | ||
* @brief Read 16 bit status using RDSR & RDSR2 (low and high bytes) | ||
* | ||
* @return Value of SR2#SR1. | ||
*/ | ||
unsigned bootloader_read_status_16b_rdsr_rdsr2(void); | ||
|
||
/** | ||
* @brief Write 8 bit status using WRSR | ||
*/ | ||
void bootloader_write_status_8b_wrsr(unsigned new_status); | ||
|
||
/** | ||
* @brief Write 8 bit status (second byte) using WRSR2. | ||
*/ | ||
void bootloader_write_status_8b_wrsr2(unsigned new_status); | ||
|
||
/** | ||
* @brief Write 16 bit status using WRSR, (both write SR1 and SR2) | ||
*/ | ||
void bootloader_write_status_16b_wrsr(unsigned new_status); | ||
|
||
/** | ||
* @brief Read 8 bit status of XM25QU64A. | ||
* | ||
* @return Value of 8 bit SR. | ||
*/ | ||
unsigned bootloader_read_status_8b_xmc25qu64a(void); | ||
|
||
/** | ||
* @brief Write 8 bit status for XM25QU64A | ||
*/ | ||
void bootloader_write_status_8b_xmc25qu64a(unsigned new_status); | ||
|
||
/* Array of known flash chips and data to enable Quad I/O mode | ||
Manufacturer & flash ID can be tested by running "esptool.py | ||
flash_id" | ||
If manufacturer ID matches, and flash ID ORed with flash ID mask | ||
matches, enable_qio_mode() will execute "Read Cmd", test if bit | ||
number "QIE Bit" is set, and if not set it will call "Write Cmd" | ||
with this bit set. | ||
Searching of this table stops when the first match is found. | ||
*/ | ||
extern const bootloader_qio_info_t __attribute__((weak)) bootloader_flash_qe_support_list[]; | ||
|
||
/** | ||
* @brief Unlock Flash write protect. | ||
* Please do not call this function in SDK. | ||
* | ||
* @note This can be overridden because it's attribute weak. | ||
*/ | ||
esp_err_t IRAM_ATTR __attribute__((weak)) bootloader_flash_unlock(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
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
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
Oops, something went wrong.