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

dist/tools/esptools: upgrade ESP32x toolchains to GCC version 12.2 #19452

Conversation

gschorcht
Copy link
Contributor

Contribution description

This PR upgrades ESP32x toolchains to GCC version 12.2 which is a prerequisite for upgrading the ESP-IDF to version 5.1.

This PR depends on PR #19450

Testing procedure

dist/tools/install.sh all should install all ESP32x toolchains.
. dist/tools/export.sh all should make them visible.

Issues/PRs references

Depends on PR #19450

@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: tools Area: Supplementary tools Platform: ESP Platform: This PR/issue effects ESP-based platforms labels Apr 4, 2023
@gschorcht gschorcht force-pushed the dist/tools/esptools/bump_gcc_to_version_gcc_12_2 branch from 4669023 to 4ead466 Compare May 2, 2023 15:48
@gschorcht gschorcht added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels May 11, 2023
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Please fix and squash the CI nitpicks (see inline comments) prior merge.

echo "error: Unknown platform $1, use xtensa or riscv"
return
esac

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

esac

GDB_VERSION="12.1_20221002"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

GDB_VERSION="12.1_20221002"

TOOLS_DIR=${TOOLS_PATH}/${GDB_ARCH}/${GDB_VERSION}/${GDB_ARCH}
TOOLS_DIR_IN_PATH=`echo $PATH | grep ${TOOLS_DIR}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TOOLS_DIR_IN_PATH=`echo $PATH | grep ${TOOLS_DIR}`
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"

TOOLS_DIR=${TOOLS_PATH}/${GDB_ARCH}/${GDB_VERSION}/${GDB_ARCH}
TOOLS_DIR_IN_PATH=`echo $PATH | grep ${TOOLS_DIR}`

if [ -e ${TOOLS_DIR} ] && [ -z ${TOOLS_DIR_IN_PATH} ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [ -e ${TOOLS_DIR} ] && [ -z ${TOOLS_DIR_IN_PATH} ]; then
if [ -e "${TOOLS_DIR}" ] && [ -z "${TOOLS_DIR_IN_PATH}" ]; then


if [ -e ${TOOLS_DIR} ] && [ -z ${TOOLS_DIR_IN_PATH} ]; then
echo "Extending PATH by ${TOOLS_DIR}/bin"
export PATH=${TOOLS_DIR}/bin:${PATH}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export PATH=${TOOLS_DIR}/bin:${PATH}
export PATH="${TOOLS_DIR}/bin:${PATH}"


unset TOOLS_DIR
}

if [ -z $1 ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if [ -z $1 ]; then
if [ -z "$1" ]; then

echo "tool = all | esp32 | esp32c3 | esp32s2 | esp32s3 | openocd | qemu"
echo " export.sh gdb <platform>"
echo "<tool> = all | esp32 | esp32c3 | esp32s2 | esp32s3 | gdb | openocd | qemu"
echo "<platform> = xtensa | riscv"
elif [ "$1" = "all" ]; then
ARCH_ALL="esp32 esp32c3 esp32s2 esp32s3"
for arch in ${ARCH_ALL}; do
export_arch $arch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export_arch $arch
export_arch "$arch"

echo "platform required: xtensa | riscv"
exit 1
fi
export_gdb $2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export_gdb $2
export_gdb "$2"

echo "error: Unknown platform $1, use xtensa or riscv"
exit 1
esac

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

esac

GDB_VERSION="12.1_20221002"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@riot-ci
Copy link

riot-ci commented May 11, 2023

Murdock results

✔️ PASSED

a83d5ba dist/tools/esptool: set --retry for curl in install.sh for stability

Success Failures Total Runtime
1 0 1 56s

Artifacts

Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI still has more nitpicks :-/

Please squash at will

TOOLS_DIR=${TOOLS_PATH}/${TARGET_ARCH}/${ESP32_GCC_RELEASE}-${ESP32_GCC_VERSION_DIR}/${TARGET_ARCH}
TOOLS_DIR_IN_PATH=`echo $PATH | grep ${TOOLS_DIR}`
TOOLS_DIR="${TOOLS_PATH}/${TARGET_ARCH}/${ESP32_GCC_RELEASE}/${TARGET_ARCH}"
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
TOOLS_DIR_IN_PATH="$(echo "$PATH" | grep "${TOOLS_DIR}")"

TOOLS_DIR_IN_PATH=`echo $PATH | grep ${TOOLS_DIR}`
OPENOCD_DIR=${TOOLS_DIR}/openocd-esp32
TOOLS_DIR="${TOOLS_PATH}/openocd-esp32/${ESP32_OPENOCD_VERSION}"
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
TOOLS_DIR_IN_PATH="$(echo "$PATH" | grep "${TOOLS_DIR}")"

TOOLS_DIR=${TOOLS_PATH}/qemu-esp32/${ESP32_QEMU_VERSION}/qemu
TOOLS_DIR_IN_PATH=`echo $PATH | grep ${TOOLS_DIR}`
TOOLS_DIR="${TOOLS_PATH}/qemu-esp32/${ESP32_QEMU_VERSION}/qemu"
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
TOOLS_DIR_IN_PATH="$(echo "$PATH" | grep "${TOOLS_DIR}")"

GDB_VERSION="12.1_20221002"

TOOLS_DIR="${TOOLS_PATH}/${GDB_ARCH}/${GDB_VERSION}/${GDB_ARCH}"
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
TOOLS_DIR_IN_PATH="$(echo "$PATH" | grep "${TOOLS_DIR}")"

GDB_VERSION="12.1_20221002"

TOOLS_DIR="${TOOLS_PATH}/${GDB_ARCH}/${GDB_VERSION}/${GDB_ARCH}"
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
TOOLS_DIR_IN_PATH="$(echo "$PATH" | grep "${TOOLS_DIR}")"

GDB_VERSION="12.1_20221002"

TOOLS_DIR="${TOOLS_PATH}/${GDB_ARCH}/${GDB_VERSION}/${GDB_ARCH}"
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TOOLS_DIR_IN_PATH="$(echo $PATH | grep "${TOOLS_DIR}")"
TOOLS_DIR_IN_PATH="$(echo "$PATH" | grep "${TOOLS_DIR}")"

@benpicco
Copy link
Contributor

benpicco commented Jul 25, 2023

I think we can merge this now if static tests are satisfied.
Please squash directly.

@gschorcht gschorcht force-pushed the dist/tools/esptools/bump_gcc_to_version_gcc_12_2 branch from 53b7ebb to a83d5ba Compare July 25, 2023 21:42
@MrKevinWeiss
Copy link
Contributor

I tested all apps on the esp32-wroom-32 with the new toolchain and everything related to the toolchain passed, since we already have an ACK we can go I guess.

@MrKevinWeiss
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented Aug 1, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 576731c into RIOT-OS:master Aug 1, 2023
25 checks passed
@gschorcht gschorcht deleted the dist/tools/esptools/bump_gcc_to_version_gcc_12_2 branch September 10, 2023 11:18
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.10 milestone Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Platform: ESP Platform: This PR/issue effects ESP-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants