- refactored interrupt en/dis

- enable mips-debugger in App



git-svn-id: http://moon:8086/svn/mips@132 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
2017-01-26 20:09:46 +00:00
parent 3bcdafc447
commit 41414d5648
7 changed files with 26 additions and 15 deletions
+15 -6
View File
@@ -245,6 +245,7 @@ int Test10_LoadStore()
// sputs("buf = ");
// print_word((int)buf);
// sputs("\n");
interrupt_global_disable();
while(1)
{
@@ -357,6 +358,8 @@ int Test10_LoadStore()
err = NO_ERROR;
break;
}
interrupt_global_enable();
free(buf);
if (IS_ERROR(err))
@@ -838,20 +841,26 @@ uint32_t test_Icache()
uint32_t *pInstr = malloc(sizeof(test_icache_instr));
memcpy(pInstr, test_icache_instr, sizeof(test_icache_instr));
func_t pF = (func_t)pInstr;
uint32_t v1;
uint32_t v2;
uint32_t v3;
uint32_t v = pF();
printf("v = %u\n", (unsigned)v);
interrupt_global_disable();
v1 = pF();
pInstr[4] = 0x24100002;
v = pF();
printf("v = %u\n", (unsigned)v);
v2 = pF();
ICACHE_invalidate_at(&pInstr[4]);
v = pF();
printf("v = %u\n", (unsigned)v);
v3 = pF();
interrupt_global_enable();
free(pF);
printf("v1 = %u\n", (unsigned)v1);
printf("v2 = %u\n", (unsigned)v2);
printf("v3 = %u\n", (unsigned)v3);
return 0;
}