@@ -26,13 +26,23 @@ struct k_thread app_thread_id[3];
26
26
struct k_mem_domain app_domain [2 ];
27
27
28
28
/* the start address of the MPU region needs to align with its size */
29
+ #ifdef CONFIG_ARM
29
30
u8_t __aligned (32 ) app0_buf [32 ];
30
31
u8_t __aligned (32 ) app1_buf [32 ];
32
+ #else
33
+ u8_t __aligned (4096 ) app0_buf [4096 ];
34
+ u8_t __aligned (4096 ) app1_buf [4096 ];
35
+ #endif
31
36
32
37
K_MEM_PARTITION_DEFINE (app0_parts0 , app0_buf , sizeof (app0_buf ),
33
38
K_MEM_PARTITION_P_RW_U_RW );
39
+ #ifdef CONFIG_X86
40
+ K_MEM_PARTITION_DEFINE (app0_parts1 , app1_buf , sizeof (app1_buf ),
41
+ K_MEM_PARTITION_P_RO_U_RO );
42
+ #else
34
43
K_MEM_PARTITION_DEFINE (app0_parts1 , app1_buf , sizeof (app1_buf ),
35
44
K_MEM_PARTITION_P_RW_U_RO );
45
+ #endif
36
46
37
47
struct k_mem_partition * app0_parts [] = {
38
48
& app0_parts0 ,
@@ -41,8 +51,13 @@ struct k_mem_partition *app0_parts[] = {
41
51
42
52
K_MEM_PARTITION_DEFINE (app1_parts0 , app1_buf , sizeof (app1_buf ),
43
53
K_MEM_PARTITION_P_RW_U_RW );
54
+ #ifdef CONFIG_X86
55
+ K_MEM_PARTITION_DEFINE (app1_parts1 , app0_buf , sizeof (app0_buf ),
56
+ K_MEM_PARTITION_P_RO_U_RO );
57
+ #else
44
58
K_MEM_PARTITION_DEFINE (app1_parts1 , app0_buf , sizeof (app0_buf ),
45
59
K_MEM_PARTITION_P_RW_U_RO );
60
+ #endif
46
61
47
62
struct k_mem_partition * app1_parts [] = {
48
63
& app1_parts0 ,
0 commit comments