I am attempting to port the aesKeyAgreement_CC1310_LAUNCHXL_tirtos_ccs example to an existing RF project. Something is causing ECC_generateKey to cause an exception and never return.
The ported code includes
#pragma LOCATION(romCryptoOutputBuffer, ROM_CRYPTO_BUFFER_ADDR); uint8_t romCryptoOutputBuffer[ROM_CRYPTO_BUFFER_SIZE]; /* This memset informs the compiler that we intend to make use of the * buffer so it does not get optimised out. */ memset(romCryptoOutputBuffer, 0, ROM_CRYPTO_BUFFER_SIZE);
/* Allocate workzone memory for ecc, recommended workzone size is 275 bytes */
uint32_t *workzone = (uint32_t *) malloc(ECC_WORKZONE_SIZE * ECC_WINDOW_SIZE);
if (workzone == NULL) {
while(1);
}
/* Initialize ECC with a pointer to the allocated workzone */
ECC_initialize(workzone);
It still appears something is not correct. I am able to execute the example project successfully, but not when the code is used in a different project.
Are there other project settings required?
Software versions:
CCS v10.0.0.00010
SimpleLink CC13x0 SDK v3.20.00.23