Skip to content

Commit 88cf4c2

Browse files
committed
MCU8MASS-1790 Update include path for cryptoauthlib for ECC608 module and add description for update_include_paths.py
1 parent c68e7a9 commit 88cf4c2

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

scripts/update_include_paths.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
"""
2+
This file replaces the include paths of a C/C++ project with the full path up to
3+
the root of the project. This script exists due to not being able to add include
4+
search paths in Arduino, so for e.g. cryptoauthlib, we need to modify all the
5+
include paths to be relative to the src folder (which is the only search include
6+
path in Arduino).
7+
"""
8+
19
from pathlib import Path
210
import re
311
import argparse

src/ecc608.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "ecc608.h"
22

3-
#include "tng_atcacert_client.h"
3+
#include "cryptoauthlib/app/tng/tng_atcacert_client.h"
44

55
#define SLOT_NUM 8 // ECC slot number used for provisioning data
66

src/ecc608.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include <stddef.h>
77
#include <stdint.h>
88

9-
#include "atcacert/atcacert.h"
10-
#include "cryptoauthlib.h"
9+
#include "cryptoauthlib/lib/atcacert/atcacert.h"
10+
#include "cryptoauthlib/lib/cryptoauthlib.h"
1111

1212
class ECC608Class {
1313

@@ -32,6 +32,8 @@ class ECC608Class {
3232
return instance;
3333
}
3434

35+
// TODO: add read provision item as public here
36+
3537
/**
3638
* @brief Initializes the ECC.
3739
*

src/mqtt_client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "security_profile.h"
77
#include "sequans_controller.h"
88

9-
#include <cryptoauthlib.h>
109
#include <math.h>
1110
#include <stdio.h>
1211
#include <stdlib.h>
@@ -309,6 +308,7 @@ static bool generateSigningCommand(char* data, char* command_buffer) {
309308
}
310309

311310
// Sign digest with ECC's primary private key
311+
// TODO: move this to ECC class
312312
ATCA_STATUS result = atcab_sign(0, message_to_sign, (uint8_t*)digest);
313313

314314
if (result != ATCA_SUCCESS) {

0 commit comments

Comments
 (0)