Skip to content

Commit

Permalink
STM32Cube platform change only: build with ARM GCC 13.2.1.
Browse files Browse the repository at this point in the history
The STM32Cube platform is now built/tested with ARM GCC version 13.2.1.

Test: 14 16 19 30
  • Loading branch information
RobMeades committed Jun 25, 2024
1 parent 8f42ef2 commit a8603c0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions port/platform/common/automation/u_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ nrfconnectsdk:

arm_embedded_gcc:
type: archive
version: 10-2020-q4-major
version: 13.2.rel1
skip_first_subdir: True
windows:
url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-win32.zip
url: https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip
linux:
url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
url: https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
linux_arm:
url: https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-aarch64-linux.tar.bz2
url: https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz

openocd:
type: archive
Expand Down
7 changes: 5 additions & 2 deletions port/platform/stm32cube/mcu/stm32f4/runner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ override CFLAGS += \
$(DEFINES) -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -std=gnu11 -g3 -O0 -Wall \
-ffunction-sections -fdata-sections -fstack-usage --specs=nano.specs -MMD -MP $(U_FLAGS)

# Note: the --no-warn-rwx-segments suppression was added in moving from
# GCC ARM "10-2020-q4-major" to "13.2.rel1" as the behaviour of the linker
# file is outside our control
override LDFLAGS += \
-mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -static -T"$(PLATFORM_PATH)/app/STM32F437VGTX_FLASH.ld" \
-Wl,-Map="$(OUTPUT_DIRECTORY)/runner.map" -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=_malloc_r -Wl,--wrap=calloc \
-Wl,--wrap=_calloc_r -Wl,--wrap=realloc -Wl,--wrap=_realloc_r --specs=nano.specs -Wl,--start-group -lc -lm -Wl,--end-group \
-Wl,--undefined=uxTopUsedPriority

-Wl,--undefined=uxTopUsedPriority \
-Wl,--no-warn-rwx-segments

# STM32 HAL
STM32CUBE_FW_SRC += \
Expand Down
5 changes: 3 additions & 2 deletions port/platform/stm32cube/src/heap_useNewlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
#include <stddef.h>

#include "newlib.h"
#if (__NEWLIB__ != 3) || (__NEWLIB_MINOR__ != 3)
#warning "This wrapper was verified for newlib version 3.3.0; please ensure newlib's external requirements for malloc-family are unchanged!"
#if ((__NEWLIB__ != 3) || ((__NEWLIB_MINOR__ != 0) && (__NEWLIB_MINOR__ != 1) && (__NEWLIB_MINOR__ != 3))) && \
((__NEWLIB__ != 4) || (__NEWLIB_MINOR__ != 3))
#warning "This wrapper was verified for newlib versions 3.0.0, 3.1.0, 3.3.0 and 4.3.0; please ensure newlib's external requirements for malloc-family are unchanged!"
#endif

#include "FreeRTOS.h" // defines public interface we're implementing here
Expand Down

0 comments on commit a8603c0

Please sign in to comment.