Skip to content

Commit bac39ec

Browse files
committed
CRP tidy
1 parent 12f6db1 commit bac39ec

File tree

1 file changed

+12
-4
lines changed
  • targets/TARGET_NXP/TARGET_LPC176X/device

1 file changed

+12
-4
lines changed

targets/TARGET_NXP/TARGET_LPC176X/device/CRP.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
17+
#include "mbed_toolchain.h"
18+
1819
/* Code Read Protection
1920
2021
NONE 0xFFFFFFFF - No code protection.
@@ -41,10 +42,17 @@ performed on the device.
4142
#define APPLICATION_ADDR 0
4243
#endif
4344

45+
#define CRP_NONE 0xFFFFFFFF
46+
#define CRP_1 0x12345678
47+
#define CRP_2 0x87654321
48+
#define CRP_3 0x43218765
49+
50+
#define CRP CRP_NONE
51+
4452
#if defined (__ICCARM__)
45-
__root const long CRP_Key@APPLICATION_ADDR + 0x000002FC = 0xFFFFFFFF;
53+
__root const long CRP_Key@APPLICATION_ADDR + 0x000002FC = CRP;
4654
#elif defined (__ARMCC_VERSION)
47-
const long CRP_Key __attribute__((used)) __attribute__((at(APPLICATION_ADDR+0x000002FC))) = 0xFFFFFFFF;
55+
const long CRP_Key __attribute__((used)) __attribute__((at(APPLICATION_ADDR+0x000002FC))) = CRP;
4856
#elif defined (__GNUC__)
49-
const long CRP_Key __attribute__((used)) __attribute__((section(".CRPSection"))) = 0xFFFFFFFF;
57+
const long CRP_Key __attribute__((used)) __attribute__((section(".CRPSection"))) = CRP;
5058
#endif

0 commit comments

Comments
 (0)