diff --git a/bsp/lpc176x/rtthread-lpc17xx.icf b/bsp/lpc176x/rtthread-lpc17xx.icf
index 68d22fff9ed2f453a855137d7319db3f5c653f9b..b24c7f2e8925e3c373c8fd716b63609ff26ce191 100644
--- a/bsp/lpc176x/rtthread-lpc17xx.icf
+++ b/bsp/lpc176x/rtthread-lpc17xx.icf
@@ -4,29 +4,37 @@
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
/*-Memory Regions-*/
-define symbol __ICFEDIT_region_ROM_start__ = 0x00000000;
+define symbol __ICFEDIT_region_ROM_start__ = 0x00000100;
define symbol __ICFEDIT_region_ROM_end__ = 0x0007FFFF;
-define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
-define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF;
+define symbol __ICFEDIT_region_RAM_start__ = 0x10000000;
+define symbol __ICFEDIT_region_RAM_end__ = 0x10007FFF;
/*-Sizes-*/
-define symbol __ICFEDIT_size_cstack__ = 0x400;
-define symbol __ICFEDIT_size_heap__ = 0x800;
+define symbol __ICFEDIT_size_cstack__ = 0x800;
+define symbol __ICFEDIT_size_heap__ = 0x400;
/**** End of ICF editor section. ###ICF###*/
-
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
+define symbol _AHB_RAM_start__ = 0x2007C000;
+define symbol _AHB_RAM_end__ = 0x20083FFF;
+define region AHB_RAM_region = mem:[from _AHB_RAM_start__ to _AHB_RAM_end__];
+
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { readwrite };
-//initialize by copy with packing = none { section __DLIB_PERTHREAD }; // Required in a multi-threaded application
do not initialize { section .noinit };
+do not initialize { section USB_DMA_RAM };
-place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
+keep { section FSymTab };
+keep { section VSymTab };
+place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
place in RAM_region { readwrite,
block CSTACK, block HEAP };
+place in AHB_RAM_region
+ { readwrite data section AHB_RAM_MEMORY, section USB_DMA_RAM, section EMAC_DMA_RAM};
+
diff --git a/bsp/lpc176x/template.ewp b/bsp/lpc176x/template.ewp
index 3f66c77438f5f677484ca80ec3ba1d9396e28ba6..82f30e4724d8e72193fabc5c535d2e808926e6ca 100644
--- a/bsp/lpc176x/template.ewp
+++ b/bsp/lpc176x/template.ewp
@@ -12,7 +12,7 @@
General3
- 17
+ 2011
@@ -29,8 +29,8 @@
Variant
- 13
- 36
+ 18
+ 37
GEndianMode
@@ -60,7 +60,7 @@
FPU
- 0
+ 20
@@ -81,17 +81,13 @@
RTDescriptionUse the normal configuration of the C/C++ runtime library. No locale interface, C locale, no file descriptor support, no multibytes in printf and scanf, and no hex floats in strtod.