Skip to content

Commit

Permalink
refactor: adjust makefile parameter name in riot example
Browse files Browse the repository at this point in the history
  • Loading branch information
geonnave committed Oct 4, 2023
1 parent 4b418c0 commit 914d14f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/c-wrapper-riot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ BOARD ?= nrf52840dk
INCLUDES += -I$(CURDIR)/../../target/include
ARCHIVES += $(CURDIR)/../../target/thumbv7em-none-eabihf/release/libedhoc_rs.a

ifeq ($(EDHOC_CRYPTO), CB_PSA)
ifeq ($(EDHOC_CRYPTO), CRYPTO_PSA)
CFLAGS += -D$(EDHOC_CRYPTO)
else
CFLAGS += -DCB_CRYPTOCELL310
CFLAGS += -DCRYPTO_CRYPTOCELL310
endif

# This is actually only needed in the CB_CRYPTOCELL310 configuration
# This is actually only needed in the CRYPTO_CRYPTOCELL310 configuration
CFLAGS += -DTHREAD_STACKSIZE_DEFAULT=16384 -DISR_STACKSIZE=16384

USEMODULE += od
Expand Down
2 changes: 1 addition & 1 deletion examples/c-wrapper-riot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ make flash term
With `crypto-psa-baremetal`:

```bash
make flash term EDHOC_CRYPTO=CB_PSA
make flash term EDHOC_CRYPTO=CRYPTO_PSA
```

# Requirements
Expand Down
4 changes: 2 additions & 2 deletions examples/c-wrapper-riot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "od.h"
#include "edhoc_rs.h"

#ifdef CB_PSA
#ifdef CRYPTO_PSA
extern void mbedtls_memory_buffer_alloc_init(uint8_t *buf, size_t len);
#endif

Expand All @@ -20,7 +20,7 @@ int main(void)
{
puts("Calling edhoc-rs from C!");

#ifdef CB_PSA
#ifdef CRYPTO_PSA
// Memory buffer for mbedtls
uint8_t buffer[4096 * 2] = {0};
mbedtls_memory_buffer_alloc_init(buffer, 4096 * 2);
Expand Down

0 comments on commit 914d14f

Please sign in to comment.