Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exports were not properly working for esp32c3 #111

Merged
merged 4 commits into from
Jul 18, 2022
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
4 changes: 4 additions & 0 deletions .github/workflows/installer-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.rust-build-branch }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build
- name: Install toolchain
run: |
bash install-rust-toolchain.sh \
Expand Down
3 changes: 1 addition & 2 deletions idf-rust.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG CONTAINER_USER=esp
ARG CONTAINER_GROUP=esp
ARG NIGHTLY_TOOLCHAIN_VERSION=nightly
ARG XTENSA_TOOLCHAIN_VERSION=1.62.0.0
ARG ESP_IDF_VERSION=release/v4.4
ARG ESP_IDF_VERSION=""
ARG ESP_BOARD=esp32,esp32s2,esp32s3
ARG INSTALL_RUST_TOOLCHAIN=install-rust-toolchain.sh
# Install dependencies
Expand All @@ -29,7 +29,6 @@ ADD --chown=${CONTAINER_USER}:${CONTAINER_GROUP} \
RUN chmod a+x ${INSTALL_RUST_TOOLCHAIN} \
&& ./${INSTALL_RUST_TOOLCHAIN} \
--extra-crates "ldproxy cargo-espflash cargo-generate" \
--clear-cache "YES" \
--build-target "${ESP_BOARD}" \
--nightly-version "${NIGHTLY_TOOLCHAIN_VERSION}" \
--esp-idf-version "${ESP_IDF_VERSION}" \
Expand Down
18 changes: 11 additions & 7 deletions install-rust-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -603,21 +603,25 @@ elif grep -q "bash" <<<"$SHELL"; then
PROFILE_NAME=~/.bashrc
fi
echo "Add following command to $PROFILE_NAME"
if [ -z "${ESP_IDF_VERSION}" ]; then
echo export PATH=\"${IDF_TOOL_GCC_PATH}:\$PATH\"
echo export LIBCLANG_PATH=\"${IDF_TOOL_XTENSA_ELF_CLANG}/lib/\"
else
if [ ${IS_XTENSA_INSTALLED} -eq 1 ]; then
echo export LIBCLANG_PATH=\"${IDF_TOOL_XTENSA_ELF_CLANG}/lib/\" >>"${EXPORT_FILE}"
fi
if [ -n "${ESP_IDF_VERSION}" ]; then
echo "export IDF_TOOLS_PATH=${IDF_TOOLS_PATH}"
echo "source ${IDF_PATH}/export.sh"
else
echo export PATH=\"${IDF_TOOL_GCC_PATH}:\$PATH\"
fi

# Store export instructions in the file
if [[ ! -z "${EXPORT_FILE}" ]]; then
if [ -z "${ESP_IDF_VERSION}" ]; then
echo export PATH=\"${IDF_TOOL_GCC_PATH}:\$PATH\" >"${EXPORT_FILE}"
if [ ${IS_XTENSA_INSTALLED} -eq 1 ]; then
echo export LIBCLANG_PATH=\"${IDF_TOOL_XTENSA_ELF_CLANG}/lib/\" >>"${EXPORT_FILE}"
else
fi
if [ -n "${ESP_IDF_VERSION}" ]; then
echo "export IDF_TOOLS_PATH=${IDF_TOOLS_PATH}" >>"${EXPORT_FILE}"
echo "source ${IDF_PATH}/export.sh /dev/null 2>&1" >>"${EXPORT_FILE}"
else
echo export PATH=\"${IDF_TOOL_GCC_PATH}:\$PATH\" >"${EXPORT_FILE}"
fi
fi