Skip to content
Open
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ CFLAGS_BASE += -Wall -Wundef -Wextra -Werror -Wno-unused-parameter -Wno-stringop
CFLAGS_COMMON := $(CFLAGS_BASE)

# Linker options
LDFLAGS_COMMON := -specs=nano.specs $(LIBS) -Wl,--gc-sections -Wl,--print-memory-usage
LDFLAGS_COMMON := -specs=nano.specs $(LIBS) -Wl,--gc-sections -Wl,--print-memory-usage -Wl,--no-warn-rwx-segments

# Search source files
SRC_COMMON := $(foreach dir,$(SRC_DIRS_COMMON),$(wildcard $(dir)/*.[cs]))
Expand Down
8 changes: 8 additions & 0 deletions Src/dummy_syscalls.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
dummy system calls to avoid linker errors with gcc 14.x
*/

int _close_r(void) { return -1; }
int _lseek_r(void) { return -1; }
int _read_r(void) { return -1; }
int _write_r(void) { return -1; }
4 changes: 4 additions & 0 deletions Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,9 @@ static void checkDeviceInfo(void)
#define DEVINFO_MAGIC1 0x5925e3da
#define DEVINFO_MAGIC2 0x4eb863d9

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"

const struct devinfo {
uint32_t magic1;
uint32_t magic2;
Expand All @@ -1614,6 +1617,7 @@ static void checkDeviceInfo(void)
break;
}

#pragma GCC diagnostic pop
// TODO: check pin code and reboot to bootloader if incorrect

}
Expand Down
7 changes: 4 additions & 3 deletions make/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
#
###############################################################

GCC_VERSION:=14.2.1-1.1

ifeq ($(OS),Windows_NT)
ARM_SDK_PREFIX:=tools/windows/xpack-arm-none-eabi-gcc-10.3.1-2.3/bin/arm-none-eabi-
ARM_SDK_PREFIX:=tools/windows/xpack-arm-none-eabi-gcc-$(GCC_VERSION)/bin/arm-none-eabi-
SHELL:=cmd.exe
CP:=tools\\windows\\make\\bin\\cp
DSEP:=\\
Expand All @@ -20,7 +21,7 @@ else
# MacOS and Linux
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
ARM_SDK_PREFIX:=tools/macos/xpack-arm-none-eabi-gcc-10.3.1-2.3/bin/arm-none-eabi-
ARM_SDK_PREFIX:=tools/macos/xpack-arm-none-eabi-gcc-$(GCC_VERSION)/bin/arm-none-eabi-
CP:=cp
DSEP:=/
NUL:=/dev/null
Expand All @@ -30,7 +31,7 @@ CUT:=cut
FGREP:=fgrep
else
# assume Linux
ARM_SDK_PREFIX:=tools/linux/xpack-arm-none-eabi-gcc-10.3.1-2.3/bin/arm-none-eabi-
ARM_SDK_PREFIX:=tools/linux/xpack-arm-none-eabi-gcc-$(GCC_VERSION)/bin/arm-none-eabi-
CP:=cp
DSEP:=/
NUL:=/dev/null
Expand Down
Loading