v8m_ns = __Symbol_exists("TZ_InitContextSystem_S"); os_Config.stack_check = (os_Config.flags >> 1) & 1; os_Config.stack_wmark = (os_Config.flags >> 2) & 1; os_Config.safety_feat = (os_Config.flags >> 3) & 1; os_Config.safety_class = (os_Config.flags >> 4) & 1; os_Config.exec_zone = (os_Config.flags >> 5) & 1; os_Config.watchdog = (os_Config.flags >> 6) & 1; os_Config.obj_check = (os_Config.flags >> 7) & 1; os_Config.svc_check = (os_Config.flags >> 8) & 1; RTX_En = 1; V_Major = os_Info.version / 10000000; V_Minor = (os_Info.version / 10000) % 1000; V_Patch = os_Info.version % 10000; StaticMp_En = 1; /> TCB_Rd = cb_Sections.thread_cb_end - cb_Sections.thread_cb_start; CCB_Rd = cb_Sections.timer_cb_end - cb_Sections.timer_cb_start; ECB_Rd = cb_Sections.evflags_cb_end - cb_Sections.evflags_cb_start; MCB_Rd = cb_Sections.mutex_cb_end - cb_Sections.mutex_cb_start; SCB_Rd = cb_Sections.semaphore_cb_end - cb_Sections.semaphore_cb_start; PCB_Rd = cb_Sections.mempool_cb_end - cb_Sections.mempool_cb_start; QCB_Rd = cb_Sections.msgqueue_cb_end - cb_Sections.msgqueue_cb_start; TCB_Rd /= 80; CCB_Rd /= 32; ECB_Rd /= 16; MCB_Rd /= 28; SCB_Rd /= 16; PCB_Rd /= 36; QCB_Rd /= 52; mem_head_stack.max_used = mem_list_stack[mem_list_stack._count-1].len; mem_head_mp_data.max_used = mem_list_mp_data[mem_list_mp_data._count-1].len; mem_head_mq_data.max_used = mem_list_mq_data[mem_list_mq_data._count-1].len; mem_head_com.max_used = mem_list_com[mem_list_com._count-1].len; addr = mem_list_com[i]._addr; addr += 8; TCB[i].cb_valid = (TCB[i].id == 0xF1) && (TCB[i].state != 0) && (TCB[i].sp != 0); TCB[i].sp_valid = 1; os_Info.robin_tick = TCB[i].delay; ipsr = __GetRegVal("XPSR") & 0x01FF; psp = (v8m_ns == 0) ? (__GetRegVal("PSP")) : (__GetRegVal("PSP_NS")); psp = (psp == 0) ? (TCB[i].sp) : (psp); sp = ((ipsr != 0) && (ipsr < 16)) ? (TCB[i].sp) : (psp); TCB[i].sp_valid = ((ipsr != 0) && (ipsr < 16)) ? (0) : (1); TCB[i].sp_valid = 0; sp = TCB[i].sp; sp = TCB[i].sp; TCB[i].stack_cur = sp; TCB[i].stack_curb = TCB[i].stack_mem + TCB[i].stack_size; TCB[i].stack_curb -= sp; TCB[i].stack_curp = TCB[i].stack_curb; TCB[i].stack_curp *= 100; TCB[i].stack_curp /= TCB[i].stack_size; TCB[i].stack_over = (sp <= TCB[i].stack_mem) ? 1 : 0; TCB[i].stack_val = __CalcMemUsed (TCB[i].stack_mem, sp - TCB[i].stack_mem, 0xCCCCCCCC, 0xE25A2EA5); TCB[i].stack_over = TCB[i].stack_val >> 31; TCB[i].stack_maxb = (TCB[i].stack_mem + TCB[i].stack_size) - sp; TCB[i].stack_maxb += TCB[i].stack_val & 0xFFFFF; TCB[i].stack_maxp = (TCB[i].stack_maxb * 100)/ TCB[i].stack_size; TCB[i].stack_maxb = TCB[i].stack_size; TCB[i].stack_maxp = 100; TCB[i].stack_maxb = TCB[i].stack_curb; TCB[i].stack_maxp = TCB[i].stack_curp; TCB[i].ex_delay = TCB[i].delay; TCB[i].ex_delay += TDL[j].delay; k = 0; TCB[i].wd_tick += WDL[j].wdog_tick; k = 1; TCB[i].wd_state = k; CCB[i].cb_valid = (CCB[i].id == 0xF2) && (CCB[i].state != 0); CCB[i].ex_tick = CCB[i].tick; CCB[i].ex_tick += TEL[j].tick; k = 0; ECB[i].cb_valid = (ECB[i].id == 0xF3); ECB[i].wl_idx = k; ECB[i].wl_cnt = 0; ECB[i].wl_cnt = (EWL._count - k); k = EWL._count; k = 0; MCB[i].cb_valid = (MCB[i].id == 0xF5); MCB[i].wl_idx = k; MCB[i].wl_cnt = 0; MCB[i].wl_cnt = (MWL._count - k); k = MWL._count; k = 0; SCB[i].cb_valid = (SCB[i].id == 0xF6); SCB[i].wl_idx = k; SCB[i].wl_cnt = 0; SCB[i].wl_cnt = (SWL._count - k); k = SWL._count; k = 0; PCB[i].cb_valid = (PCB[i].id == 0xF7); PCB[i].wl_idx = k; PCB[i].wl_cnt = 0; PCB[i].wl_cnt = (PWL._count - k); k = PWL._count; k = 0; j = 0; QCB[i].cb_valid = (QCB[i].id == 0xFA); QCB[i].wl_idx = k; QCB[i].wl_cnt = 0; QCB[i].wl_cnt = (QWL._count - k); k = QWL._count; QCB[i].ml_idx = j; QCB[i].ml_cnt = (QML._count - j) j = QML._count; QML[i].addr = QML[i]._addr; QML[i].addr += 12; MUC_Thread_En = 1; MUC_Timer_En = 1; MUC_EventFlags_En = 1; MUC_Mutex_En = 1; MUC_Semaphore_En = 1; MUC_MemPool_En = 1; MUC_MsgQueue_En = 1; MUC_En = MUC_Thread_En | MUC_Timer_En | MUC_EventFlags_En | MUC_Mutex_En | MUC_Semaphore_En | MUC_MemPool_En | MUC_MsgQueue_En; TCB_En += TCB[i].cb_valid; TCB[i].out_type = 0; TCB[i].out_type = 1; TCB[i].out_type = 2; TCB[i].out_type = 3; TCB[i].out_type = 4; TCB[i].out_type += 4; CCB_En += CCB[i].cb_valid; SCB_En += SCB[i].cb_valid; MCB_En += MCB[i].cb_valid; ECB_En += ECB[i].cb_valid; PCB_En += PCB[i].cb_valid; QCB_En += QCB[i].cb_valid;