Skip to content

Commit a24a52f

Browse files
dgarskedanielinux
authored andcommitted
Support building existing TARGET= with make libwolfboot.a.
1 parent 3a2ac0b commit a24a52f

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

arch.mk

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,11 +1158,18 @@ else
11581158
UPDATE_OBJS:=src/update_flash_hwswap.o
11591159
endif
11601160
endif
1161-
# Set default update object (if not library)
1162-
ifneq ($(TARGET),library)
1163-
ifeq ($(UPDATE_OBJS),)
1164-
UPDATE_OBJS:=./src/update_flash.o
1161+
1162+
## For library target disable partitions
1163+
ifeq ($(TARGET),library)
1164+
WOLFBOOT_NO_PARTITIONS=1
1165+
NO_LOADER=1
11651166
endif
1167+
1168+
## Set default update object
1169+
ifneq ($(WOLFBOOT_NO_PARTITIONS),1)
1170+
ifeq ($(UPDATE_OBJS),)
1171+
UPDATE_OBJS:=./src/update_flash.o
1172+
endif
11661173
endif
11671174

11681175
## wolfBoot origin

hal/renesas-rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ void RAMFUNCTION hal_flash_lock(void)
621621
return;
622622
}
623623

624-
#ifndef TARGET_library
624+
#if !defined(WOLFBOOT_NO_PARTITIONS) && !defined(TARGET_library)
625625
void* hal_get_primary_address(void)
626626
{
627627
return (void*)WOLFBOOT_PARTITION_BOOT_ADDRESS;

0 commit comments

Comments
 (0)