Hi Lena,
I was able to run the Application successfully for nrf52840dongle on your RIOT branch.
I needed to make some changes in RIOT/boards/nrf52840dongle/board.c. I needed to add some headers and function to support crypto cell for the dongle.I made the board.c of the dongle similar to RIOT/boards/common/nrf52xxxdk/board.c.I believe you have tested the application for nrf52840dk, not for the nrf52840dongle.
I could also set the public key and private key using the ECC APIs,then sign and verify using the User Key types.
Later on I tried to adapt the crypto cell library for 2022.01 release of RIOT.
I made 2 changes for that.
First I checked the diff between 2022.01 RIOT/cpu/nrf52 and EWSN-2021 RIOT/cpu/nrf52
and updated the cpu for nrf52.
Then I changed board.c of nrf52840dongle and added the same lines that I have added in board.c in EWSN RIOT branch(same as explained in the first paragraph).
#include "cpu.h"
#include "board.h"
#include "kernel_defines.h"
#include "periph/gpio.h"
#if IS_ACTIVE(MODULE_LIB_CRYPTOCELL)
#include "armcc_setup.h"
#endif
void board_init(void)
{
/* initialize the board's single LED */
gpio_init(LED0_PIN, GPIO_OUT);
gpio_set(LED0_PIN);
/* initialize the board's RGB LED */
gpio_init(LED1_PIN, GPIO_OUT);
gpio_set(LED1_PIN);
gpio_init(LED2_PIN, GPIO_OUT);
gpio_set(LED2_PIN);
gpio_init(LED3_PIN, GPIO_OUT);
gpio_set(LED3_PIN);
/* initialize the CPU */
cpu_init();
#if IS_ACTIVE(MODULE_LIB_CRYPTOCELL)
cryptocell_setup();
#endif
}
I also noted that the cpu_int() function is not present in board.c in 2022.01 release.
Then I tried to compile ecdsa_crypro cell sample for 2022.01 release.Then I got the following error
If I comment out the cpu_init() function from board.c,I get another set of errors.
I get undefined reference to the ECC functions.
Could you tell me if I need to make changes in any other files other than board.c and cpu/nrf52?
For eg. specifying the crypto cell library in any other config or makefiles inside RIOT ?
Regards,
Adarsh