浏览代码

fix initialization error in bsp/stm32f10x

temporarily disable canapp initialization.
gbcwbz 9 年之前
父节点
当前提交
e35ad3e677
共有 4 个文件被更改,包括 16 次插入4 次删除
  1. 10 2
      bsp/stm32f10x/applications/SConscript
  2. 4 0
      bsp/stm32f10x/drivers/SConscript
  3. 1 1
      bsp/stm32f10x/drivers/bxcan.c
  4. 1 1
      bsp/stm32f10x/rtconfig.h

+ 10 - 2
bsp/stm32f10x/applications/SConscript

@@ -2,8 +2,16 @@ Import('RTT_ROOT')
 Import('rtconfig')
 from building import *
 
-cwd     = os.path.join(str(Dir('#')), 'applications')
-src	= Glob('*.c')
+cwd = os.path.join(str(Dir('#')), 'applications')
+
+src = Split("""
+application.c
+startup.c
+""")
+
+if GetDepend('RT_USING_CAN'):
+    src += ['canapp.c']
+
 CPPPATH = [cwd, str(Dir('#'))]
 
 group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)

+ 4 - 0
bsp/stm32f10x/drivers/SConscript

@@ -12,6 +12,10 @@ led.c
 usart.c
 """)
 
+# add canbus driver.
+if GetDepend('RT_USING_CAN'):
+    src += ['bxcan.c']
+
 # add Ethernet drivers.
 if GetDepend('RT_USING_LWIP'):
     src += ['dm9000a.c']

+ 1 - 1
bsp/stm32f10x/drivers/bxcan.c

@@ -1575,4 +1575,4 @@ int stm32_bxcan_init(void)
 }
 INIT_BOARD_EXPORT(stm32_bxcan_init);
 
-#endif /*RT_USING_CAN2*/
+#endif /*RT_USING_CAN*/

+ 1 - 1
bsp/stm32f10x/rtconfig.h

@@ -82,7 +82,7 @@
 
 #define RT_USING_PIN
 
-#define RT_USING_CAN
+//#define RT_USING_CAN
 
 #define RT_CAN_USING_BUS_HOOK