Skip to content

Commit 49cb7ed

Browse files
* added c library for warning
* used a #define for icsp lock address * changed variable to static const
1 parent 7c606d7 commit 49cb7ed

File tree

1 file changed

+4
-1
lines changed
  • secure_boot_and_secure_firmware_upgrade_over_canfd/icsp_inhibit.X

1 file changed

+4
-1
lines changed

secure_boot_and_secure_firmware_upgrade_over_canfd/icsp_inhibit.X/icsp_inhibit.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,20 @@
2020
*/
2121

2222
#include <stdbool.h>
23+
#include <string.h>
2324
#include "mcc_generated_files/flash/flash.h"
2425
#include "mcc_generated_files/flash/flash_types.h"
2526

27+
#define ICSP_INHIBIT_WRITE_LOCK_ADDRESS 0x0801034
28+
2629
static flash_data_t inhibitKeys[4] =
2730
{
2831
0x00006D63UL, 0x00000000UL, 0x00006870UL, 0x00000000UL
2932
};
3033

3134
bool ICSP_INHIBIT_IsEnabled(void)
3235
{
33-
static flash_data_t dataInFlash[4];
36+
static const flash_data_t dataInFlash[4];
3437
FLASH_Read(0x801034, 4, dataInFlash);
3538

3639
if(memcmp(inhibitKeys, dataInFlash, sizeof(inhibitKeys)) == 0)

0 commit comments

Comments
 (0)