build: rename references from CanBoot to Katapult

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2023-07-30 10:35:54 -04:00
parent 67020a492f
commit 5e794c05d9
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
9 changed files with 38 additions and 38 deletions

View File

@ -1,4 +1,4 @@
# CanBoot build system # Katapult build system
# #
# Copyright (C) 2016-2020 Kevin O'Connor <kevin@koconnor.net> # Copyright (C) 2016-2020 Kevin O'Connor <kevin@koconnor.net>
# #
@ -35,12 +35,12 @@ CFLAGS := -I$(OUT) -Isrc -I$(OUT)board-generic/ -std=gnu11 -Os -MD \
-ffunction-sections -fdata-sections -fno-delete-null-pointer-checks -ffunction-sections -fdata-sections -fno-delete-null-pointer-checks
CFLAGS += -flto -fwhole-program -fno-use-linker-plugin -ggdb3 CFLAGS += -flto -fwhole-program -fno-use-linker-plugin -ggdb3
OBJS_canboot.elf = $(patsubst %.c, $(OUT)src/%.o,$(src-y)) OBJS_katapult.elf = $(patsubst %.c, $(OUT)src/%.o,$(src-y))
OBJS_canboot.elf += $(OUT)compile_time_request.o OBJS_katapult.elf += $(OUT)compile_time_request.o
CFLAGS_canboot.elf = $(CFLAGS) -Wl,--gc-sections CFLAGS_katapult.elf = $(CFLAGS) -Wl,--gc-sections
OBJS_deployer.elf = $(patsubst %.c, $(OUT)src/%.o,$(deployer-y)) OBJS_deployer.elf = $(patsubst %.c, $(OUT)src/%.o,$(deployer-y))
OBJS_deployer.elf += $(OUT)deployer_ctr.o $(OUT)canboot_payload.o OBJS_deployer.elf += $(OUT)deployer_ctr.o $(OUT)katapult_payload.o
CFLAGS_deployer.elf = $(CFLAGS) -Wl,--gc-sections CFLAGS_deployer.elf = $(CFLAGS) -Wl,--gc-sections
BUILDBINARY_FLAGS = BUILDBINARY_FLAGS =
@ -48,7 +48,7 @@ BUILDBINARY_FLAGS =
CPPFLAGS = -I$(OUT) -P -MD -MT $@ CPPFLAGS = -I$(OUT) -P -MD -MT $@
# Default targets # Default targets
target-y := $(OUT)canboot.elf $(OUT)canboot.bin target-y := $(OUT)katapult.elf $(OUT)katapult.bin
all: all:
@ -74,25 +74,25 @@ $(OUT)%.ld: %.lds.S $(OUT)autoconf.h
@echo " Preprocessing $@" @echo " Preprocessing $@"
$(Q)$(CPP) -I$(OUT) -P -MD -MT $@ $< -o $@ $(Q)$(CPP) -I$(OUT) -P -MD -MT $@ $< -o $@
$(OUT)canboot.elf: $(OBJS_canboot.elf) $(OUT)katapult.elf: $(OBJS_katapult.elf)
@echo " Linking $@" @echo " Linking $@"
$(Q)$(CC) $(OBJS_canboot.elf) $(CFLAGS_canboot.elf) -o $@ $(Q)$(CC) $(OBJS_katapult.elf) $(CFLAGS_katapult.elf) -o $@
$(Q)scripts/check-gcc.sh $@ $(OUT)compile_time_request.o $(Q)scripts/check-gcc.sh $@ $(OUT)compile_time_request.o
$(OUT)canboot.bin: $(OUT)canboot.elf ./scripts/buildbinary.py $(OUT)katapult.bin: $(OUT)katapult.elf ./scripts/buildbinary.py
@echo " Creating bin file $@" @echo " Creating bin file $@"
$(Q)$(OBJCOPY) -O binary $< $(OUT)canboot.work $(Q)$(OBJCOPY) -O binary $< $(OUT)katapult.work
$(Q)$(PYTHON) ./scripts/buildbinary.py -b $(CONFIG_FLASH_START) -s $(CONFIG_LAUNCH_APP_ADDRESS) $(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)katapult.work -c $(OUT)katapult_payload.c $@
$(OUT)canboot_payload.o: $(OUT)canboot.bin $(OUT)katapult_payload.o: $(OUT)katapult.bin
@echo " Compiling $@" @echo " Compiling $@"
$(Q)$(CC) $(CFLAGS) -c $(OUT)canboot_payload.c -o $@ $(Q)$(CC) $(CFLAGS) -c $(OUT)katapult_payload.c -o $@
################ CanBoot "deployer" build rules ################ Katapult "deployer" build rules
target-$(CONFIG_BUILD_DEPLOYER) += $(OUT)deployer.elf $(OUT)deployer.bin target-$(CONFIG_BUILD_DEPLOYER) += $(OUT)deployer.elf $(OUT)deployer.bin
$(OUT)deployer.elf: $(OBJS_deployer.elf) $(OUT)canboot.bin $(OUT)deployer.elf: $(OBJS_deployer.elf) $(OUT)katapult.bin
@echo " Linking $@" @echo " Linking $@"
$(Q)$(CC) $(OBJS_deployer.elf) $(CFLAGS_deployer.elf) -o $@ $(Q)$(CC) $(OBJS_deployer.elf) $(CFLAGS_deployer.elf) -o $@

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# Tool to check final CanBoot binary size # Tool to check final Katapult binary size
# #
# Copyright (C) 2022 Kevin O'Connor <kevin@koconnor.net> # Copyright (C) 2022 Kevin O'Connor <kevin@koconnor.net>
# #
@ -7,7 +7,7 @@
import sys, argparse, struct import sys, argparse, struct
ERR_MSG = """ ERR_MSG = """
The CanBoot binary is too large for the configured LAUNCH_APP_ADDRESS. The Katapult binary is too large for the configured LAUNCH_APP_ADDRESS.
Rerun "make menuconfig" and either increase the LAUNCH_APP_ADDRESS or Rerun "make menuconfig" and either increase the LAUNCH_APP_ADDRESS or
disable features to reduce the final binary size. disable features to reduce the final binary size.
@ -43,7 +43,7 @@ def update_lpc176x_checksum(data):
return data28 + struct.pack('<I', csum) + data[32:] return data28 + struct.pack('<I', csum) + data[32:]
def main(): def main():
parser = argparse.ArgumentParser(description="Build CanBoot binary") parser = argparse.ArgumentParser(description="Build Katapult binary")
parser.add_argument("-b", "--base", help="Address of flash start") parser.add_argument("-b", "--base", help="Address of flash start")
parser.add_argument("-s", "--start", help="Address of application start") parser.add_argument("-s", "--start", help="Address of application start")
parser.add_argument("-l", "--lpc176x", action='store_true', parser.add_argument("-l", "--lpc176x", action='store_true',

View File

@ -2,7 +2,7 @@
VERSION := $(shell, git describe --tags --long --always --dirty 2> /dev/null) VERSION := $(shell, git describe --tags --long --always --dirty 2> /dev/null)
mainmenu "CanBoot Configuration $(VERSION)" mainmenu "Katapult Configuration $(VERSION)"
config LOW_LEVEL_OPTIONS config LOW_LEVEL_OPTIONS
bool bool

View File

@ -63,7 +63,7 @@ config STACK_SIZE
###################################################################### ######################################################################
choice choice
prompt "Build CanBoot deployment application" prompt "Build Katapult deployment application"
config LPC_FLASH_START_0000 config LPC_FLASH_START_0000
bool "Do not build" bool "Do not build"
config LPC_FLASH_START_4000 config LPC_FLASH_START_4000

View File

@ -8,9 +8,9 @@ dirs-y += src/lpc176x src/generic lib/lpc176x/device
CFLAGS += -mthumb -mcpu=cortex-m3 -Ilib/lpc176x/device -Ilib/cmsis-core CFLAGS += -mthumb -mcpu=cortex-m3 -Ilib/lpc176x/device -Ilib/cmsis-core
CFLAGS += -Wno-nonnull CFLAGS += -Wno-nonnull
CFLAGS_canboot.elf += --specs=nano.specs --specs=nosys.specs CFLAGS_katapult.elf += --specs=nano.specs --specs=nosys.specs
CFLAGS_canboot.elf += -T $(OUT)src/generic/armcm_link.ld CFLAGS_katapult.elf += -T $(OUT)src/generic/armcm_link.ld
$(OUT)canboot.elf: $(OUT)src/generic/armcm_link.ld $(OUT)katapult.elf: $(OUT)src/generic/armcm_link.ld
# Add source files # Add source files
mcu-y = lpc176x/main.c lpc176x/gpio.c lpc176x/flash.c mcu-y = lpc176x/main.c lpc176x/gpio.c lpc176x/flash.c

View File

@ -88,7 +88,7 @@ config RP2040_STAGE2_CLKDIV
###################################################################### ######################################################################
choice choice
prompt "Build CanBoot deployment application" prompt "Build Katapult deployment application"
config RP2040_FLASH_START_0000 config RP2040_FLASH_START_0000
bool "Do not build" bool "Do not build"
config RP2040_FLASH_START_4000 config RP2040_FLASH_START_4000

View File

@ -8,8 +8,8 @@ dirs-y += src/rp2040 src/generic lib/rp2040/elf2uf2 lib/fast-hash lib/can2040 li
CFLAGS += -mcpu=cortex-m0plus -mthumb -Ilib/cmsis-core CFLAGS += -mcpu=cortex-m0plus -mthumb -Ilib/cmsis-core
CFLAGS += -Ilib/rp2040 -Ilib/rp2040/cmsis_include -Ilib/fast-hash -Ilib/can2040 -Ilib/rp2040/pico/flash/ -Ilib/rp2040/pico/bootrom/ CFLAGS += -Ilib/rp2040 -Ilib/rp2040/cmsis_include -Ilib/fast-hash -Ilib/can2040 -Ilib/rp2040/pico/flash/ -Ilib/rp2040/pico/bootrom/
CFLAGS_canboot.elf += --specs=nano.specs --specs=nosys.specs CFLAGS_katapult.elf += --specs=nano.specs --specs=nosys.specs
CFLAGS_canboot.elf += -T $(OUT)src/rp2040/rp2040_link.ld CFLAGS_katapult.elf += -T $(OUT)src/rp2040/rp2040_link.ld
# Add source files # Add source files
mcu-y = rp2040/main.c rp2040/gpio.c rp2040/timer.c rp2040/flash.c ../lib/rp2040/pico/flash/hw_flash.c mcu-y = rp2040/main.c rp2040/gpio.c rp2040/timer.c rp2040/flash.c ../lib/rp2040/pico/flash/hw_flash.c
@ -23,7 +23,7 @@ src-$(CONFIG_CANSERIAL) += rp2040/can.c rp2040/chipid.c ../lib/can2040/can2040.c
src-$(CONFIG_CANSERIAL) += generic/canserial.c generic/canbus.c src-$(CONFIG_CANSERIAL) += generic/canserial.c generic/canbus.c
src-$(CONFIG_CANSERIAL) += ../lib/fast-hash/fasthash.c src-$(CONFIG_CANSERIAL) += ../lib/fast-hash/fasthash.c
$(OUT)canboot.elf: $(OUT)stage2.o $(OUT)src/rp2040/rp2040_link.ld $(OUT)katapult.elf: $(OUT)stage2.o $(OUT)src/rp2040/rp2040_link.ld
# rp2040 stage2 building # rp2040 stage2 building
STAGE2_FILE := $(shell echo $(CONFIG_RP2040_STAGE2_FILE)) STAGE2_FILE := $(shell echo $(CONFIG_RP2040_STAGE2_FILE))
$(OUT)stage2.o: lib/rp2040/boot_stage2/$(STAGE2_FILE) $(OUT)autoconf.h $(OUT)stage2.o: lib/rp2040/boot_stage2/$(STAGE2_FILE) $(OUT)autoconf.h
@ -33,20 +33,20 @@ $(OUT)stage2.o: lib/rp2040/boot_stage2/$(STAGE2_FILE) $(OUT)autoconf.h
$(Q)$(OBJCOPY) -O binary $(OUT)stage2raw.o $(OUT)stage2raw.bin $(Q)$(OBJCOPY) -O binary $(OUT)stage2raw.o $(OUT)stage2raw.bin
$(Q)lib/rp2040/boot_stage2/pad_checksum -s 0xffffffff $(OUT)stage2raw.bin $(OUT)stage2.S $(Q)lib/rp2040/boot_stage2/pad_checksum -s 0xffffffff $(OUT)stage2raw.bin $(OUT)stage2.S
$(Q)$(CC) $(CFLAGS) -c $(OUT)stage2.S -o $(OUT)stage2.o $(Q)$(CC) $(CFLAGS) -c $(OUT)stage2.S -o $(OUT)stage2.o
OBJS_canboot.elf += $(OUT)stage2.o OBJS_katapult.elf += $(OUT)stage2.o
# Binary output file rules # Binary output file rules
target-y += $(OUT)canboot.uf2 target-y += $(OUT)katapult.uf2
$(OUT)lib/rp2040/elf2uf2/elf2uf2: lib/rp2040/elf2uf2/main.cpp $(OUT)lib/rp2040/elf2uf2/elf2uf2: lib/rp2040/elf2uf2/main.cpp
@echo " Building $@" @echo " Building $@"
$(Q)g++ -g -O -Ilib/rp2040 $< -o $@ $(Q)g++ -g -O -Ilib/rp2040 $< -o $@
$(OUT)canboot.uf2: $(OUT)canboot.elf $(OUT)lib/rp2040/elf2uf2/elf2uf2 $(OUT)katapult.uf2: $(OUT)katapult.elf $(OUT)lib/rp2040/elf2uf2/elf2uf2
@echo " Creating uf2 file $@" @echo " Creating uf2 file $@"
$(Q)$(OUT)lib/rp2040/elf2uf2/elf2uf2 $(OUT)canboot.elf $(OUT)canboot.uf2 $(Q)$(OUT)lib/rp2040/elf2uf2/elf2uf2 $(OUT)katapult.elf $(OUT)katapult.uf2
ifeq ($(CONFIG_RP2040_ADD_BOOT_SIGNATURE), y) ifeq ($(CONFIG_RP2040_ADD_BOOT_SIGNATURE), y)
$(Q)$(PYTHON) ./scripts/uf2_append_boot_signature.py --address $(CONFIG_LAUNCH_APP_ADDRESS) --input $(OUT)canboot.uf2 --output $(OUT)canboot.uf2 $(Q)$(PYTHON) ./scripts/uf2_append_boot_signature.py --address $(CONFIG_LAUNCH_APP_ADDRESS) --input $(OUT)katapult.uf2 --output $(OUT)katapult.uf2
endif endif
lib/rp2040_flash/rp2040_flash: lib/rp2040_flash/rp2040_flash:
@ -54,9 +54,9 @@ lib/rp2040_flash/rp2040_flash:
$(Q)make -C lib/rp2040_flash rp2040_flash $(Q)make -C lib/rp2040_flash rp2040_flash
# Flash rules # Flash rules
flash: $(OUT)canboot.uf2 lib/rp2040_flash/rp2040_flash flash: $(OUT)katapult.uf2 lib/rp2040_flash/rp2040_flash
@echo " Flashing $< " @echo " Flashing $< "
$(Q) $(if $(NOSUDO),,sudo) ./lib/rp2040_flash/rp2040_flash $(OUT)canboot.uf2 $(Q) $(if $(NOSUDO),,sudo) ./lib/rp2040_flash/rp2040_flash $(OUT)katapult.uf2
# Deployer build # Deployer build
deployer-y += generic/armcm_boot.c generic/armcm_reset.c $(mcu-y) deployer-y += generic/armcm_boot.c generic/armcm_reset.c $(mcu-y)

View File

@ -231,7 +231,7 @@ config STM32_DFU_ROM_ADDRESS
###################################################################### ######################################################################
choice choice
prompt "Build CanBoot deployment application" prompt "Build Katapult deployment application"
config STM32_FLASH_START_0000 config STM32_FLASH_START_0000
bool "Do not build" bool "Do not build"
config STM32_FLASH_START_2000 config STM32_FLASH_START_2000

View File

@ -22,9 +22,9 @@ CFLAGS-$(CONFIG_MACH_STM32G0) += -mcpu=cortex-m0plus -Ilib/stm32g0/include
CFLAGS-$(CONFIG_MACH_STM32H7) += -mcpu=cortex-m7 -Ilib/stm32h7/include CFLAGS-$(CONFIG_MACH_STM32H7) += -mcpu=cortex-m7 -Ilib/stm32h7/include
CFLAGS += $(CFLAGS-y) -D$(MCU_UPPER) -mthumb -Ilib/cmsis-core -Ilib/fast-hash CFLAGS += $(CFLAGS-y) -D$(MCU_UPPER) -mthumb -Ilib/cmsis-core -Ilib/fast-hash
CFLAGS_canboot.elf += --specs=nano.specs --specs=nosys.specs CFLAGS_katapult.elf += --specs=nano.specs --specs=nosys.specs
CFLAGS_canboot.elf += -T $(OUT)src/generic/armcm_link.ld CFLAGS_katapult.elf += -T $(OUT)src/generic/armcm_link.ld
$(OUT)canboot.elf: $(OUT)src/generic/armcm_link.ld $(OUT)katapult.elf: $(OUT)src/generic/armcm_link.ld
# Add source files # Add source files
mcu-y = stm32/gpio.c stm32/flash.c stm32/clockline.c stm32/dfu_reboot.c mcu-y = stm32/gpio.c stm32/flash.c stm32/clockline.c stm32/dfu_reboot.c