mirror of
https://github.com/andreili/katapult.git
synced 2025-08-23 19:34:06 +02:00
armcm_canboot: Rename CONFIG_APPLICATION_START to CONFIG_LAUNCH_APP_ADDRESS
Rename the build symbol to better distinguish it from the start address of the deployer app. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
600967e293
commit
7db10a048f
2
Makefile
2
Makefile
@ -82,7 +82,7 @@ $(OUT)canboot.elf: $(OBJS_canboot.elf)
|
||||
$(OUT)canboot.bin: $(OUT)canboot.elf ./scripts/buildbinary.py
|
||||
@echo " Creating bin file $@"
|
||||
$(Q)$(OBJCOPY) -O binary $< $(OUT)canboot.work
|
||||
$(Q)$(PYTHON) ./scripts/buildbinary.py -b $(CONFIG_FLASH_START) -s $(CONFIG_APPLICATION_START) $(BUILDBINARY_FLAGS) $(OUT)canboot.work -c $(OUT)canboot_payload.c $@
|
||||
$(Q)$(PYTHON) ./scripts/buildbinary.py -b $(CONFIG_FLASH_START) -s $(CONFIG_LAUNCH_APP_ADDRESS) $(BUILDBINARY_FLAGS) $(OUT)canboot.work -c $(OUT)canboot_payload.c $@
|
||||
|
||||
$(OUT)canboot_payload.o: $(OUT)canboot.bin
|
||||
@echo " Compiling $@"
|
||||
|
@ -7,9 +7,9 @@
|
||||
import sys, argparse, struct
|
||||
|
||||
ERR_MSG = """
|
||||
The CanBoot binary is too large for the configured APPLICATION_START.
|
||||
The CanBoot binary is too large for the configured LAUNCH_APP_ADDRESS.
|
||||
|
||||
Rerun "make menuconfig" and either increase the APPLICATION_START or
|
||||
Rerun "make menuconfig" and either increase the LAUNCH_APP_ADDRESS or
|
||||
disable features to reduce the final binary size.
|
||||
"""
|
||||
|
||||
|
@ -21,7 +21,7 @@ command_connect(uint32_t *data)
|
||||
uint32_t out[6 + mcuwords];
|
||||
memset(out, 0, (6 + mcuwords) * 4);
|
||||
out[2] = cpu_to_le32(PROTO_VERSION);
|
||||
out[3] = cpu_to_le32(CONFIG_APPLICATION_START);
|
||||
out[3] = cpu_to_le32(CONFIG_LAUNCH_APP_ADDRESS);
|
||||
out[4] = cpu_to_le32(CONFIG_BLOCK_SIZE);
|
||||
memcpy(&out[5], CONFIG_MCU, strlen(CONFIG_MCU));
|
||||
command_respond_ack(CMD_CONNECT, out, ARRAY_SIZE(out));
|
||||
@ -83,7 +83,7 @@ command_write_block(uint32_t *data)
|
||||
if (command_get_arg_count(data) != (CONFIG_BLOCK_SIZE / 4) + 1)
|
||||
goto fail;
|
||||
uint32_t block_address = le32_to_cpu(data[1]);
|
||||
if (block_address < CONFIG_APPLICATION_START)
|
||||
if (block_address < CONFIG_LAUNCH_APP_ADDRESS)
|
||||
goto fail;
|
||||
int ret = flash_write_block(block_address, &data[2]);
|
||||
if (ret < 0)
|
||||
|
@ -51,7 +51,7 @@ application_read_flash(uint32_t address, uint32_t *dest)
|
||||
int
|
||||
application_check_valid(void)
|
||||
{
|
||||
uint32_t *app = (void*)CONFIG_APPLICATION_START;
|
||||
uint32_t *app = (void*)CONFIG_LAUNCH_APP_ADDRESS;
|
||||
return *app != 0 && *app != 0xffffffff;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ static void
|
||||
start_application(void)
|
||||
{
|
||||
set_bootup_code(0);
|
||||
uint32_t *vtor = (void*)CONFIG_APPLICATION_START;
|
||||
uint32_t *vtor = (void*)CONFIG_LAUNCH_APP_ADDRESS;
|
||||
#if __CORTEX_M > 0 || __VTOR_PRESENT
|
||||
SCB->VTOR = (uint32_t)vtor;
|
||||
#endif
|
||||
|
@ -22,8 +22,8 @@ SECTIONS
|
||||
_text_vectortable_start = .;
|
||||
KEEP(*(.vector_table))
|
||||
_text_vectortable_end = .;
|
||||
#if CONFIG_APPLICATION_START > CONFIG_DEPLOYER_START
|
||||
. = CONFIG_APPLICATION_START - CONFIG_DEPLOYER_START ;
|
||||
#if CONFIG_LAUNCH_APP_ADDRESS > CONFIG_DEPLOYER_START
|
||||
. = CONFIG_LAUNCH_APP_ADDRESS - CONFIG_DEPLOYER_START ;
|
||||
#endif
|
||||
*(.text .text.*)
|
||||
*(.rodata .rodata*)
|
||||
|
@ -100,7 +100,7 @@ endchoice
|
||||
# Flash settings
|
||||
######################################################################
|
||||
|
||||
config APPLICATION_START
|
||||
config LAUNCH_APP_ADDRESS
|
||||
hex
|
||||
default 0x4000
|
||||
|
||||
|
@ -40,7 +40,7 @@ config FLASH_START
|
||||
hex
|
||||
default 0x10000000
|
||||
|
||||
config APPLICATION_START
|
||||
config LAUNCH_APP_ADDRESS
|
||||
default 0x10004000
|
||||
hex
|
||||
|
||||
|
@ -46,7 +46,7 @@ $(OUT)canboot.uf2: $(OUT)canboot.elf $(OUT)lib/rp2040/elf2uf2/elf2uf2
|
||||
@echo " Creating uf2 file $@"
|
||||
$(Q)$(OUT)lib/rp2040/elf2uf2/elf2uf2 $(OUT)canboot.elf $(OUT)canboot.uf2
|
||||
ifeq ($(CONFIG_RP2040_ADD_BOOT_SIGNATURE), y)
|
||||
$(Q)$(PYTHON) ./scripts/uf2_append_boot_signature.py --address $(CONFIG_APPLICATION_START) --input $(OUT)canboot.uf2 --output $(OUT)canboot.uf2
|
||||
$(Q)$(PYTHON) ./scripts/uf2_append_boot_signature.py --address $(CONFIG_LAUNCH_APP_ADDRESS) --input $(OUT)canboot.uf2 --output $(OUT)canboot.uf2
|
||||
endif
|
||||
|
||||
lib/rp2040_flash/rp2040_flash:
|
||||
|
@ -51,7 +51,7 @@ application_read_flash(uint32_t address, uint32_t *dest)
|
||||
int
|
||||
application_check_valid(void)
|
||||
{
|
||||
uint32_t *app = (void*)CONFIG_APPLICATION_START;
|
||||
uint32_t *app = (void*)CONFIG_LAUNCH_APP_ADDRESS;
|
||||
return *app != 0 && *app != 0xffffffff;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ static void
|
||||
start_application(void)
|
||||
{
|
||||
set_bootup_code(0);
|
||||
uint32_t *vtor = (void*)CONFIG_APPLICATION_START;
|
||||
uint32_t *vtor = (void*)CONFIG_LAUNCH_APP_ADDRESS;
|
||||
SCB->VTOR = (uint32_t)vtor;
|
||||
asm volatile("MSR msp, %0\n bx %1" : : "r"(vtor[0]), "r"(vtor[1]));
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ choice
|
||||
bool "4KiB offset" if MACH_STM32F0 || MACH_STM32F1 || MACH_STM32G0
|
||||
endchoice
|
||||
|
||||
config APPLICATION_START
|
||||
config LAUNCH_APP_ADDRESS
|
||||
hex
|
||||
default 0x8008000 if STM32_APP_START_8000
|
||||
default 0x8004000 if STM32_APP_START_4000
|
||||
|
Loading…
x
Reference in New Issue
Block a user