Skip to content

Commit

Permalink
Minor cleanups. Improve the TSIP build.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgarske committed Jul 11, 2024
1 parent 8ff2cb8 commit 5f416e9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 27 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ keys: $(PRIVATE_KEY)
clean:
$(Q)rm -f src/*.o hal/*.o hal/spi/*.o test-app/*.o src/x86/*.o
$(Q)rm -f lib/wolfssl/wolfcrypt/src/*.o lib/wolfTPM/src/*.o lib/wolfTPM/hal/*.o
$(Q)rm -f lib/wolfssl/wolfcrypt/src/port/Renesas/*.o
$(Q)rm -f wolfboot.bin wolfboot.elf wolfboot.map test-update.rom wolfboot.hex
$(Q)rm -f $(MACHINE_OBJ) $(MAIN_TARGET) $(LSCRIPT)
$(Q)rm -f $(OBJS)
Expand Down
72 changes: 46 additions & 26 deletions arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -332,39 +332,59 @@ ifeq ($(ARCH),RENESAS_RX)

# RX TSIP uses pre-compiled .a library by default
ifeq ($(RX_TSIP_SRC),)
ifeq ($(BIG_ENDIAN),1)
LIBS+=$(RX_DRIVER_PATH)/r_tsip_rx/lib/gcc/libr_tsip_rx72m_rx72n_rx66n_big.a
else
LIBS+=$(RX_DRIVER_PATH)/r_tsip_rx/lib/gcc/libr_tsip_rx72m_rx72n_rx66n_little.a
ifeq ($(TARGET),rx65n)
ifeq ($(BIG_ENDIAN),1)
LIBS+=$(RX_DRIVER_PATH)/r_tsip_rx/lib/gcc/libr_tsip_rx65n_big.a
else
LIBS+=$(RX_DRIVER_PATH)/r_tsip_rx/lib/gcc/libr_tsip_rx65n_little.a
endif
endif
ifeq ($(TARGET),rx72n)
ifeq ($(BIG_ENDIAN),1)
LIBS+=$(RX_DRIVER_PATH)/r_tsip_rx/lib/gcc/libr_tsip_rx72m_rx72n_rx66n_big.a
else
LIBS+=$(RX_DRIVER_PATH)/r_tsip_rx/lib/gcc/libr_tsip_rx72m_rx72n_rx66n_little.a
endif
endif
else
ifeq ($(TARGET),rx65n)
RX_TSIP_SRC_PATH?=$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx65n
endif
ifeq ($(TARGET),rx72n)
RX_TSIP_SRC_PATH?=$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n
endif
# Use RX_TSIP_SRC if building TSIP sources directly
OBJS+=$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/r_tsip_rx.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/r_tsip_aes_rx.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/r_tsip_hash_rx.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/r_tsip_ecc_rx.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_p00.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_p01.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_p02.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_p23.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_p26.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_subprc01.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_subprc02.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function050.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function051.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function052.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function053.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function054.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function100.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function101.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function102.o \
$(RX_DRIVER_PATH)/r_tsip_rx/src/targets/rx72m_rx72n_rx66n/ip/r_tsip_rx_function103.o
OBJS+=$(RX_TSIP_SRC_PATH)/r_tsip_rx.o \
$(RX_TSIP_SRC_PATH)/r_tsip_aes_rx.o \
$(RX_TSIP_SRC_PATH)/r_tsip_hash_rx.o \
$(RX_TSIP_SRC_PATH)/r_tsip_ecc_rx.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_p00.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_p01.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_p02.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_p23.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_p26.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_subprc01.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_subprc02.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function050.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function051.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function052.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function053.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function054.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function100.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function101.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function102.o \
$(RX_TSIP_SRC_PATH)/ip/r_tsip_rx_function103.o
endif

OBJS+=$(RX_DRIVER_PATH)/r_bsp/mcu/all/r_bsp_cpu.o \
$(RX_DRIVER_PATH)/r_bsp/mcu/all/r_bsp_interrupts.o \
$(RX_DRIVER_PATH)/r_bsp/mcu/all/r_rx_intrinsic_functions.o \
$(RX_DRIVER_PATH)/r_bsp/mcu/rx72n/mcu_interrupts.o
$(RX_DRIVER_PATH)/r_bsp/mcu/all/r_rx_intrinsic_functions.o
ifeq ($(TARGET),rx65n)
#OBJS+=$(RX_DRIVER_PATH)/r_bsp/mcu/rx65n/mcu_interrupts.o
endif
ifeq ($(TARGET),rx72n)
#OBJS+=$(RX_DRIVER_PATH)/r_bsp/mcu/rx72n/mcu_interrupts.o
endif

CFLAGS+=-Ihal -I./lib/wolfssl \
-I$(RX_DRIVER_PATH)/r_bsp \
Expand Down
1 change: 0 additions & 1 deletion docs/Renesas.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ This will use the user encryption key to wrap the public key and output key_data

```sh
$ C:\Renesas\SecurityKeyManagementTool\cli\skmt.exe -genkey -ufpk file=./sample.key -wufpk file=./sample.key_enc.key -key file=./pub-ecc384.pem -mcu RX-TSIP -keytype secp384r1-public -output include/key_data.c -filetype csource -keyname enc_pub_key
RX-TSIP -keytype secp384r1-public -output include/key_data.c -filetype csource -keyname enc_pub_key
Output File: include\key_data.h
Output File: include\key_data.c
UFPK: B94A2B961C75510174F0C967ECFC20B377C7FB256DB627B1BFFADEE05EE98AC4
Expand Down

0 comments on commit 5f416e9

Please sign in to comment.