Skip to content

Commit c3bdfad

Browse files
author
Cruz Monrreal
authored
Merge pull request #7237 from li-ho/ev-cog-cache
Enable COG boards instruction cache
2 parents 701d49d + bc6b145 commit c3bdfad

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TARGET_EV_COG_AD3029LZ/device/system_ADuCM3029.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ void SramInit(void)
157157
adi_system_EnableRetention(ADI_SRAM_BANK_2, true);
158158
/* To disable the instruction SRAM and entire 64K of SRAM is used as DSRAM */
159159
adi_system_EnableISRAM(false);
160-
/* To disable the instruction cache */
161-
adi_system_EnableCache(false);
160+
/* To enable the 4K instruction cache out of DSRAM */
161+
adi_system_EnableCache(true);
162162
}
163163

164164

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TOOLCHAIN_ARM_STD/ADuCM3029.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE {
7474
.ANY (+RW +ZI)
7575
}
7676

77-
ADUCM_IRAM3 0x20040000 0x8000 { ; non-retainable memory region
77+
ADUCM_IRAM3 0x20040000 0x7000 { ; non-retainable memory region
7878
.ANY (+RW +ZI)
7979
}
8080
}

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TOOLCHAIN_GCC_ARM/ADuCM3029.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ MEMORY
2727
DSRAM_A (rwx) : ORIGIN = 0x20000200, LENGTH = 16k - 0x200
2828
DSRAM_C (rwx) : ORIGIN = 0x20004000, LENGTH = 16k
2929
/* SRAM bank 3 */
30-
DSRAM_B (rwx) : ORIGIN = 0x20040000, LENGTH = 32k
30+
DSRAM_B (rwx) : ORIGIN = 0x20040000, LENGTH = 28k
3131
}
3232

3333
/* Library configurations */

targets/TARGET_Analog_Devices/TARGET_ADUCM302X/TARGET_ADUCM3029/TOOLCHAIN_IAR/ADuCM3029.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ define region ROM_PAGE0_CHECKSUM = mem:[from MBED_APP_START+ADUCM_VECTO
4848
define region ROM_REGION = mem:[from MBED_APP_START+ADUCM_SECTOR_SIZE size MBED_APP_SIZE-ADUCM_SECTOR_SIZE];
4949
define region RAM_bank1_region = mem:[from 0x20000200 size 0x00003E00];
5050
define region RAM_bank2_region = mem:[from 0x20004000 size 0x00004000]
51-
| mem:[from 0x20040000 size 0x00008000];
51+
| mem:[from 0x20040000 size 0x00007000];
5252
define block CSTACK with alignment = 16, size = 0x1000 { };
5353
define block HEAP with alignment = 16, size = 0x2000 { };
5454
do not initialize { section .noinit };

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TARGET_EV_COG_AD4050LZ/device/system_ADuCM4050.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ void SramInit(void)
150150
ADI_SRAM_BANK_5 |
151151
ADI_SRAM_BANK_6 |
152152
ADI_SRAM_BANK_7, true);
153-
/* To disable the instruction SRAM and entire 64K of SRAM is used as DSRAM */
153+
/* To disable the instruction SRAM and entire 128K of SRAM is used as DSRAM */
154154
adi_system_EnableISRAM(false);
155-
/* To disable the instruction cache */
156-
adi_system_EnableCache(false);
155+
/* To enable the 4K instruction cache out of DSRAM */
156+
adi_system_EnableCache(true);
157157
}
158158

159159
/*!

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TOOLCHAIN_ARM_STD/ADuCM4050.sct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ LR_IROM1 MBED_APP_START MBED_APP_SIZE {
5858

5959
RW_IRAM1 0x20040000 EMPTY 0 { }
6060

61-
ADUCM_IRAM2 0x20000200 0x7E00 { *(+RW) }
61+
ADUCM_IRAM2 0x20000200 0x6E00 { *(+RW) }
6262

6363
ADUCM_IRAM3 0x20048000 0x10000 { *(+ZI) }
6464

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TOOLCHAIN_GCC_ARM/ADuCM4050.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ MEMORY
2323
/* The rest of the flash */
2424
FLASH (rx) : ORIGIN = MBED_APP_START + ADUCM_SECTOR_SIZE, LENGTH = MBED_APP_SIZE - ADUCM_SECTOR_SIZE
2525
/* SRAM bank 0 */
26-
DSRAM_A (rwx) : ORIGIN = 0x20000200, LENGTH = 32k - 0x200
26+
DSRAM_A (rwx) : ORIGIN = 0x20000200, LENGTH = 28k - 0x200
2727
/* SRAM bank 3+4+5+6+7 */
2828
DSRAM_B (rwx) : ORIGIN = 0x20048000, LENGTH = 64k
2929
/* stack must not be in bank 1,2,7 where ISRAM or CACHE

targets/TARGET_Analog_Devices/TARGET_ADUCM4X50/TARGET_ADUCM4050/TOOLCHAIN_IAR/ADuCM4050.icf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ define region ROM_PAGE0_INTVEC = mem:[from MBED_APP_START size ADUCM_
4747
define region ROM_PAGE0_CHECKSUM = mem:[from MBED_APP_START+ADUCM_VECTOR_SIZE size ADUCM_SECTOR_SIZE-ADUCM_VECTOR_SIZE];
4848
define region ROM_REGION = mem:[from MBED_APP_START+ADUCM_SECTOR_SIZE size MBED_APP_SIZE-ADUCM_SECTOR_SIZE];
4949
define region RAM_bank1_region = mem:[from 0x20040000 size 0x00008000];
50-
define region RAM_bank2_region = mem:[from 0x20000200 size 0x00007E00]
50+
define region RAM_bank2_region = mem:[from 0x20000200 size 0x00006E00]
5151
| mem:[from 0x20048000 size 0x00010000];
5252
define block CSTACK with alignment = 16, size = 0x2000 { };
5353
define block HEAP with alignment = 16, size = 0x6000 { };

targets/targets.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,8 +644,8 @@
644644
"core": "Cortex-M4F",
645645
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
646646
"macros": ["__ADUCM4050__", "EV_COG_AD4050LZ"],
647-
"extra_labels": ["Analog_Devices", "ADUCM4X50", "ADUCM4050", "EV_COG_AD4050LZ"],
648-
"device_has": ["USTICKER", "RTC", "SERIAL", "STDIO_MESSAGES", "TRNG", "SLEEP", "INTERRUPTIN", "SPI", "I2C", "ANALOGIN"],
647+
"extra_labels": ["Analog_Devices", "ADUCM4X50", "ADUCM4050", "EV_COG_AD4050LZ", "FLASH_CMSIS_ALGO"],
648+
"device_has": ["FLASH", "USTICKER", "RTC", "SERIAL", "STDIO_MESSAGES", "TRNG", "SLEEP", "INTERRUPTIN", "SPI", "I2C", "ANALOGIN"],
649649
"device_name": "ADuCM4050",
650650
"detect_code": ["0603"],
651651
"release_versions": ["5"],
@@ -656,8 +656,8 @@
656656
"core": "Cortex-M3",
657657
"supported_toolchains": ["ARM", "GCC_ARM", "IAR"],
658658
"macros": ["__ADUCM3029__", "EV_COG_AD3029LZ"],
659-
"extra_labels": ["Analog_Devices", "ADUCM302X", "ADUCM3029", "EV_COG_AD3029LZ"],
660-
"device_has": ["USTICKER", "RTC", "SERIAL", "STDIO_MESSAGES", "TRNG", "SLEEP", "INTERRUPTIN", "SPI", "I2C", "ANALOGIN"],
659+
"extra_labels": ["Analog_Devices", "ADUCM302X", "ADUCM3029", "EV_COG_AD3029LZ", "FLASH_CMSIS_ALGO"],
660+
"device_has": ["FLASH", "USTICKER", "RTC", "SERIAL", "STDIO_MESSAGES", "TRNG", "SLEEP", "INTERRUPTIN", "SPI", "I2C", "ANALOGIN"],
661661
"device_name": "ADuCM3029",
662662
"detect_code": ["0602"],
663663
"release_versions": ["5"],

0 commit comments

Comments
 (0)