chore: update GNU Arm toolchain to 14.2.rel1 (#5263)
Co-authored-by: Malte Langermann <malte@langermann.net> Co-authored-by: philmoz <phil.a.mitchell@gmail.com>
This commit is contained in:
co-authored by
Malte Langermann
philmoz
parent
8b1e9c9e5d
commit
8c5894af83
@@ -1,7 +1,7 @@
|
||||
# arm-none-eabi toolchain
|
||||
set(CMAKE_SYSTEM_NAME Generic)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||
|
||||
|
||||
@@ -115,6 +115,9 @@ endif()
|
||||
|
||||
if(ARCH STREQUAL ARM)
|
||||
include(targets/common/arm/CMakeLists.txt)
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "14.2.1")
|
||||
message(WARNING "Only Arm GNU Toolchain version 14.2.rel1 is supported")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include_directories(targets/${TARGET_DIR} ${THIRDPARTY_DIR})
|
||||
|
||||
@@ -100,7 +100,7 @@ typedef BinAllocator<28,400> BinAllocator_slots1;
|
||||
typedef BinAllocator<92,90> BinAllocator_slots2;
|
||||
#else
|
||||
typedef BinAllocator<28,415> BinAllocator_slots1;
|
||||
typedef BinAllocator<92,100> BinAllocator_slots2;
|
||||
typedef BinAllocator<92,98> BinAllocator_slots2;
|
||||
#endif
|
||||
#else
|
||||
typedef BinAllocator<28,200> BinAllocator_slots1;
|
||||
|
||||
@@ -82,7 +82,7 @@ const etx_serial_port_t auxSerialPort = {
|
||||
.name = "AUX1",
|
||||
.uart = &STM32SerialDriver,
|
||||
.hw_def = REF_STM32_SERIAL_PORT(Aux),
|
||||
AUX_PWR_FCT
|
||||
.set_pwr = AUX_PWR_FCT
|
||||
};
|
||||
#define AUX_SERIAL_PORT &auxSerialPort
|
||||
#else
|
||||
@@ -121,7 +121,7 @@ const etx_serial_port_t aux2SerialPort = {
|
||||
.name = "AUX2",
|
||||
.uart = &STM32SerialDriver,
|
||||
.hw_def = REF_STM32_SERIAL_PORT(Aux2),
|
||||
AUX2_PWR_FCT
|
||||
.set_pwr = AUX2_PWR_FCT
|
||||
};
|
||||
#define AUX2_SERIAL_PORT &aux2SerialPort
|
||||
#else
|
||||
|
||||
@@ -115,25 +115,25 @@ struct YamlNode
|
||||
.tag=(str)
|
||||
|
||||
#define YAML_IDX \
|
||||
{ .size=0, .type=YDT_IDX, 0, YAML_TAG("idx") }
|
||||
{ .size=0, .type=YDT_IDX, .elmts=0, YAML_TAG("idx") }
|
||||
|
||||
#define YAML_IDX_CUST(tag, f_read, f_write) \
|
||||
{ .size=0, .type=YDT_IDX, 0, YAML_TAG(tag), .u={._cust_idx={.read=(f_read), .write=(f_write) }} }
|
||||
{ .size=0, .type=YDT_IDX, .elmts=0, YAML_TAG(tag), .u={._cust_idx={.read=(f_read), .write=(f_write) }} }
|
||||
|
||||
#define YAML_SIGNED(tag, bits) \
|
||||
{ .size=(bits), .type=YDT_SIGNED, 0, YAML_TAG(tag) }
|
||||
{ .size=(bits), .type=YDT_SIGNED, .elmts=0, YAML_TAG(tag) }
|
||||
|
||||
#define YAML_UNSIGNED(tag, bits) \
|
||||
{ .size=(bits), .type=YDT_UNSIGNED, 0, YAML_TAG(tag) }
|
||||
{ .size=(bits), .type=YDT_UNSIGNED, .elmts=0, YAML_TAG(tag) }
|
||||
|
||||
#define YAML_SIGNED_CUST(tag, bits, f_cust_to_uint, f_uint_to_cust) \
|
||||
{ .size=(bits), .type=YDT_SIGNED, 0, YAML_TAG(tag), .u={._cust={ .cust_to_uint=f_cust_to_uint, .uint_to_cust=f_uint_to_cust }} }
|
||||
{ .size=(bits), .type=YDT_SIGNED, .elmts=0, YAML_TAG(tag), .u={._cust={ .cust_to_uint=f_cust_to_uint, .uint_to_cust=f_uint_to_cust }} }
|
||||
|
||||
#define YAML_UNSIGNED_CUST(tag, bits, f_cust_to_uint, f_uint_to_cust) \
|
||||
{ .size=(bits), .type=YDT_UNSIGNED, 0, YAML_TAG(tag), .u={._cust={ .cust_to_uint=f_cust_to_uint, .uint_to_cust=f_uint_to_cust }} }
|
||||
{ .size=(bits), .type=YDT_UNSIGNED, .elmts=0, YAML_TAG(tag), .u={._cust={ .cust_to_uint=f_cust_to_uint, .uint_to_cust=f_uint_to_cust }} }
|
||||
|
||||
#define YAML_STRING(tag, max_len) \
|
||||
{ .size=((max_len)<<3), .type=YDT_STRING, 0, YAML_TAG(tag) }
|
||||
{ .size=((max_len)<<3), .type=YDT_STRING, .elmts=0, YAML_TAG(tag) }
|
||||
|
||||
#define YAML_STRUCT(tag, bits, nodes, f_is_active) \
|
||||
{ .size=(bits), .type=YDT_ARRAY, .elmts=1, YAML_TAG(tag), .u={._array={ .child=(nodes), .u={.is_active=(f_is_active)}}} }
|
||||
@@ -142,16 +142,16 @@ struct YamlNode
|
||||
{ .size=(bits), .type=YDT_ARRAY, .elmts=(max_elmts), YAML_TAG(tag), .u={._array={ .child=(nodes), .u={.is_active=(f_is_active)}}} }
|
||||
|
||||
#define YAML_ENUM(tag, bits, id_strs) \
|
||||
{ .size=(bits), .type=YDT_ENUM, 0, YAML_TAG(tag), .u={._enum={ .choices=(id_strs) }} }
|
||||
{ .size=(bits), .type=YDT_ENUM, .elmts=0, YAML_TAG(tag), .u={._enum={ .choices=(id_strs) }} }
|
||||
|
||||
#define YAML_UNION(tag, bits, nodes, f_sel_m) \
|
||||
{ .size=(bits), .type=YDT_UNION, 0, YAML_TAG(tag), .u={._array={ .child=(nodes), .u={.select_member=(f_sel_m) }}} }
|
||||
{ .size=(bits), .type=YDT_UNION, .elmts=0, YAML_TAG(tag), .u={._array={ .child=(nodes), .u={.select_member=(f_sel_m) }}} }
|
||||
|
||||
#define YAML_PADDING(bits) \
|
||||
{ .size=(bits), .type=YDT_PADDING }
|
||||
|
||||
#define YAML_CUSTOM(tag, f_read, f_write) \
|
||||
{ .size=0, .type=YDT_CUSTOM, 0, YAML_TAG(tag), .u={._cust_attr={.read=(f_read), .write=(f_write) }} }
|
||||
{ .size=0, .type=YDT_CUSTOM, .elmts=0, YAML_TAG(tag), .u={._cust_attr={.read=(f_read), .write=(f_write) }} }
|
||||
|
||||
#define YAML_END \
|
||||
{ .size=0, .type=YDT_NONE }
|
||||
@@ -170,22 +170,22 @@ struct YamlNode
|
||||
(str)
|
||||
|
||||
#define YAML_IDX \
|
||||
{ 0, YDT_IDX, 0, YAML_TAG("idx") }
|
||||
{ 0, YDT_IDX, .elmts=0, YAML_TAG("idx") }
|
||||
|
||||
#define YAML_SIGNED(tag, bits) \
|
||||
{ (bits), YDT_SIGNED, 0, YAML_TAG(tag) }
|
||||
{ (bits), YDT_SIGNED, .elmts=0, YAML_TAG(tag) }
|
||||
|
||||
#define YAML_UNSIGNED(tag, bits) \
|
||||
{ (bits), YDT_UNSIGNED, 0, YAML_TAG(tag) }
|
||||
{ (bits), YDT_UNSIGNED, .elmts=0, YAML_TAG(tag) }
|
||||
|
||||
#define YAML_SIGNED_CUST(tag, bits, f_cust_to_uint, f_uint_to_cust) \
|
||||
{ (bits), YDT_SIGNED, 0, YAML_TAG(tag), {{ (const YamlNode*)f_cust_to_uint, {{ (YamlNode::is_active_func)f_uint_to_cust, 0 }}}} }
|
||||
{ (bits), YDT_SIGNED, .elmts=0, YAML_TAG(tag), {{ (const YamlNode*)f_cust_to_uint, {{ (YamlNode::is_active_func)f_uint_to_cust, 0 }}}} }
|
||||
|
||||
#define YAML_UNSIGNED_CUST(tag, bits, f_cust_to_uint, f_uint_to_cust) \
|
||||
{ (bits), YDT_UNSIGNED, 0, YAML_TAG(tag), {{ (const YamlNode*)f_cust_to_uint, {{ (YamlNode::is_active_func)f_uint_to_cust, 0}}}} }
|
||||
{ (bits), YDT_UNSIGNED, .elmts=0, YAML_TAG(tag), {{ (const YamlNode*)f_cust_to_uint, {{ (YamlNode::is_active_func)f_uint_to_cust, 0}}}} }
|
||||
|
||||
#define YAML_STRING(tag, max_len) \
|
||||
{ ((max_len)<<3), YDT_STRING, 0, YAML_TAG(tag) }
|
||||
{ ((max_len)<<3), YDT_STRING, .elmts=0, YAML_TAG(tag) }
|
||||
|
||||
#define YAML_STRUCT(tag, bits, nodes, f_is_active) \
|
||||
{ (bits), YDT_ARRAY, 1, YAML_TAG(tag), {{ (nodes), {{ (f_is_active) }}}} }
|
||||
@@ -194,10 +194,10 @@ struct YamlNode
|
||||
{ (bits), YDT_ARRAY, (max_elmts), YAML_TAG(tag), {{ (nodes), {{ (f_is_active) }}}} }
|
||||
|
||||
#define YAML_ENUM(tag, bits, id_strs) \
|
||||
{ (bits), YDT_ENUM, 0, YAML_TAG(tag), {{ (const YamlNode*)(id_strs) }} }
|
||||
{ (bits), YDT_ENUM, .elmts=0, YAML_TAG(tag), {{ (const YamlNode*)(id_strs) }} }
|
||||
|
||||
#define YAML_UNION(tag, bits, nodes, f_sel_m) \
|
||||
{ (bits), YDT_UNION, 0, YAML_TAG(tag), {{ (nodes), {{ (YamlNode::is_active_func)(f_sel_m) }}}} }
|
||||
{ (bits), YDT_UNION, .elmts=0, YAML_TAG(tag), {{ (nodes), {{ (YamlNode::is_active_func)(f_sel_m) }}}} }
|
||||
|
||||
#define YAML_PADDING(bits) \
|
||||
{ (bits), YDT_PADDING }
|
||||
|
||||
@@ -134,3 +134,11 @@ extern void _kill(int pid, int sig)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
extern void __assert_func (const char *p1, int p2, const char *p3, const char *p4)
|
||||
{
|
||||
asm("BKPT");
|
||||
#if defined(DEBUG)
|
||||
while(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -14,20 +14,43 @@ do
|
||||
done
|
||||
|
||||
echo "=== Step $((STEP++)): Installing packages ==="
|
||||
pacman -S --noconfirm mingw-w64-x86_64-cmake mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-pillow mingw-w64-x86_64-python-lz4 mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-zlib mingw-w64-x86_64-libtiff mingw-w64-x86_64-freetype mingw-w64-x86_64-lcms2 mingw-w64-x86_64-libwebp mingw-w64-x86_64-openjpeg2 mingw-w64-x86_64-libimagequant mingw-w64-x86_64-libraqm mingw-w64-x86_64-SDL2 mingw-w64-x86_64-nsis mingw-w64-x86_64-clang mingw-w64-x86_64-openssl
|
||||
pacman -S --noconfirm mingw-w64-x86_64-cmake mingw-w64-x86_64-python-pip mingw-w64-x86_64-python-pillow mingw-w64-x86_64-python-lz4 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-zlib mingw-w64-x86_64-libtiff mingw-w64-x86_64-freetype mingw-w64-x86_64-lcms2 mingw-w64-x86_64-libwebp mingw-w64-x86_64-openjpeg2 mingw-w64-x86_64-libimagequant mingw-w64-x86_64-libraqm mingw-w64-x86_64-SDL2 mingw-w64-x86_64-nsis mingw-w64-x86_64-clang mingw-w64-x86_64-openssl unzip wget
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Downloading GNU Arm Embedded Toolchain ==="
|
||||
wget https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-mingw-w64-i686-arm-none-eabi.zip
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Installing GNU Arm Embedded Toolchain ==="
|
||||
unzip arm-gnu-toolchain-14.2.rel1-mingw-w64-i686-arm-none-eabi.zip -d gcc-arm-none-eabi
|
||||
rm arm-gnu-toolchain-14.2.rel1-mingw-w64-i686-arm-none-eabi.zip
|
||||
mv gcc-arm-none-eabi/ /opt/gcc-arm-none-eabi
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Adding GNU Arm Embedded Toolchain to PATH of current user ==="
|
||||
echo 'export PATH="/opt/gcc-arm-none-eabi/bin:$PATH"' >> ~/.bashrc
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Installing Python clang ==="
|
||||
python -m pip install clang
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
echo "=== Step $((STEP++)): Installing Python jinja2 ==="
|
||||
|
||||
echo "=== Step $((STEP++)): Installing Python jinja2 ==="
|
||||
python -m pip install jinja2
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please check the output above and press Enter to continue or Ctrl+C to stop."
|
||||
|
||||
@@ -56,29 +56,29 @@ if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Fetching GNU Arm Embedded Toolchains ==="
|
||||
# EdgeTX uses GNU Arm Embedded Toolchain in version 10-2020-q4
|
||||
wget -q --show-progress --progress=bar:force:noscroll https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
||||
# EdgeTX uses GNU Arm Embedded Toolchain version 14.2.rel1
|
||||
wget -q --show-progress --progress=bar:force:noscroll https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Unpacking GNU Arm Embedded Toolchains ==="
|
||||
pv gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 | tar xjf -
|
||||
pv arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz | tar xJf -
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Removing the downloaded archives ==="
|
||||
rm gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
||||
rm arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Moving GNU Arm Embedded Toolchains to /opt ==="
|
||||
sudo mv gcc-arm-none-eabi-10-2020-q4-major /opt/gcc-arm-none-eabi
|
||||
sudo mv arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi /opt/gcc-arm-none-eabi
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
|
||||
@@ -56,29 +56,29 @@ if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Fetching GNU Arm Embedded Toolchains ==="
|
||||
# EdgeTX uses GNU Arm Embedded Toolchain in version 10-2020-q4
|
||||
wget -q --show-progress --progress=bar:force:noscroll https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
||||
# EdgeTX uses GNU Arm Embedded Toolchain version 14.2.rel1
|
||||
wget -q --show-progress --progress=bar:force:noscroll https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Unpacking GNU Arm Embedded Toolchains ==="
|
||||
pv gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 | tar xjf -
|
||||
pv arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz | tar xJf -
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Removing the downloaded archives ==="
|
||||
rm gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
||||
rm arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi.tar.xz
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
fi
|
||||
|
||||
echo "=== Step $((STEP++)): Moving GNU Arm Embedded Toolchains to /opt ==="
|
||||
sudo mv gcc-arm-none-eabi-10-2020-q4-major /opt/gcc-arm-none-eabi
|
||||
sudo mv arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi /opt/gcc-arm-none-eabi
|
||||
if [[ $PAUSEAFTEREACHLINE == "true" ]]; then
|
||||
echo "Step finished. Please press Enter to continue or Ctrl+C to stop."
|
||||
read
|
||||
|
||||
Reference in New Issue
Block a user