aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorFredrik Thulin <fredrik@thulin.net>2016-05-21 13:16:58 +0200
committerFredrik Thulin <fredrik@thulin.net>2016-05-21 13:16:58 +0200
commit3d16ad028d69acc581095430d20463ed66f65779 (patch)
treefcc475d12213bdd24f5b5e0071750e4c78b93e5a /projects
parent8204c137d39d936da4fb4f2dc13ed56d0bcec5e5 (diff)
Add code to access the keystore memory (SPI flash).
Diffstat (limited to 'projects')
-rw-r--r--projects/cli-test/cli-test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/projects/cli-test/cli-test.c b/projects/cli-test/cli-test.c
index b8d5388..6bc70dd 100644
--- a/projects/cli-test/cli-test.c
+++ b/projects/cli-test/cli-test.c
@@ -36,6 +36,7 @@
#include "stm-led.h"
#include "stm-uart.h"
#include "stm-fpgacfg.h"
+#include "stm-keystore.h"
#include "mgmt-cli.h"
#include <string.h>
@@ -126,6 +127,12 @@ int cmd_show_fpga_status(struct cli_def *cli, const char *command, char *argv[],
return CLI_OK;
}
+int cmd_show_keystore_status(struct cli_def *cli, const char *command, char *argv[], int argc)
+{
+ cli_print(cli, "Keystore memory is %sonline", (keystore_check_id() != 1) ? "NOT ":"");
+ return CLI_OK;
+}
+
/* The chunk size have to be a multiple of the SPI flash page size (256 bytes),
and it has to match the chunk size in the program sending the bitstream over the UART.
*/
@@ -271,6 +278,10 @@ void configure_cli_show(struct cli_def *cli)
cli_command_branch(show, fpga);
/* show fpga status*/
cli_command_node(show_fpga, status, "Show status about the FPGA");
+
+ cli_command_branch(show, keystore);
+ /* show keystore status*/
+ cli_command_node(show_keystore, status, "Show status of the keystore memory");
}
void configure_cli_fpga(struct cli_def *cli)