From e97c87d6a0947ff5e235d3e2c36a3d00279a78ae Mon Sep 17 00:00:00 2001 From: dzzxzz Date: Fri, 7 Oct 2011 03:00:12 +0000 Subject: [PATCH] fixed a compile error while using scons+iar for m16c git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1740 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- bsp/m16c62p/SConstruct | 9 ++++++--- libcpu/m16c/m16c62p/context_iar.S | 18 ------------------ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/bsp/m16c62p/SConstruct b/bsp/m16c62p/SConstruct index f4c22f106..7d8c0b0cd 100644 --- a/bsp/m16c62p/SConstruct +++ b/bsp/m16c62p/SConstruct @@ -12,11 +12,14 @@ env = Environment(tools = ['mingw'], AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, AR = rtconfig.AR, ARFLAGS = '-rc', - LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS, - CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'], - LINKCOM = ['$LINK $SOURCES $LINKFLAGS -f lnkm30627fhp.xcl -l rtt2m16c.map -o rtt2m16c.d34 -Omotorola-s28=$TARGET']) + LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) env.PrependENVPath('PATH', rtconfig.EXEC_PATH) +if rtconfig.PLATFORM == 'iar': + env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES']) + env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -f lnkm30627fhp.xcl -l rtt2m16c.map -o rtt2m16c.d34 -Omotorola-s28=$TARGET']) + env.Replace(ARFLAGS = '') + Export('RTT_ROOT') Export('rtconfig') diff --git a/libcpu/m16c/m16c62p/context_iar.S b/libcpu/m16c/m16c62p/context_iar.S index 0a7aa5af7..bd75341f4 100644 --- a/libcpu/m16c/m16c62p/context_iar.S +++ b/libcpu/m16c/m16c62p/context_iar.S @@ -23,15 +23,12 @@ RSEG CODE(1) - EXTERN rt_thread_switch_interrupt_flag EXTERN rt_interrupt_from_thread EXTERN rt_interrupt_to_thread PUBLIC rt_hw_interrupt_disable PUBLIC rt_hw_interrupt_enable PUBLIC rt_hw_context_switch_to - PUBLIC rt_hw_context_switch - PUBLIC rt_hw_context_switch_interrupt PUBLIC os_context_switch rt_hw_interrupt_disable: @@ -66,19 +63,4 @@ rt_hw_context_switch_to: POPM R0,R1,R2,R3,A0,A1,SB,FB REIT -rt_hw_context_switch: - MOV.W R0, rt_interrupt_from_thread - MOV.W R1, rt_interrupt_to_thread - INT #0 ;software interrupt 0 - RTS - -rt_hw_context_switch_interrupt: - CMP.W #1, rt_thread_switch_interrupt_flag - JEQ jump - MOV.W #1, rt_thread_switch_interrupt_flag - MOV.W R0, rt_interrupt_from_thread -jump - MOV.W R1, rt_interrupt_to_thread - RTS - END