File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed
targets/TARGET_NXP/TARGET_LPC176X/device Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -37,13 +37,14 @@ CRP3 0x43218765 - Access to chip via the SWD pins is disabled. ISP entry
37
37
Caution: If CRP3 is selected, no future factory testing can be
38
38
performed on the device.
39
39
*/
40
-
41
- #if !defined(BOOTLOADER_ADDR ) // Do not include CRP if there is a bootloader.
42
- #if defined (__ICCARM__ )
43
- __root const long CRP_Key @0x000002FC = 0xFFFFFFFF ;
44
- #elif defined (__GNUC__ )
45
- const long CRP_Key __attribute__((used )) __attribute__((section (".CRPSection" ))) = 0xFFFFFFFF ;
46
- #else
47
- const long CRP_Key __attribute__((used )) __attribute__((section (".ARM.__at_0x000002FC" ))) = 0xFFFFFFFF ;
48
- #endif
40
+ #if !defined(APPLICATION_ADDR ) // Relocate CRP if there is a bootloader.
41
+ #define APPLICATION_ADDR 0
42
+ #endif
43
+
44
+ #if defined (__ICCARM__ )
45
+ __root const long CRP_Key @APPLICATION_ADDR + 0x000002FC = 0xFFFFFFFF ;
46
+ #elif defined (__ARMCC_VERSION )
47
+ const long CRP_Key __attribute__((used )) __attribute__((at (APPLICATION_ADDR + 0x000002FC ))) = 0xFFFFFFFF ;
48
+ #elif defined (__GNUC__ )
49
+ const long CRP_Key __attribute__((used )) __attribute__((section (".CRPSection" ))) = 0xFFFFFFFF ;
49
50
#endif
Original file line number Diff line number Diff line change @@ -46,13 +46,13 @@ ENTRY(Reset_Handler)
46
46
47
47
SECTIONS
48
48
{
49
- .CRPSection 0x000002FC :
50
- {
51
- KEEP(*(.CRPSection))
52
- } > m_data
53
49
.text :
54
50
{
55
51
KEEP(*(.isr_vector))
52
+ /* Code Read Protect data */
53
+ . = 0x000002FC ;
54
+ KEEP(*(.CRPSection))
55
+ /* End of Code Read Protect */
56
56
*(.text*)
57
57
58
58
KEEP(*(.init))
@@ -75,6 +75,8 @@ SECTIONS
75
75
*(.rodata*)
76
76
77
77
KEEP(*(.eh_frame*))
78
+
79
+
78
80
} > FLASH
79
81
80
82
.ARM.extab :
You can’t perform that action at this time.
0 commit comments