Skip to content

Commit a16e2e8

Browse files
authored
Merge pull request #912 from bigbrett/tc3-toolchain-support
Expand TC3xx toolchain support
2 parents eb710fe + dd7a5d7 commit a16e2e8

8 files changed

Lines changed: 237 additions & 25 deletions

File tree

‎Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ ifeq ($(USE_GCC_HEADLESS),1)
275275
# (.varname, not .bss.varname) that escape the iLLD linker script's
276276
# clear/copy tables, leaving statics uninitialized at boot.
277277
CFLAGS+=-ffunction-sections -fomit-frame-pointer
278+
else ifeq ($(TARGET)-$(GCC),aurix_tc3xx-1)
279+
# Same as above for the TC3xx host built with tricore-elf-gcc (GCC=1)
280+
CFLAGS+=-ffunction-sections -fomit-frame-pointer
278281
else
279282
CFLAGS+=-ffunction-sections -fdata-sections -fomit-frame-pointer
280283
endif

‎arch.mk‎

Lines changed: 128 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,7 +2394,25 @@ endif
23942394
ifeq ($(ARCH), AURIX)
23952395
# TC3xx HSM and host cores
23962396
ifneq (,$(filter aurix_tc3xx aurix_tc3xx_hsm,$(TARGET)))
2397-
USE_GCC?=1
2397+
# Toolchain selection (mutually exclusive, HT_GCC is the default),
2398+
# matching the wolfHSM tc3xx tchsm-server/tchsm-client Makefiles:
2399+
# HT_GCC=1 HighTec GCC (Tricore host; ARM arm-elf-gcc for the HSM)
2400+
# HT_LLVM=1 HighTec LLVM/clang (Tricore or ARM)
2401+
# GCC=1 Open-source GCC (tricore-elf; arm-none-eabi for the HSM)
2402+
ifneq ($(filter-out 0 1,$(words $(filter 1,$(GCC) $(HT_GCC) $(HT_LLVM)))),)
2403+
$(error GCC, HT_GCC, and HT_LLVM are mutually exclusive; set only one)
2404+
endif
2405+
ifneq ($(filter 1,$(USE_CLANG) $(USE_ARMCLANG)),)
2406+
$(error Use HT_LLVM=1 for AURIX clang builds, not USE_CLANG/USE_ARMCLANG)
2407+
endif
2408+
ifeq ($(GCC),1)
2409+
USE_GCC:=1
2410+
else ifeq ($(HT_LLVM),1)
2411+
USE_GCC:=0
2412+
else
2413+
HT_GCC:=1
2414+
USE_GCC:=1
2415+
endif
23982416

23992417
CFLAGS += -I$(TC3_DIR) -Ihal
24002418

@@ -2407,6 +2425,14 @@ ifeq ($(ARCH), AURIX)
24072425
-std=gnu99 -DPART_BOOT_EXT -DPART_UPDATE_EXT -DPART_SWAP_EXT \
24082426
-DHAVE_TC3XX -DWOLFBOOT_LOADER_MAIN
24092427

2428+
ifeq ($(HT_GCC),1)
2429+
# Older HT GCC 4.6 flags designated/partial initializers
2430+
CFLAGS += -Wno-missing-field-initializers
2431+
# Older HT GCC 4.6 also flags WOLFBOOT_HDR_GET_U32() on byte arrays as
2432+
# type-punning
2433+
CFLAGS += -Wno-strict-aliasing
2434+
endif
2435+
24102436
# Set TC3_CFG_DFLASH_SINGLE_ENDED=1 for devices with DFLASH provisioned in single
24112437
# ended mode (default expects complement sensing)
24122438
ifeq ($(TC3_CFG_DFLASH_SINGLE_ENDED),1)
@@ -2452,11 +2478,37 @@ ifeq ($(ARCH), AURIX)
24522478
ifeq ($(TARGET), aurix_tc3xx_hsm)
24532479
# HSM core (ARM Cortex-M3)
24542480
ARCH_FLASH_OFFSET?=0x80028000
2455-
# HSM compiler flags, build options, source code, etc
2456-
ifeq ($(USE_GCC),1)
2457-
# Just arm-none-eabi-gcc for now
2481+
2482+
# wolfHSM server ECC configs use hardware-only ECC via the PKC crypto
2483+
# callback. Cert manager uses INVALID_DEVID for signature checks so register
2484+
# a find callback to ensure these use HW acceleration as well.
2485+
ifeq ($(WOLFHSM_SERVER),1)
2486+
ifneq (,$(filter ECC%,$(SIGN)))
2487+
# if SIGN==ECC
2488+
CFLAGS+=-DWOLF_CRYPTO_CB_ONLY_ECC -DWOLF_CRYPTO_CB_FIND
2489+
endif
2490+
endif
2491+
2492+
ifeq ($(GCC),1)
2493+
# Open-source ARM GCC
24582494
CROSS_COMPILE?=arm-none-eabi-
2495+
else ifeq ($(HT_LLVM),1)
2496+
# HighTec ARM LLVM (clang + lld + picolibc)
2497+
HT_ARM_PATH?=$(HOME)/HighTec/toolchains/arm/v10.0.0
2498+
CC=$(HT_ARM_PATH)/bin/clang
2499+
LD=$(CC)
2500+
AS=$(CC)
2501+
AR=$(HT_ARM_PATH)/bin/llvm-ar
2502+
OBJCOPY=$(HT_ARM_PATH)/bin/llvm-objcopy
2503+
SIZE=$(HT_ARM_PATH)/bin/llvm-size
2504+
# clang applies warning flags positionally, so skip the main
2505+
# Makefile's late USE_GCC_HEADLESS -Wall/-Wextra block (it would
2506+
# re-enable warnings suppressed above)
2507+
USE_GCC_HEADLESS:=0
24592508
else
2509+
# HighTec ARM GCC (the default)
2510+
HT_ARM_GCC_PATH?=/opt/hightec/gnuarm_v4.6.5.1-3b75921-lin64
2511+
CROSS_COMPILE?=$(HT_ARM_GCC_PATH)/bin/arm-elf-
24602512
endif
24612513

24622514
# Compiler flags
@@ -2478,13 +2530,52 @@ ifeq ($(ARCH), AURIX)
24782530
# Temporary fix masking wolfCrypt unused function warning with RSA_LOW_MEM
24792531
CFLAGS += -Wno-unused-function
24802532

2533+
ifeq ($(HT_LLVM),1)
2534+
# gnu11 overrides the earlier gnu99: clang rejects wolfSSL's typedef
2535+
# redefinitions under C99. clang also lacks GCC's per-function
2536+
# optimize attribute used by WC_OMIT_FRAME_POINTER, so define it
2537+
# empty and omit frame pointers globally (required for SP inline ASM)
2538+
CFLAGS += -std=gnu11 -fomit-frame-pointer -DWC_OMIT_FRAME_POINTER=
2539+
# picolibc stdio calls the POSIX fd functions (write etc.) and the
2540+
# port's syscalls.c provides them on top of __io_putchar
2541+
OBJS += $(WOLFHSM_INFINEON_TC3XX)/port/server/syscalls.o
2542+
endif
2543+
24812544
LDFLAGS += -march=armv7-m -mcpu=cortex-m3 -mthumb -mlittle-endian -g \
2482-
--specs=nano.specs -Wl,--gc-sections -static -Wl,--cref -Wl,-n \
2545+
-Wl,--gc-sections -static -Wl,--cref -Wl,-n \
24832546
-ffunction-sections -fdata-sections \
24842547
-nostartfiles \
24852548
-Wl,-Map="wolfboot.map" \
24862549
-Wl,-L$(TC3_DIR)/tc3
24872550

2551+
ifeq ($(HT_GCC),1)
2552+
# HighTec libgcc references ARM unwind symbols, but .ARM.exidx is
2553+
# discarded. Define empty bounds and stub the personality routines to
2554+
# avoid pulling in ~3.4KB of unneccessary unwinder code.
2555+
LDFLAGS += -Wl,--defsym,__exidx_start=0 -Wl,--defsym,__exidx_end=0 \
2556+
-Wl,--defsym,__aeabi_unwind_cpp_pr0=0 \
2557+
-Wl,--defsym,__aeabi_unwind_cpp_pr1=0 \
2558+
-Wl,--defsym,__aeabi_unwind_cpp_pr2=0
2559+
# HighTec's ancient ARM ld cannot parse the BSP linker-script fragments.
2560+
# Flatten them at parse time with the wolfHSM port's ld-flatten.sh.
2561+
# Paths are relative to this arch.mk, which is included from both the
2562+
# wolfBoot root and test-app directories.
2563+
ARCHMK_DIR:=$(dir $(lastword $(MAKEFILE_LIST)))
2564+
LSCRIPT_IN=$(ARCHMK_DIR)config/$(TARGET)_flat.ld
2565+
ifeq ($(filter clean keysclean,$(MAKECMDGOALS)),)
2566+
LD_FLATTEN_OUT:=$(shell $(WOLFHSM_INFINEON_TC3XX)/tchsm-server/ld-flatten.sh \
2567+
$(ARCHMK_DIR)hal/$(TARGET).ld $(LSCRIPT_IN) $(TC3_DIR)/tc3 && echo OK)
2568+
ifneq ($(LD_FLATTEN_OUT),OK)
2569+
$(error ld-flatten.sh failed for hal/$(TARGET).ld)
2570+
endif
2571+
endif
2572+
else ifeq ($(HT_LLVM),1)
2573+
# picolibc: no specs files, lld parses the BSP scripts directly
2574+
else
2575+
# newlib-nano (arm-none-eabi)
2576+
LDFLAGS += --specs=nano.specs
2577+
endif
2578+
24882579
# wolfHSM port server-specific files
24892580
ifeq ($(WOLFHSM_SERVER),1)
24902581
USE_GCC_HEADLESS=0
@@ -2516,18 +2607,27 @@ ifeq ($(ARCH), AURIX)
25162607
else
25172608
# TriCore host core
25182609
ARCH_FLASH_OFFSET?=0x800A0000
2519-
ifeq ($(USE_GCC),1)
2610+
ifeq ($(GCC),1)
2611+
TRICORE_GCC_PATH?=$(HOME)/workspace/toolchains/tricore-gcc-13.4.1-linux
2612+
CROSS_COMPILE?=$(TRICORE_GCC_PATH)/bin/tricore-elf-
2613+
# Open GCC has a bug in data section naming, eliminate this for now
2614+
CFLAGS:=$(filter-out -fdata-sections,$(CFLAGS))
2615+
# Required for open GCC compatibility with wolfLLD-tc3xx bus error
2616+
# skipping logic. By default, open GCC memcpy uses a post-increment load
2617+
# so without this, bus error skip logic will result in an infinite loop
2618+
# when wolfBoot reads from erased flash.
2619+
CFLAGS+=-fno-auto-inc-dec
2620+
else ifeq ($(HT_LLVM),1)
2621+
HT_TRICORE_LLVM_PATH?=$(HOME)/HighTec/toolchains/tricore/v11.0.0
2622+
CC=$(HT_TRICORE_LLVM_PATH)/bin/clang
2623+
LD=$(CC)
2624+
AS=$(CC)
2625+
AR=$(HT_TRICORE_LLVM_PATH)/bin/llvm-ar
2626+
OBJCOPY=$(HT_TRICORE_LLVM_PATH)/bin/llvm-objcopy
2627+
SIZE=$(HT_TRICORE_LLVM_PATH)/bin/llvm-size
2628+
else
25202629
HT_ROOT?=/opt/hightec/gnutri_v4.9.4.1-11fcedf-lin64
25212630
CROSS_COMPILE?=$(HT_ROOT)/bin/tricore-
2522-
else
2523-
HT_ROOT?=~/HighTec/toolchains/tricore/v9.1.2
2524-
CROSS_COMPILE?=$(HT_ROOT)/bin
2525-
CC=$(CROSS_COMPILE)/clang
2526-
LD=$(CROSS_COMPILE)/clang
2527-
AS=$(CROSS_COMPILE)/clang
2528-
AR=$(CROSS_COMPILE)/llvm-ar
2529-
OBJCOPY=tricore-objcopy
2530-
SIZE=$(CROSS_COMPILE)/llvm-size
25312631
endif
25322632

25332633
# No asm for you!
@@ -2538,7 +2638,16 @@ ifeq ($(ARCH), AURIX)
25382638
CFLAGS+= -fshort-double -mtc162 -fstrict-volatile-bitfields -fno-builtin \
25392639
-fno-strict-aliasing
25402640
else
2541-
CFLAGS+= --target=tricore -march=tc162
2641+
# Use hardware FP with 32-bit doubles, matching GCC's # -fshort-double.
2642+
# Limit clang inlining by callee stack size.
2643+
# Use gnu11 because clang rejects wolfSSL's typedef redefinitions under gnu99.
2644+
CFLAGS+= -march=tc162 -mfloat-abi=hh32 -finline-max-stacksize=4096 \
2645+
-std=gnu11 -ffreestanding -Wno-unused-function
2646+
2647+
# clang applies warning flags positionally, so skip the main
2648+
# Makefile's late USE_GCC_HEADLESS -Wall/-Wextra block (it would
2649+
# re-enable warnings suppressed above)
2650+
USE_GCC_HEADLESS:=0
25422651
endif
25432652

25442653
DEBUG_AFLAGS= -Wa,--gdwarf-2
@@ -2547,7 +2656,7 @@ ifeq ($(ARCH), AURIX)
25472656
ifeq ($(USE_GCC),1)
25482657
LDFLAGS+= -fshort-double -mtc162 -nostartfiles -Wl,--extmap="a"
25492658
else
2550-
LDFLAGS+= --target=tricore -march=tc162 -Wl,--entry=tc3tc_start
2659+
LDFLAGS+= -march=tc162 -mfloat-abi=hh32 -Wl,--entry=tc3tc_start
25512660
endif
25522661

25532662
LDFLAGS+= -Wl,--gc-sections -Wl,--cref -Wl,-n \
@@ -2568,7 +2677,8 @@ ifeq ($(ARCH), AURIX)
25682677
$(TC3_DIR)/../tc3tc_bootloader/tc3tc_bootloader.o
25692678

25702679
ifeq ($(WOLFHSM_CLIENT),1)
2571-
CFLAGS += -I$(WOLFHSM_INFINEON_TC3XX)/port/client
2680+
# GNU enables io.c's write() stub, which picolibc (HT_LLVM) needs
2681+
CFLAGS += -I$(WOLFHSM_INFINEON_TC3XX)/port/client -DGNU
25722682
OBJS += $(WOLFHSM_INFINEON_TC3XX)/port/client/hsm_ipc.o \
25732683
$(WOLFHSM_INFINEON_TC3XX)/port/client/io.o \
25742684
$(WOLFHSM_INFINEON_TC3XX)/port/client/tchsm_hh_host.o

‎hal/aurix_tc3xx.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* You should have received a copy of the GNU General Public License
1818
* along with wolfBoot. If not, see <http://www.gnu.org/licenses/>.
1919
*/
20+
#include <stdarg.h>
2021
#include <stdbool.h>
2122
#include <stddef.h>
2223
#include <stdint.h>
@@ -158,8 +159,11 @@ int hal_hsm_server_cleanup(void);
158159
/* Force longcall on printf functions (called from panic) */
159160
void uart_printf(const char* fmt, ...) TC3_LONGCALL;
160161
void uart_vprintf(const char* fmt, va_list argp) TC3_LONGCALL;
162+
#ifndef __clang__
163+
/* clang rejects adding attributes after loader.h's inline definition */
161164
void wolfBoot_panic(void) TC3_LONGCALL;
162165
#endif
166+
#endif
163167

164168
#ifdef WOLFBOOT_ENABLE_WOLFHSM_CLIENT
165169
/* Every flash command from this core must be wrapped in a park/unpark sequence
@@ -951,6 +955,11 @@ int hal_hsm_server_init(void)
951955
"[ERROR] cryptocb registration for HASH failed, rc=%d\n", rc);
952956
wolfBoot_panic();
953957
}
958+
#ifdef WOLF_CRYPTO_CB_FIND
959+
/* Route INVALID_DEVID calls (cert manager, DRBG) to hardware since the
960+
* CB-only ECC build has no software ECC to fall back to */
961+
wc_CryptoCb_SetDeviceFindCb(hsmCryptoCbFind);
962+
#endif
954963

955964
rc = wc_InitRng_ex(cryptoCtx->rng, NULL, INVALID_DEVID);
956965
if (rc != WH_ERROR_OK) {

‎hal/aurix_tc3xx.ld‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ __HEAP_SIZE = DEFINED (__HEAP_SIZE) ? __HEAP_SIZE : 4K;
8181
/* Pickup the common sections */
8282
INCLUDE tc3tc_sections.ld
8383

84+
/* clang/picolibc emit ctor/dtor arrays (e.g. stdio cleanup) the startup
85+
* never runs. Discard them so they don't become orphan loadable sections */
86+
SECTIONS {
87+
/DISCARD/ : { *(.init_array*) *(.fini_array*) }
88+
}
89+
8490
/* Export the symbols required by wolfBoot */
8591
PROVIDE(_start_text = ADDR(.tc3tc_crt_boot));
8692

‎src/string.c‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,54 @@ void *memmove(void *dst, const void *src, size_t n)
361361
}
362362
}
363363
#endif /* !IAR && !X86_64_EFI && !__CCRX__ */
364+
365+
#if defined(__ARM_EABI__) && !defined(__IAR_SYSTEMS_ICC__)
366+
/* ARM EABI helpers the compiler may call instead of the plain names.
367+
* Provided here so libc archive members (which define both the helper and
368+
* the plain name, e.g. picolibc's memcpy.S.o) are never pulled in and
369+
* cannot collide with the definitions above. */
370+
void RAMFUNCTION __aeabi_memcpy(void *dst, const void *src, size_t n)
371+
{
372+
memcpy(dst, src, n);
373+
}
374+
void RAMFUNCTION __aeabi_memcpy4(void *dst, const void *src, size_t n)
375+
{
376+
memcpy(dst, src, n);
377+
}
378+
void RAMFUNCTION __aeabi_memcpy8(void *dst, const void *src, size_t n)
379+
{
380+
memcpy(dst, src, n);
381+
}
382+
void __aeabi_memmove(void *dst, const void *src, size_t n)
383+
{
384+
memmove(dst, src, n);
385+
}
386+
/* note: __aeabi_memset argument order is (dst, n, c) */
387+
void __aeabi_memset(void *dst, size_t n, int c)
388+
{
389+
memset(dst, c, n);
390+
}
391+
void __aeabi_memset4(void *dst, size_t n, int c)
392+
{
393+
memset(dst, c, n);
394+
}
395+
void __aeabi_memset8(void *dst, size_t n, int c)
396+
{
397+
memset(dst, c, n);
398+
}
399+
void __aeabi_memclr(void *dst, size_t n)
400+
{
401+
memset(dst, 0, n);
402+
}
403+
void __aeabi_memclr4(void *dst, size_t n)
404+
{
405+
memset(dst, 0, n);
406+
}
407+
void __aeabi_memclr8(void *dst, size_t n)
408+
{
409+
memset(dst, 0, n);
410+
}
411+
#endif /* __ARM_EABI__ && !IAR */
364412
#endif /* WOLFBOOT_USE_STDLIBC */
365413

366414
#if defined(PRINTF_ENABLED) && defined(DEBUG_UART)

‎test-app/Makefile‎

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,15 +1323,41 @@ ifneq (,$(filter aurix_tc3xx aurix_tc3xx_hsm,$(TARGET)))
13231323
ifeq ($(TARGET),aurix_tc3xx_hsm)
13241324
APP_OBJS += $(TC3_DIR)/src/tc3arm_crt.o \
13251325
$(TC3_DIR)/src/tc3arm.o
1326-
# Use TC3 Arm app linker script
1327-
LSCRIPT_TEMPLATE = tc3arm_app.ld
1326+
# heap backend for whichever libc the toolchain brings (newlib _sbrk,
1327+
# picolibc/Dinkumware sbrk wrappers)
1328+
APP_OBJS += $(WOLFHSM_INFINEON_TC3XX)/port/server/sysmem.o
1329+
ifeq ($(HT_LLVM),1)
1330+
# picolibc stdio needs the POSIX fd stubs
1331+
APP_OBJS += $(WOLFHSM_INFINEON_TC3XX)/port/server/syscalls.o
1332+
endif
1333+
ifeq ($(HT_GCC),1)
1334+
# HighTec's ancient ARM ld cannot parse the BSP linker-script fragments.
1335+
# Flatten them at parse time with the wolfHSM port's ld-flatten.sh.
1336+
# Paths are relative to this arch.mk, which is included from both the
1337+
# wolfBoot root and test-app directories.
1338+
LSCRIPT_TEMPLATE = ../config/tc3arm_app_flat.ld
1339+
ifeq ($(filter clean,$(MAKECMDGOALS)),)
1340+
LD_FLATTEN_OUT:=$(shell $(WOLFHSM_INFINEON_TC3XX)/tchsm-server/ld-flatten.sh \
1341+
tc3arm_app.ld $(LSCRIPT_TEMPLATE) $(TC3_DIR)/tc3 && echo OK)
1342+
ifneq ($(LD_FLATTEN_OUT),OK)
1343+
$(error ld-flatten.sh failed for tc3arm_app.ld)
1344+
endif
1345+
endif
1346+
else
1347+
# Use TC3 Arm app linker script
1348+
LSCRIPT_TEMPLATE = tc3arm_app.ld
1349+
endif
13281350
else
13291351
APP_OBJS += $(TC3_DIR)/src/tc3tc_isr.o \
13301352
$(TC3_DIR)/src/tc3tc_traps.o \
13311353
$(TC3_DIR)/src/tc3tc.o \
13321354
$(TC3_DIR)/src/tc3tc_crt.o
13331355
# Use TC3 app linker script
13341356
LSCRIPT_TEMPLATE = tc3tc_app.ld
1357+
ifeq ($(GCC),1)
1358+
# No -fdata-sections with tricore-elf-gcc
1359+
CFLAGS:=$(filter-out -fdata-sections,$(CFLAGS))
1360+
endif
13351361
endif
13361362

13371363

@@ -1494,17 +1520,22 @@ standalone:LDFLAGS:=-T standalone.ld -Wl,-gc-sections -Wl,-Map=image.map
14941520
delta-extra-data:CFLAGS+=-D"TEST_DELTA_DATA=$(DELTA_DATA_SIZE)" -ffunction-sections -fdata-sections
14951521
delta-extra-data:LDFLAGS=-Wl,-Map=image.map
14961522

1523+
# Flat binary source: squashed scatter ELFs (--nosht) have no section
1524+
# table, which newer GNU objcopy rejects, so use the pre-squash ELF
1525+
# (identical loadable content) when ELF_FLASH_SCATTER=1
1526+
OBJCOPY_SRC_ELF=image.elf
1527+
14971528
image.bin: image.elf
14981529
@echo "\t[BIN] $@"
1499-
$(Q)$(OBJCOPY) $(OBJCOPY_FLAGS) -O binary $^ $@
1530+
$(Q)$(OBJCOPY) $(OBJCOPY_FLAGS) -O binary $(OBJCOPY_SRC_ELF) $@
15001531

15011532
image.hex: image.elf
15021533
@echo "\t[HEX] $@"
1503-
$(Q)$(OBJCOPY) $(OBJCOPY_FLAGS) -O ihex $^ $@
1534+
$(Q)$(OBJCOPY) $(OBJCOPY_FLAGS) -O ihex $(OBJCOPY_SRC_ELF) $@
15041535

15051536
image.srec: image.elf
15061537
@echo "\t[SREC] $@"
1507-
$(Q)$(OBJCOPY) $(OBJCOPY_FLAGS) -O srec $^ $@
1538+
$(Q)$(OBJCOPY) $(OBJCOPY_FLAGS) -O srec $(OBJCOPY_SRC_ELF) $@
15081539

15091540
APP_OBJS := $(patsubst $(WOLFBOOT_LIB_WOLFSSL)/%, \
15101541
$(WOLFSSL_LOCAL_OBJDIR)/%, $(APP_OBJS))
@@ -1515,6 +1546,7 @@ APP_OBJS := $(patsubst $(WOLFBOOT_LIB_WOLFIP)/%, \
15151546
ifeq ($(ELF_FLASH_SCATTER),1)
15161547
# When ELF_FLASH_SCATTER=1, preprocess the ELF file with the squashelf tool
15171548
SQUASHELF_TOOL = ../tools/squashelf/squashelf
1549+
OBJCOPY_SRC_ELF=image-orig.elf
15181550
image-orig.elf: $(APP_OBJS) $(LSCRIPT)
15191551
@echo "\t[LD] $@"
15201552
$(Q)$(LD) $(LDFLAGS) $(APP_OBJS) $(LIBS) $(OUTPUT_FLAG) $@

0 commit comments

Comments
 (0)