aboutsummaryrefslogtreecommitdiff
<
PROJ = hsm

# objs in addition to $(PROJ).o
OBJS =	mgmt-cli.o \
	mgmt-firmware.o \
	mgmt-bootloader.o \
	mgmt-fpga.o \
	mgmt-keystore.o \
	mgmt-masterkey.o \
	mgmt-misc.o \
	mgmt-task.o \
	log.o \
	$(TOPLEVEL)/task.o

CFLAGS += -DNUM_RPC_TASK=4

CFLAGS += -I$(LIBHAL_SRC)
CFLAGS += -I$(LIBCLI_SRC)

LIBS += $(LIBHAL_BLD)/libhal.a $(LIBTFM_BLD)/libtfm.a
LIBS += $(LIBCLI_BLD)/libcli.a

LDFLAGS += -mcpu=cortex-m4 -mthumb -mlittle-endian -mthumb-interwork
LDFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
LDFLAGS += -Wl,--gc-sections

ifdef DO_PROFILING
OBJS += $(TOPLEVEL)/memfunc.o
LDFLAGS += --specs=rdimon.specs -lc -lrdimon
endif

ifdef DO_TASK_METRICS
CFLAGS += -DDO_TASK_METRICS
endif

all: $(PROJ:=.elf)

%.elf: %.o $(BOARD_OBJS) $(OBJS) $(LIBS)
	$(CC) $^ -o $@ -T$(LDSCRIPT) -g -Wl,-Map=$*.map $(LDFLAGS)
	$(OBJCOPY) -O binary $*.elf $*.bin
	$(SIZE) $*.elf

clean:
	rm -f *.o
	rm -f *.elf
	rm -f *.bin
	rm -f *.map
AgeCommit message (Collapse)Author
2015-06-19Add replacement for fp_exptmod() using our ModExp core, so we don'tRob Austein
drag in all of TFM's Montgomery just to support the Miller-Rabin test.
2015-06-18Supply public exponent as bigendian byte string rather than unsignedRob Austein
long, since that's the form we'll need for PKCS #11.
2015-06-18Helps to set the return value when reading a key, doh.Rob Austein
2015-06-18Add round-trip test for DER I/O code.Rob Austein
2015-06-18Add RSA blinding.Rob Austein
5-05-24Debug hash-testing code.Rob Austein 2015-05-24First pass on hash test code.Rob Austein 2015-05-24AES key wrap now working with AES core.Rob Austein 2015-05-24Typing "!" when one meant "~" has interesting effects when bit masking.Rob Austein 2015-05-23Guess it might help to write the config value to the AES core afterRob Austein constructing it, doh. 2015-05-21Add test cases for 128-bit and 256-bit KEKs.Rob Austein 2015-05-21Add test harness: no useful tests yet, just the framework.Rob Austein Add human-readable error strings for hal_error_t codes. 2015-05-21Copy Joachim's EIM timeout change, make timeout configurable atRob Austein compile time. Detect not-multiple-of-four-byte errors before they trigger an infinite loop. Remove printfs() that don't belong in library code, along with an unnecessary malloc(). Other minor cleanup. 2015-05-20Add AES Key Wrap using Cryptech AES core.Rob Austein 2015-05-20Add csprng and hash modules. Add real error codes instead of magicRob Austein numbers, and propegate error codes up from lower layers. Whack C++-isms, add parenthesese to a lot of macro expressions for evaluation safety, other minor cleanup. 2015-05-19Import FPGA I/O code from core/platform/novena/sw, add minimalRob Austein autoconf, whack with a club until it builds.