arch: arc: remove unused codes and definition

Signed-off-by: Jingru <jingru@synopsys.com>
This commit is contained in:
Jingru
2020-04-10 12:43:46 +08:00
parent e64869280b
commit 8c2af057f4
7 changed files with 13 additions and 106 deletions

View File

@@ -57,7 +57,7 @@ __PORT__ void port_systick_config(uint32_t cycle_per_tick) // Configure SysTick
}
__PORT__ void port_systick_priority_set(uint32_t prio) // Sets the int priority
{
int_pri_set(INTNO_TIMER0, prio); // get system tick from timer 0 arc_timer.h
int_pri_set(BOARD_OS_TIMER_INTNO, prio); // get system tick from timer 0 arc_timer.h
}
@@ -103,7 +103,6 @@ __PORT__ void port_systick_reload(uint32_t cycle_per_tick)
__PORT__ void port_systick_pending_reset(void)
{
// SCB->ICSR |= SCB_ICSR_PENDSTCLR_Msk;
arc_aux_write(AUX_TIMER0_CTRL, TIMER_CTRL_IP); // interrupt pending
}
@@ -132,14 +131,11 @@ __PORT__ void port_standby_mode_enter(void)
__STATIC__ void port_fault_do_diagnosis(port_fault_regs_t *regs) // 硬件错误诊断
{
k_fault_log_writer("\n\n====================== Fault Diagnosis =====================\n");
}
__PORT__ void port_fault_diagnosis(void)
{
k_fault_log_writer("\n\n====================== Fault Diagnosis .. =====================\n");
}
__PORT__ void __NAKED__ HardFault_Handler(void)

View File

@@ -16,7 +16,7 @@
*---------------------------------------------------------------------------*/
#ifndef _PORT_CONFIG_H_
#define _PORT_CONFIG_H_
#define _PORT_CONFIG_H_
#define TOS_CFG_CPU_ADDR_SIZE CPU_WORD_SIZE_32
#define TOS_CFG_CPU_DATA_SIZE CPU_WORD_SIZE_32

View File

@@ -11,6 +11,7 @@
.global k_curr_task
.global k_next_task
.global g_exc_nest_count
.global g_context_switch_reqflg
.global tos_knl_irq_enter
@@ -145,9 +146,9 @@ exc_entry_cpu:
mov blink, sp
mov r3, sp /* as exception handler's para(p_excinfo) */
ld r0, [k_irq_nest_cnt]
ld r0, [g_exc_nest_count]
add r1, r0, 1
st r1, [k_irq_nest_cnt]
st r1, [g_exc_nest_count]
brne r0, 0, exc_handler_1
/* change to exception stack if interrupt happened in task context */
mov sp, _e_stack
@@ -169,7 +170,7 @@ exc_handler_1:
/* interrupts are not allowed */
ret_exc:
POP sp
mov r1, k_irq_nest_cnt
mov r1, g_exc_nest_count
ld r0, [r1]
sub r0, r0, 1
st r0, [r1]
@@ -236,9 +237,9 @@ exc_entry_int:
mov blink, sp
clri /* disable interrupt */
ld r3, [k_irq_nest_cnt]
ld r3, [g_exc_nest_count]
add r2, r3, 1
st r2, [k_irq_nest_cnt]
st r2, [g_exc_nest_count]
seti /* enable higher priority interrupt */
brne r3, 0, irq_handler_1
@@ -282,7 +283,7 @@ ret_int:
clri /* disable interrupt */
POP r3 /* irq priority */
POP sp
mov r1, k_irq_nest_cnt
mov r1, g_exc_nest_count
ld r0, [r1]
sub r0, r0, 1
st r0, [r1]

View File

@@ -18,7 +18,7 @@
#include <tos_k.h>
#include "embARC.h"
void tos_cup_tick_handler(void)
void tos_cpu_tick_handler(void)
{
arc_timer_int_clear(BOARD_OS_TIMER_ID);
tos_tick_handler();
@@ -115,7 +115,7 @@ __KNL__ void cpu_systick_init(k_cycle_t cycle_per_tick)
arc_timer_stop(BOARD_OS_TIMER_ID);
arc_timer_start(BOARD_OS_TIMER_ID, TIMER_CTRL_IE | TIMER_CTRL_NH, cycle_per_tick);
int_handler_install(BOARD_OS_TIMER_INTNO, (INT_HANDLER_T)tos_cup_tick_handler);
int_handler_install(BOARD_OS_TIMER_INTNO, (INT_HANDLER_T)tos_cpu_tick_handler);
int_pri_set(BOARD_OS_TIMER_INTNO, INT_PRI_MIN + 1);
int_enable(BOARD_OS_TIMER_INTNO);
}
@@ -200,7 +200,7 @@ __KNL__ void cpu_standby_mode_enter(void)
#endif /* TOS_CFG_PWR_MGR_EN */
uint32_t g_context_switch_reqflg;
uint32_t g_exc_nest_count;
extern void start_r(void);
#if ARC_FEATURE_STACK_CHECK

View File

@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>blinky</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>Makefile</name>
<type>1</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/board/ARC_NSIM_EM/GCC/hello_world/Makefile</location>
</link>
<link>
<name>tencentos</name>
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>tencentos/arch</name>
<type>2</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/arch</location>
</link>
<link>
<name>tencentos/board</name>
<type>2</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/board</location>
</link>
<link>
<name>tencentos/components</name>
<type>2</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/components</location>
</link>
<link>
<name>tencentos/devices</name>
<type>2</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/devices</location>
</link>
<link>
<name>tencentos/kernel</name>
<type>2</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/kernel</location>
</link>
<link>
<name>tencentos/net</name>
<type>2</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/net</location>
</link>
<link>
<name>tencentos/osal</name>
<type>2</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/osal</location>
</link>
<link>
<name>tencentos/platform</name>
<type>2</type>
<location>C:/Users/jingru/Documents/git/embarc/TencentOS-tiny/platform</location>
</link>
</linkedResources>
<variableList>
<variable>
<name>TencentOS_ROOT</name>
<value>file:/C:/Users/jingru/Documents/git/tencentos/TencentOS-tiny</value>
</variable>
</variableList>
</projectDescription>

View File

@@ -235,13 +235,7 @@ vpath %.S $(sort $(dir $(ASM_SOURCES_S)))
# EMBARC_PREBUILT_LIBRARY = -Hldopt=-Bgrouplib
EMBARC_PREBUILT_LIBRARY = $(EMBARC_OUT_DIR)/libembarc.a
# EMBARC_PREBUILT_LIBRARY += $(EMBARC_OUT_DIR)/board/board.o
# EMBARC_PREBUILT_LIBRARY += $(EMBARC_OUT_DIR)/arc/startup/arc_startup.o
# EMBARC_PREBUILT_LIBRARY += $(EMBARC_OUT_DIR)/arc/startup/arc_cxx_support.o
# EMBARC_PREBUILT_LIBRARY += $(EMBARC_OUT_DIR)/libboard_nsim.a
# EMBARC_PREBUILT_LIBRARY += $(EMBARC_OUT_DIR)/libcpuarc.a
# EMBARC_PREBUILT_LIBRARY += $(EMBARC_OUT_DIR)/libembarc_libc.a
# EMBARC_PREBUILT_LIBRARY += $(EMBARC_OUT_DIR)/libembarc_console.a
build_embarc_lib: | $(BUILD_DIR)
make -f $(EMBARC_BSP_ROOT)/options/options.mk V=1 embarc_lib

Binary file not shown.