修改进程内存位置
启用mpu内存保护
This commit is contained in:
1 parent
6b977b2c62
commit
a53eb282d2
10 files changed
+113
-31
No files matched your search
@@ -467,8 +467,12 @@ void proc_thread_entry(void *parameter)
|
||||
}
|
||||
}
|
||||
|
||||
extern struct rt_memheap sram_DTCMRAM;
|
||||
static struct rt_thread dat_comm_thread;
|
||||
static void *dat_comm_stack __attribute__((aligned(4)))= RT_NULL ;
|
||||
int data_comm_init(void)
|
||||
{
|
||||
rt_err_t dat_err;
|
||||
proc_mq = rt_mq_create("proc_mq", sizeof(struct proc_request*), 5, RT_IPC_FLAG_FIFO);
|
||||
if (proc_mq == RT_NULL)
|
||||
{
|
||||
@@ -476,18 +480,18 @@ int data_comm_init(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
rt_thread_t tid = rt_thread_create("dat_comm", proc_thread_entry, RT_NULL,
|
||||
1024*6, 20, 10);
|
||||
if (tid != RT_NULL)
|
||||
{
|
||||
rt_thread_startup(tid);
|
||||
LOG_D("Create cJSON thread");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_D("Failed to create cJSON thread!\n");
|
||||
}
|
||||
dat_comm_stack = rt_memheap_alloc(&sram_DTCMRAM, 1024*6);
|
||||
dat_err = rt_thread_init(&dat_comm_thread, "dat_comm", proc_thread_entry, RT_NULL,
|
||||
dat_comm_stack, 1024*6, 15, 10);
|
||||
|
||||
if(dat_err != RT_EOK)
|
||||
{
|
||||
LOG_E("Failed to create cJSON thread!");
|
||||
return -1;
|
||||
}else{
|
||||
LOG_I("Create cJSON thread");
|
||||
}
|
||||
rt_thread_startup(&dat_comm_thread);
|
||||
return 0;
|
||||
}
|
||||
//INIT_COMPONENT_EXPORT(data_comm_init);
|
||||
INIT_APP_EXPORT(data_comm_init);
|
||||
Reference in new issue
Block a user