Skip to content

Commit 606f205

Browse files
chrissnowadbridge
authored andcommitted
Remove SET_VALID_CODE
1 parent 3c9f8ce commit 606f205

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

targets/TARGET_NXP/TARGET_LPC176X/device/flash_api.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "mbed_critical.h"
1818

19-
#if DEVICE_FLASH
2019
#include "flash_api.h"
2120
#include "mbed_assert.h"
2221
#include "cmsis.h"
@@ -122,19 +121,6 @@ int32_t flash_program_page(flash_t *obj, uint32_t address,
122121
memcpy(data,datain,size);
123122
}
124123

125-
#if SET_VALID_CODE != 0// Set valid User Code Signature
126-
if (address == 0) {// Check for Vector Table
127-
n = *((unsigned long *)(data + 0x00)) +
128-
*((unsigned long *)(data + 0x04)) +
129-
*((unsigned long *)(data + 0x08)) +
130-
*((unsigned long *)(data + 0x0C)) +
131-
*((unsigned long *)(data + 0x10)) +
132-
*((unsigned long *)(data + 0x14)) +
133-
*((unsigned long *)(data + 0x18));
134-
*((unsigned long *)(data + 0x1C)) = 0 - n;// Signature at Reserved Vector
135-
}
136-
#endif
137-
138124
n = GetSecNum(address);// Get Sector Number
139125

140126
IAP.cmd = 50;// Prepare Sector for Write

0 commit comments

Comments
 (0)