浏览代码

Sync from master (0889bafda8e03c6809d43ec87ee28b940efb28aa).

armink 6 年之前
父节点
当前提交
0e977c00c4
共有 100 个文件被更改,包括 487 次插入556 次删除
  1. 23 25
      .github/PULL_REQUEST_TEMPLATE.md
  2. 3 3
      bsp/allwinner_tina/Kconfig
  3. 4 4
      bsp/amebaz/Kconfig
  4. 1 1
      bsp/amebaz/SConstruct
  5. 3 3
      bsp/asm9260t/Kconfig
  6. 3 3
      bsp/at91sam9260/Kconfig
  7. 4 4
      bsp/beaglebone/Kconfig
  8. 3 3
      bsp/ck802/Kconfig
  9. 3 3
      bsp/dm365/Kconfig
  10. 3 3
      bsp/gd32303e-eval/Kconfig
  11. 1 1
      bsp/gd32303e-eval/SConstruct
  12. 4 4
      bsp/gd32450z-eval/Kconfig
  13. 1 1
      bsp/gd32450z-eval/SConstruct
  14. 3 3
      bsp/gkipc/Kconfig
  15. 3 3
      bsp/hifive1/Kconfig
  16. 4 4
      bsp/imx6sx/cortex-a9/Kconfig
  17. 3 3
      bsp/imx6ul/Kconfig
  18. 4 3
      bsp/imxrt/imxrt1050-ArchMix/Kconfig
  19. 1 1
      bsp/imxrt/imxrt1050-ArchMix/SConstruct
  20. 4 3
      bsp/imxrt/imxrt1050-evk/Kconfig
  21. 1 1
      bsp/imxrt/imxrt1050-evk/SConstruct
  22. 4 3
      bsp/imxrt1052-evk/Kconfig
  23. 3 3
      bsp/imxrt1052-evk/SConstruct
  24. 3 3
      bsp/lpc408x/Kconfig
  25. 0 1
      bsp/lpc54114-lite/.config
  26. 3 3
      bsp/lpc54114-lite/Kconfig
  27. 1 1
      bsp/lpc54114-lite/SConstruct
  28. 0 1
      bsp/lpc54114-lite/rtconfig.h
  29. 3 3
      bsp/lpc54608-LPCXpresso/Kconfig
  30. 3 3
      bsp/lpc824/SConstruct
  31. 3 3
      bsp/ls1cdev/Kconfig
  32. 3 3
      bsp/mb9bf500r/SConstruct
  33. 3 3
      bsp/mb9bf506r/SConstruct
  34. 3 3
      bsp/mb9bf618s/SConstruct
  35. 3 3
      bsp/nuvoton_m05x/Kconfig
  36. 3 3
      bsp/nuvoton_m487/Kconfig
  37. 15 0
      bsp/nuvoton_m487/nuc487_flash.sct
  38. 1 1
      bsp/nuvoton_m487/rtconfig.py
  39. 3 3
      bsp/nuvoton_nuc472/SConstruct
  40. 3 3
      bsp/qemu-vexpress-a9/Kconfig
  41. 3 3
      bsp/qemu-vexpress-gemini/Kconfig
  42. 5 4
      bsp/qemu-vexpress-gemini/SConstruct
  43. 3 3
      bsp/raspi2/Kconfig
  44. 5 4
      bsp/realview-a8/SConstruct
  45. 3 3
      bsp/simulator/Kconfig
  46. 4 4
      bsp/stm32f107/Kconfig
  47. 3 3
      bsp/stm32f10x-HAL/Kconfig
  48. 3 3
      bsp/stm32f10x/Kconfig
  49. 5 5
      bsp/stm32f10x/drivers/usart.c
  50. 3 3
      bsp/stm32f20x/Kconfig
  51. 3 3
      bsp/stm32f40x/Kconfig
  52. 8 8
      bsp/stm32f40x/drivers/usart.c
  53. 3 3
      bsp/stm32f411-nucleo/Kconfig
  54. 3 3
      bsp/stm32f429-apollo/Kconfig
  55. 3 3
      bsp/stm32f429-armfly/Kconfig
  56. 3 3
      bsp/stm32f429-disco/Kconfig
  57. 3 3
      bsp/stm32f4xx-HAL/Kconfig
  58. 10 6
      bsp/stm32f4xx-HAL/drivers/drv_can.c
  59. 4 4
      bsp/stm32f7-disco/Kconfig
  60. 3 3
      bsp/stm32h743-nucleo/Kconfig
  61. 4 4
      bsp/stm32l476-nucleo/Kconfig
  62. 3 3
      bsp/swm320-lq100/Kconfig
  63. 3 3
      bsp/swm320-lq100/SConstruct
  64. 3 3
      bsp/tm4c129x/Kconfig
  65. 3 3
      bsp/tms320f28379d/Kconfig
  66. 2 2
      bsp/upd70f3454/SConstruct
  67. 3 3
      bsp/x1000/Kconfig
  68. 6 5
      components/dfs/filesystems/romfs/dfs_romfs.h
  69. 1 0
      components/dfs/include/dfs_file.h
  70. 3 3
      components/dfs/src/dfs.c
  71. 3 2
      components/dfs/src/dfs_file.c
  72. 1 1
      components/dfs/src/poll.c
  73. 2 0
      components/drivers/can/can.c
  74. 0 2
      components/drivers/serial/serial.c
  75. 29 30
      components/drivers/spi/spi_flash_sfud.c
  76. 18 1
      components/drivers/wlan/wlan_dev.c
  77. 18 0
      components/drivers/wlan/wlan_lwip.c
  78. 9 0
      components/libc/pthreads/pthread.h
  79. 63 67
      libcpu/arm/AT91SAM7S/context_rvds.S
  80. 9 13
      libcpu/arm/AT91SAM7X/context_rvds.S
  81. 2 16
      libcpu/arm/arm926/context_gcc.S
  82. 10 24
      libcpu/arm/arm926/context_iar.S
  83. 2 16
      libcpu/arm/arm926/start_iar.S
  84. 29 29
      libcpu/arm/common/backtrace.c
  85. 2 6
      libcpu/arm/cortex-m0/context_iar.S
  86. 2 6
      libcpu/arm/cortex-m0/context_rvds.S
  87. 2 6
      libcpu/arm/cortex-m3/context_iar.S
  88. 2 6
      libcpu/arm/cortex-m3/context_rvds.S
  89. 2 6
      libcpu/arm/cortex-m4/context_iar.S
  90. 2 6
      libcpu/arm/cortex-m7/context_iar.S
  91. 2 6
      libcpu/arm/cortex-m7/context_rvds.S
  92. 3 7
      libcpu/arm/cortex-r4/context_ccs.asm
  93. 2 16
      libcpu/arm/dm36x/context_rvds.S
  94. 2 6
      libcpu/arm/lpc214x/context_rvds.S
  95. 2 6
      libcpu/arm/lpc24xx/context_rvds.S
  96. 2 6
      libcpu/arm/s3c24x0/context_rvds.S
  97. 2 6
      libcpu/arm/s3c44b0/context_rvds.S
  98. 2 6
      libcpu/arm/sep4020/context_rvds.S
  99. 5 15
      libcpu/arm/zynq7000/context_gcc.S
  100. 8 17
      libcpu/arm/zynq7000/cp15.h

+ 23 - 25
.github/PULL_REQUEST_TEMPLATE.md

@@ -1,35 +1,33 @@
-### Summary of this Pull Request (PR) 拉取/合并请求的简述  
+## 拉取/合并请求描述:(PR description)
 
-**Add description here.** **请在这里加入描述**
+[
+这段方括号里的内容是您必须填写并替换掉的,否则PR不可能被合并。方括号外面的内容不需要修改,但请仔细阅读。
+The content in this square bracket must be filled in and replaced, otherwise PR can not be merged. The contents outside square brackets need not be changed, but please read them carefully.
 
-### Intent for your PR 拉取/合并请求的目的  
+请在这里填写您的PR描述,可以包括以下之一的内容:为什么提交这份PR;解决的问题是什么,你的解决方案是什么;
+Please fill in your PR description here, which can include one of the following items: why to submit this PR; what is the problem solved and what is your solution;
 
-Choose one (Mandatory): 必须选择一项  
+并确认并列出已经在什么情况或板卡上进行了测试。
+And confirm in which case or board have been tested.
+]
 
-- [ ] This PR is for a code-review and is intended to get feedback 本拉取/合并请求是一个草稿版本  
-- [ ] This PR is mature, and ready to be integrated into the repo 本拉取/合并请求是一个成熟版本  
+以下的内容请在提交PR后,一项项进行check,没问题后逐条在页面上打钩。
+The following contents should be checked item by item after submitted PR, and ticked on the browser one by one after no problem.
 
-### Reviewers (Mandatory): 代码审阅者(必须指定)
+### 当前拉取/合并请求的状态 Intent for your PR
 
-(@<github.com username(s)> Ex: @user1, @user2)  
+必须选择一项 Choose one (Mandatory):
 
-### Code Quality: 代码质量  
+- [ ] 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
+- [ ] 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo
 
-As part of this pull request, I've considered the following:  
-我在这个拉取/合并请求中已经考虑了:
+### 代码质量 Code Quality:
 
-- [ ] Already check the difference between PR and old code 已经仔细查看过代码改动的对比
-- [ ] Style guide is adhered to, including spacing, naming and other style 代码风格正确,包括缩进空格,命名及其他风格
-- [ ] All redundant code is removed and cleaned up 没有垃圾代码,代码尽量精简,不包含`#if 0`代码,不包含已经被注释了的代码
-- [ ] All modifications are justified and not affect other components or BSP 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP
-- [ ] I've commented appropriately where code is tricky 对难懂代码均提供对应的注释
-- [ ] Code in this PR is of high quality 本拉取/合并请求代码是高质量的
+我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
 
-### Testing:代码测试
-
-I've tested the code using the following test programs (provide list here):  
-我已经在如下场合跑过对应的测试:  
-
-- [ ] application 1
-- [ ] application 2
-- [ ] ...(add others here)
+- [ ] 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
+- [ ] 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other style
+- [ ] 没有垃圾代码,代码尽量精简,不包含`#if 0`代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
+- [ ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
+- [ ] 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
+- [ ] 本拉取/合并请求代码是高质量的 Code in this PR is of high quality

+ 3 - 3
bsp/allwinner_tina/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,7 +13,7 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 4 - 4
bsp/amebaz/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,12 +13,12 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"
     
-config $ENV_DIR
+config ENV_DIR
     string
     option env="ENV_ROOT"
     default "/"

+ 1 - 1
bsp/amebaz/SConstruct

@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 if rtconfig.PLATFORM == 'iar':
     env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
     env.Replace(ARFLAGS = [''])
-    env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/asm9260t/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/at91sam9260/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 4 - 4
bsp/beaglebone/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,12 +13,12 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example: default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"
     
-config $ENV_DIR
+config ENV_DIR
     string
     option env="ENV_ROOT"
     default "/"

+ 3 - 3
bsp/ck802/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,7 +13,7 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/dm365/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/gd32303e-eval/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 1 - 1
bsp/gd32303e-eval/SConstruct

@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 if rtconfig.PLATFORM == 'iar':
     env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
     env.Replace(ARFLAGS = [''])
-    env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 4 - 4
bsp/gd32450z-eval/Kconfig

@@ -1,19 +1,19 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
-    default: "../.."
+    default "../.."
     
 # you can change the RTT_ROOT default: "rt-thread"
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 1 - 1
bsp/gd32450z-eval/SConstruct

@@ -27,7 +27,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 if rtconfig.PLATFORM == 'iar':
     env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
     env.Replace(ARFLAGS = [''])
-    env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/gkipc/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/hifive1/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 4 - 4
bsp/imx6sx/cortex-a9/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../../.."
@@ -13,12 +13,12 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example: default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"
     
-config $ENV_DIR
+config ENV_DIR
     string
     option env="ENV_ROOT"
     default "/"

+ 3 - 3
bsp/imx6ul/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 4 - 3
bsp/imxrt/imxrt1050-ArchMix/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"
@@ -284,6 +284,7 @@ endmenu
     config RT_USING_RTC_HP
         bool "Using hp rtc"
         select RT_USING_RTC
+        select RT_USING_LIBC
         default n 
 #endmenu
 

+ 1 - 1
bsp/imxrt/imxrt1050-ArchMix/SConstruct

@@ -35,7 +35,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 if rtconfig.PLATFORM == 'iar':
     env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
     env.Replace(ARFLAGS = [''])
-    env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 4 - 3
bsp/imxrt/imxrt1050-evk/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"
@@ -445,6 +445,7 @@ endmenu
     config RT_USING_RTC_HP
         bool "Using hp rtc"
         select RT_USING_RTC
+        select RT_USING_LIBC
         default n 
 #endmenu
 

+ 1 - 1
bsp/imxrt/imxrt1050-evk/SConstruct

@@ -35,7 +35,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 if rtconfig.PLATFORM == 'iar':
     env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
     env.Replace(ARFLAGS = [''])
-    env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 4 - 3
bsp/imxrt1052-evk/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"
@@ -444,6 +444,7 @@ endmenu
     config RT_USING_RTC_HP
         bool "Using hp rtc"
         select RT_USING_RTC
+        select RT_USING_LIBC
         default n 
 #endmenu
 

+ 3 - 3
bsp/imxrt1052-evk/SConstruct

@@ -34,9 +34,9 @@ else:
 env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 
 if rtconfig.PLATFORM == 'iar':
-	env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
-	env.Replace(ARFLAGS = [''])
-	env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+    env.Replace(ARFLAGS = [''])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/lpc408x/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Project Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 0 - 1
bsp/lpc54114-lite/.config

@@ -385,6 +385,5 @@ CONFIG_BSP_USING_SPI2=y
 # Select i2c bus drivers
 #
 CONFIG_BSP_USING_I2C4=y
-CONFIG_BSP_USING_ROMFS=y
 CONFIG_BSP_USING_SDCARD=y
 CONFIG_BSP_USING_SPIFLASH=y

+ 3 - 3
bsp/lpc54114-lite/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 1 - 1
bsp/lpc54114-lite/SConstruct

@@ -28,7 +28,7 @@ env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 if rtconfig.PLATFORM == 'iar':
     env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
     env.Replace(ARFLAGS = [''])
-    env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 0 - 1
bsp/lpc54114-lite/rtconfig.h

@@ -192,7 +192,6 @@
 /* Select i2c bus drivers */
 
 #define BSP_USING_I2C4
-#define BSP_USING_ROMFS
 #define BSP_USING_SDCARD
 #define BSP_USING_SPIFLASH
 

+ 3 - 3
bsp/lpc54608-LPCXpresso/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,7 +13,7 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/lpc824/SConstruct

@@ -22,9 +22,9 @@ env = Environment(tools = ['mingw'],
 env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 
 if rtconfig.PLATFORM == 'iar':
-	env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
-	env.Replace(ARFLAGS = [''])
-	env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+    env.Replace(ARFLAGS = [''])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/ls1cdev/Kconfig

@@ -1,17 +1,17 @@
 mainmenu "RT-Thread Configuration"
 
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
     
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/mb9bf500r/SConstruct

@@ -20,9 +20,9 @@ env = Environment(tools = ['mingw'],
 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 -o $TARGET --map project.map'])
-	env.Replace(ARFLAGS = '')
+    env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+    env.Replace(ARFLAGS = [''])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/mb9bf506r/SConstruct

@@ -20,9 +20,9 @@ env = Environment(tools = ['mingw'],
 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 -o $TARGET --map project.map'])
-	env.Replace(ARFLAGS = '')
+    env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+    env.Replace(ARFLAGS = [''])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/mb9bf618s/SConstruct

@@ -20,9 +20,9 @@ env = Environment(tools = ['mingw'],
 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 -o $TARGET --map project.map'])
-	env.Replace(ARFLAGS = '')
+    env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+    env.Replace(ARFLAGS = [''])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/nuvoton_m05x/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/nuvoton_m487/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,7 +13,7 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 15 - 0
bsp/nuvoton_m487/nuc487_flash.sct

@@ -0,0 +1,15 @@
+; *************************************************************
+; *** Scatter-Loading Description File generated by uVision ***
+; *************************************************************
+
+LR_IROM1 0x00000000 0x00080000  {    ; load region size_region
+  ER_IROM1 0x00000000 0x00080000  {  ; load address = execution address
+   *.o (RESET, +First)
+   *(InRoot$$Sections)
+   .ANY (+RO)
+  }
+  RW_IRAM1 0x20000000 0x00028000  {  ; RW data
+   .ANY (+RW +ZI)
+  }
+}
+

+ 1 - 1
bsp/nuvoton_m487/rtconfig.py

@@ -3,7 +3,7 @@ import os
 # toolchains options
 ARCH='arm'
 CPU='cortex-m4'
-CROSS_TOOL='gcc'
+CROSS_TOOL='keil'
 
 if os.getenv('RTT_CC'):
 	CROSS_TOOL = os.getenv('RTT_CC')

+ 3 - 3
bsp/nuvoton_nuc472/SConstruct

@@ -20,9 +20,9 @@ env = Environment(tools = ['mingw'],
 env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 
 if rtconfig.PLATFORM == 'iar':
-	env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
-	env.Replace(ARFLAGS = [''])
-	env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map project.map'])
+    env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+    env.Replace(ARFLAGS = [''])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/qemu-vexpress-a9/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Project Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/qemu-vexpress-gemini/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Project Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 5 - 4
bsp/qemu-vexpress-gemini/SConstruct

@@ -13,11 +13,12 @@ from building import *
 TARGET = 'rtthread-vexpress.' + rtconfig.TARGET_EXT
 
 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)
+    AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
+    CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
+    AR = rtconfig.AR, ARFLAGS = '-rc',
+    LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
 env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
+env['ASCOM'] = env['ASPPCOM']
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/raspi2/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Project Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 5 - 4
bsp/realview-a8/SConstruct

@@ -13,11 +13,12 @@ from building import *
 TARGET = 'rtthread-realview.' + rtconfig.TARGET_EXT
 
 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)
+    AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
+    CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
+    AR = rtconfig.AR, ARFLAGS = '-rc',
+    LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
 env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
+env['ASCOM'] = env['ASPPCOM']
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/simulator/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 4 - 4
bsp/stm32f107/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,12 +13,12 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example: default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"
     
-config $ENV_DIR
+config ENV_DIR
     string
     option env="ENV_ROOT"
     default "/"

+ 3 - 3
bsp/stm32f10x-HAL/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/stm32f10x/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Project Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 5 - 5
bsp/stm32f10x/drivers/usart.c

@@ -293,8 +293,8 @@ static const struct rt_uart_ops stm32_uart_ops =
 struct stm32_uart uart1 =
 {
     USART1,
-#ifdef RT_SERIAL_USING_DMA
     USART1_IRQn,
+#ifdef RT_SERIAL_USING_DMA
     {
         DMA1_Channel5,
         DMA1_FLAG_GL5,
@@ -334,9 +334,9 @@ void DMA1_Channel5_IRQHandler(void) {
 /* UART2 device driver structure */
 struct stm32_uart uart2 =
 {
-    USART2,
-#ifdef RT_SERIAL_USING_DMA    
+    USART2,  
     USART2_IRQn,
+#ifdef RT_SERIAL_USING_DMA  
     {
         DMA1_Channel6,
         DMA1_FLAG_GL6,
@@ -377,8 +377,8 @@ void DMA1_Channel6_IRQHandler(void) {
 struct stm32_uart uart3 =
 {
     USART3,
-#ifdef RT_SERIAL_USING_DMA     
     USART3_IRQn,
+#ifdef RT_SERIAL_USING_DMA     
     {
         DMA1_Channel3,
         DMA1_FLAG_GL3,
@@ -419,8 +419,8 @@ void DMA1_Channel3_IRQHandler(void) {
 struct stm32_uart uart4 =
 {
     UART4,
-#ifdef RT_SERIAL_USING_DMA  
     UART4_IRQn,
+#ifdef RT_SERIAL_USING_DMA  
     {
         DMA2_Channel3,
         DMA2_FLAG_GL3,

+ 3 - 3
bsp/stm32f20x/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Project Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/stm32f40x/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Project Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 8 - 8
bsp/stm32f40x/drivers/usart.c

@@ -333,9 +333,9 @@ static const struct rt_uart_ops stm32_uart_ops =
 /* UART1 device driver structure */
 struct stm32_uart uart1 =
 {
-    USART1,
-#ifdef RT_SERIAL_USING_DMA       
+    USART1,     
     USART1_IRQn,
+#ifdef RT_SERIAL_USING_DMA  
     {
         DMA2_Stream5,
         DMA_Channel_4,
@@ -377,8 +377,8 @@ void DMA2_Stream5_IRQHandler(void) {
 struct stm32_uart uart2 =
 {
     USART2,
-#ifdef RT_SERIAL_USING_DMA
     USART2_IRQn,
+#ifdef RT_SERIAL_USING_DMA
     {
         DMA1_Stream5,
         DMA_Channel_4,
@@ -420,9 +420,9 @@ void DMA1_Stream5_IRQHandler(void) {
 /* UART3 device driver structure */
 struct stm32_uart uart3 =
 {
-    USART3,
-#ifdef RT_SERIAL_USING_DMA    
+    USART3,  
     USART3_IRQn,
+#ifdef RT_SERIAL_USING_DMA  
     {
         DMA1_Stream1,
         DMA_Channel_4,
@@ -465,8 +465,8 @@ void DMA1_Stream1_IRQHandler(void) {
 struct stm32_uart uart4 =
 {
     UART4,
-#ifdef RT_SERIAL_USING_DMA
     UART4_IRQn,
+#ifdef RT_SERIAL_USING_DMA
     {
         DMA1_Stream2,
         DMA_Channel_4,
@@ -508,9 +508,9 @@ void DMA1_Stream2_IRQHandler(void) {
 /* UART5 device driver structure */
 struct stm32_uart uart5 =
 {
-    UART5,
-#ifdef RT_SERIAL_USING_DMA    
+    UART5,  
     UART5_IRQn,
+#ifdef RT_SERIAL_USING_DMA  
     {
         DMA1_Stream0,
         DMA_Channel_4,

+ 3 - 3
bsp/stm32f411-nucleo/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/stm32f429-apollo/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/stm32f429-armfly/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/stm32f429-disco/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,7 +13,7 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/stm32f4xx-HAL/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 10 - 6
bsp/stm32f4xx-HAL/drivers/drv_can.c

@@ -362,12 +362,16 @@ void CAN2_SCE_IRQHandler(void)
  */
 void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan)
 {
-    /* TODO Error Callback */
-    /* Prevent unused argument(s) compilation warning */
-    UNUSED(hcan);
-    /* NOTE : This function Should not be modified, when the callback is needed,
-       the HAL_CAN_ErrorCallback could be implemented in the user file
-    */
+    __HAL_CAN_ENABLE_IT(hcan, CAN_IT_EWG |
+                               CAN_IT_EPV |
+                               CAN_IT_BOF |
+                               CAN_IT_LEC |
+                               CAN_IT_ERR |
+                               CAN_IT_FMP0|
+                               CAN_IT_FOV0|
+                               CAN_IT_FMP1|
+                               CAN_IT_FOV1|
+                               CAN_IT_TME);
 }
 
 /**

+ 4 - 4
bsp/stm32f7-disco/Kconfig

@@ -1,19 +1,19 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
-    default: "../.."
+    default "../.."
     
 # you can change the RTT_ROOT default: "../.."
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/stm32h743-nucleo/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 4 - 4
bsp/stm32l476-nucleo/Kconfig

@@ -1,19 +1,19 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
-    default: "../.."
+    default "../.."
 
 # you can change the RTT_ROOT default: "rt-thread"
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/swm320-lq100/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/swm320-lq100/SConstruct

@@ -25,9 +25,9 @@ env = Environment(tools = ['mingw'],
 env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
 
 if rtconfig.PLATFORM == 'iar':
-	env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
-	env.Replace(ARFLAGS = [''])
-	env.Replace(LINKCOM = ['$LINK $SOURCES $LINKFLAGS -o $TARGET --map rtthread.map'])
+    env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
+    env.Replace(ARFLAGS = [''])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/tm4c129x/Kconfig

@@ -1,16 +1,16 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 3 - 3
bsp/tms320f28379d/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,7 +13,7 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 2 - 2
bsp/upd70f3454/SConstruct

@@ -21,8 +21,8 @@ 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 lnk70f3454.xcl -l rtthread.map -Omotorola-s28=$TARGET'])
-    env.Replace(ARFLAGS = '')
+    env.Replace(ARFLAGS = [''])
+    env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
 
 Export('RTT_ROOT')
 Export('rtconfig')

+ 3 - 3
bsp/x1000/Kconfig

@@ -1,11 +1,11 @@
 mainmenu "RT-Thread Configuration"
 
-config $BSP_DIR
+config BSP_DIR
     string
     option env="BSP_ROOT"
     default "."
 
-config $RTT_DIR
+config RTT_DIR
     string
     option env="RTT_ROOT"
     default "../.."
@@ -13,7 +13,7 @@ config $RTT_DIR
 # you can change the RTT_ROOT default "../.." to your rtthread_root,
 # example : default "F:/git_repositories/rt-thread"
 
-config $PKGS_DIR
+config PKGS_DIR
     string
     option env="PKGS_ROOT"
     default "packages"

+ 6 - 5
components/dfs/filesystems/romfs/dfs_romfs.h

@@ -1,10 +1,11 @@
 /*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2019, RT-Thread Development Team
  *
  * SPDX-License-Identifier: Apache-2.0
  *
  * Change Logs:
  * Date           Author       Notes
+ * 2019/01/13     Bernard      code cleanup
  */
 
 #ifndef __DFS_ROMFS_H__
@@ -17,11 +18,11 @@
 
 struct romfs_dirent
 {
-	rt_uint32_t		 type;	/* dirent type */
+    rt_uint32_t      type;  /* dirent type */
 
-	const char		 *name;	/* dirent name */
-	const rt_uint8_t *data;	/* file date ptr */
-	rt_size_t		 size;	/* file size */
+    const char       *name; /* dirent name */
+    const rt_uint8_t *data; /* file date ptr */
+    rt_size_t        size;  /* file size */
 };
 
 int dfs_romfs_init(void);

+ 1 - 0
components/dfs/include/dfs_file.h

@@ -44,6 +44,7 @@ struct dfs_fd
     char *path;                  /* Name (below mount point) */
     int ref_count;               /* Descriptor reference count */
 
+    struct dfs_filesystem *fs;
     const struct dfs_file_ops *fops;
 
     uint32_t flags;              /* Descriptor flags */

+ 3 - 3
components/dfs/src/dfs.c

@@ -18,7 +18,7 @@
 #include <lwp.h>
 #endif
 
-#ifdef RT_USING_DFS_DEVFS
+#if defined(RT_USING_DFS_DEVFS) && defined(RT_USING_POSIX)
 #include <libc.h>
 #endif
 
@@ -216,7 +216,7 @@ struct dfs_fd *fd_get(int fd)
     struct dfs_fd *d;
     struct dfs_fdtable *fdt;
 
-#ifdef RT_USING_DFS_DEVFS
+#if defined(RT_USING_DFS_DEVFS) && defined(RT_USING_POSIX)
     if ((0 <= fd) && (fd <= 2))
         fd = libc_stdio_get_console();
 #endif
@@ -320,7 +320,7 @@ int fd_is_open(const char *pathname)
             fd = fdt->fds[index];
             if (fd == NULL || fd->fops == NULL || fd->path == NULL) continue;
 
-            if (fd->fops == fs->ops->fops && strcmp(fd->path, mountpath) == 0)
+            if (fd->fs == fs && strcmp(fd->path, mountpath) == 0)
             {
                 /* found file in file descriptor table */
                 rt_free(fullpath);

+ 3 - 2
components/dfs/src/dfs_file.c

@@ -66,7 +66,8 @@ int dfs_file_open(struct dfs_fd *fd, const char *path, int flags)
     }
 
     LOG_D("open in filesystem:%s", fs->ops->name);
-    fd->fops  = fs->ops->fops; /* set file ops */
+    fd->fs    = fs;             /* set file system */
+    fd->fops  = fs->ops->fops;  /* set file ops */
 
     /* initialize the fd item */
     fd->type  = FT_REGULAR;
@@ -171,7 +172,7 @@ int dfs_file_ioctl(struct dfs_fd *fd, int cmd, void *args)
             return fd->flags; /* return flags */
         case F_SETFL:
             {
-                int flags = (int)args;
+                int flags = (int)(rt_base_t)args;
                 int mask  = O_NONBLOCK | O_APPEND;
 
                 flags &= mask;

+ 1 - 1
components/dfs/src/poll.c

@@ -40,7 +40,7 @@ static int __wqueue_pollwake(struct rt_wqueue_node *wait, void *key)
 {
     struct rt_poll_node *pn;
 
-    if (key && !((rt_uint32_t)key & wait->key))
+    if (key && !((rt_ubase_t)key & wait->key))
         return -1;
 
     pn = rt_container_of(wait, struct rt_poll_node, wqn);

+ 2 - 0
components/drivers/can/can.c

@@ -405,6 +405,7 @@ static rt_err_t rt_can_close(struct rt_device *dev)
 
         rt_free(rx_fifo);
         dev->open_flag &= ~RT_DEVICE_FLAG_INT_RX;
+        can->can_rx = RT_NULL;
         /* configure low level device */
         can->ops->control(can, RT_DEVICE_CTRL_CLR_INT, (void *)RT_DEVICE_FLAG_INT_RX);
     }
@@ -418,6 +419,7 @@ static rt_err_t rt_can_close(struct rt_device *dev)
 
         rt_free(tx_fifo);
         dev->open_flag &= ~RT_DEVICE_FLAG_INT_TX;
+        can->can_tx = RT_NULL;
         /* configure low level device */
         can->ops->control(can, RT_DEVICE_CTRL_CLR_INT, (void *)RT_DEVICE_FLAG_INT_TX);
     }

+ 0 - 2
components/drivers/serial/serial.c

@@ -566,13 +566,11 @@ static rt_err_t rt_serial_open(struct rt_device *dev, rt_uint16_t oflag)
 
     LOG_D("open serial device: 0x%08x with open flag: 0x%04x",
         dev, oflag);
-#ifdef RT_SERIAL_USING_DMA
     /* check device flag with the open flag */
     if ((oflag & RT_DEVICE_FLAG_DMA_RX) && !(dev->flag & RT_DEVICE_FLAG_DMA_RX))
         return -RT_EIO;
     if ((oflag & RT_DEVICE_FLAG_DMA_TX) && !(dev->flag & RT_DEVICE_FLAG_DMA_TX))
         return -RT_EIO;
-#endif /* RT_SERIAL_USING_DMA */
     if ((oflag & RT_DEVICE_FLAG_INT_RX) && !(dev->flag & RT_DEVICE_FLAG_INT_RX))
         return -RT_EIO;
     if ((oflag & RT_DEVICE_FLAG_INT_TX) && !(dev->flag & RT_DEVICE_FLAG_INT_TX))

+ 29 - 30
components/drivers/spi/spi_flash_sfud.c

@@ -455,6 +455,35 @@ rt_err_t rt_sfud_flash_delete(rt_spi_flash_device_t spi_flash_dev) {
     return RT_EOK;
 }
 
+sfud_flash_t rt_sfud_flash_find(const char *spi_dev_name)
+{
+    rt_spi_flash_device_t  rtt_dev       = RT_NULL;
+    struct rt_spi_device  *rt_spi_device = RT_NULL;
+    sfud_flash_t           sfud_dev      = RT_NULL;
+    
+    rt_spi_device = (struct rt_spi_device *) rt_device_find(spi_dev_name);
+    if (rt_spi_device == RT_NULL || rt_spi_device->parent.type != RT_Device_Class_SPIDevice)
+    {
+        rt_kprintf("ERROR: SPI device %s not found!\n", spi_dev_name);
+        goto error;
+    }
+
+    rtt_dev = (rt_spi_flash_device_t)(rt_spi_device->user_data);
+    if (rtt_dev && rtt_dev->user_data)
+    {
+        sfud_dev = (sfud_flash_t)(rtt_dev->user_data);
+        return sfud_dev;
+    }
+    else
+    {
+        rt_kprintf("ERROR: SFUD flash device not found!\n");
+        goto error;
+    }
+
+error:
+    return RT_NULL;
+}
+
 #if defined(RT_USING_FINSH) && defined(FINSH_USING_MSH)
 
 #include <finsh.h>
@@ -698,36 +727,6 @@ static void sf(uint8_t argc, char **argv) {
     }
 }
 MSH_CMD_EXPORT(sf, SPI Flash operate.);
-
-sfud_flash_t rt_sfud_flash_find(const char *spi_dev_name)
-{
-    rt_spi_flash_device_t  rtt_dev       = RT_NULL;
-    struct rt_spi_device  *rt_spi_device = RT_NULL;
-    sfud_flash_t           sfud_dev      = RT_NULL;
-    
-    rt_spi_device = (struct rt_spi_device *) rt_device_find(spi_dev_name);
-    if (rt_spi_device == RT_NULL || rt_spi_device->parent.type != RT_Device_Class_SPIDevice)
-    {
-        rt_kprintf("ERROR: SPI device %s not found!\n", spi_dev_name);
-        goto error;
-    }
-
-    rtt_dev = (rt_spi_flash_device_t)(rt_spi_device->user_data);
-    if (rtt_dev && rtt_dev->user_data)
-    {
-        sfud_dev = (sfud_flash_t)(rtt_dev->user_data);
-        return sfud_dev;
-    }
-    else
-    {
-        rt_kprintf("ERROR: SFUD flash device not found!\n");
-        goto error;
-    }
-
-error:
-    return RT_NULL;
-}
-
 #endif /* defined(RT_USING_FINSH) && defined(FINSH_USING_MSH) */
 
 #endif /* RT_USING_SFUD */

+ 18 - 1
components/drivers/wlan/wlan_dev.c

@@ -754,6 +754,18 @@ static rt_err_t _rt_wlan_dev_control(rt_device_t dev, int cmd, void *args)
     return err;
 }
 
+#ifdef RT_USING_DEVICE_OPS
+const static struct rt_device_ops wlan_ops =
+{
+    _rt_wlan_dev_init,
+    RT_NULL,
+    RT_NULL,
+    RT_NULL,
+    RT_NULL,
+    _rt_wlan_dev_control
+};
+#endif
+
 rt_err_t rt_wlan_dev_register(struct rt_wlan_device *wlan, const char *name, const struct rt_wlan_dev_ops *ops, rt_uint32_t flag, void *user_data)
 {
     rt_err_t err = RT_EOK;
@@ -765,13 +777,18 @@ rt_err_t rt_wlan_dev_register(struct rt_wlan_device *wlan, const char *name, con
     }
 
     rt_memset(wlan, 0, sizeof(struct rt_wlan_device));
-
+    
+#ifdef RT_USING_DEVICE_OPS
+    wlan->device.ops = &wlan_ops;
+#else
     wlan->device.init       = _rt_wlan_dev_init;
     wlan->device.open       = RT_NULL;
     wlan->device.close      = RT_NULL;
     wlan->device.read       = RT_NULL;
     wlan->device.write      = RT_NULL;
     wlan->device.control    = _rt_wlan_dev_control;
+#endif
+
     wlan->device.user_data  = RT_NULL;
 
     wlan->device.type = RT_Device_Class_NetIf;

+ 18 - 0
components/drivers/wlan/wlan_lwip.c

@@ -372,6 +372,18 @@ static rt_err_t rt_wlan_lwip_protocol_send(rt_device_t device, struct pbuf *p)
 #endif
 }
 
+#ifdef RT_USING_DEVICE_OPS
+const static struct rt_device_ops wlan_lwip_ops =
+{
+    RT_NULL,
+    RT_NULL,
+    RT_NULL,
+    RT_NULL,
+    RT_NULL,
+    rt_wlan_lwip_protocol_control
+};
+#endif
+
 static struct rt_wlan_prot *rt_wlan_lwip_protocol_register(struct rt_wlan_prot *prot, struct rt_wlan_device *wlan)
 {
     struct eth_device *eth = RT_NULL;
@@ -417,12 +429,18 @@ static struct rt_wlan_prot *rt_wlan_lwip_protocol_register(struct rt_wlan_prot *
     rt_memset(lwip_prot, 0, sizeof(struct lwip_prot_des));
 
     eth = &lwip_prot->eth;
+
+#ifdef RT_USING_DEVICE_OPS
+    eth->parent.ops        = &wlan_lwip_ops;
+#else
     eth->parent.init       = RT_NULL;
     eth->parent.open       = RT_NULL;
     eth->parent.close      = RT_NULL;
     eth->parent.read       = RT_NULL;
     eth->parent.write      = RT_NULL;
     eth->parent.control    = rt_wlan_lwip_protocol_control;
+#endif
+
     eth->parent.user_data  = wlan;
     eth->eth_rx     = RT_NULL;
     eth->eth_tx     = rt_wlan_lwip_protocol_send;

+ 9 - 0
components/libc/pthreads/pthread.h

@@ -12,6 +12,11 @@
 #define __PTHREAD_H__
 
 #include <rtthread.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <posix_types.h>
 #include <sched.h>
 
@@ -262,4 +267,8 @@ int pthread_barrier_init(pthread_barrier_t           *barrier,
 
 int pthread_barrier_wait(pthread_barrier_t *barrier);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif

+ 63 - 67
libcpu/arm/AT91SAM7S/context_rvds.S

@@ -1,43 +1,39 @@
-;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
-; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
-; *
-; * Change Logs:
-; * Date           Author       Notes
-; * 2009-01-20     Bernard      first version
-; */
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
+ * Date           Author       Notes
+ * 2009-01-20     Bernard      first version
+ */
 
 NOINT	EQU		0xc0	; disable interrupt in psr
 
-	AREA |.text|, CODE, READONLY, ALIGN=2
-	ARM
-	REQUIRE8
-	PRESERVE8
+    AREA |.text|, CODE, READONLY, ALIGN=2
+    ARM
+    REQUIRE8
+    PRESERVE8
 
 ;/*
 ; * rt_base_t rt_hw_interrupt_disable();
 ; */
 rt_hw_interrupt_disable	PROC
-	EXPORT rt_hw_interrupt_disable
-	MRS r0, cpsr
-	ORR r1, r0, #NOINT
-	MSR cpsr_c, r1
-	BX	lr
-	ENDP
+    EXPORT rt_hw_interrupt_disable
+    MRS r0, cpsr
+    ORR r1, r0, #NOINT
+    MSR cpsr_c, r1
+    BX	lr
+    ENDP
 
 ;/*
 ; * void rt_hw_interrupt_enable(rt_base_t level);
 ; */
 rt_hw_interrupt_enable	PROC
-	EXPORT rt_hw_interrupt_enable
-	MSR cpsr_c, r0
-	BX	lr
-	ENDP
+    EXPORT rt_hw_interrupt_enable
+    MSR cpsr_c, r0
+    BX	lr
+    ENDP
 
 ;/*
 ; * void rt_hw_context_switch(rt_uint32 from, rt_uint32 to);
@@ -45,63 +41,63 @@ rt_hw_interrupt_enable	PROC
 ; * r1 --> to
 ; */
 rt_hw_context_switch	PROC
-	EXPORT rt_hw_context_switch
-	STMFD	sp!, {lr}			; push pc (lr should be pushed in place of PC)
-	STMFD	sp!, {r0-r12, lr}	; push lr & register file
+    EXPORT rt_hw_context_switch
+    STMFD	sp!, {lr}			; push pc (lr should be pushed in place of PC)
+    STMFD	sp!, {r0-r12, lr}	; push lr & register file
 
-	MRS		r4, cpsr
-	STMFD	sp!, {r4}			; push cpsr
-	MRS		r4, spsr
-	STMFD	sp!, {r4}			; push spsr
+    MRS		r4, cpsr
+    STMFD	sp!, {r4}			; push cpsr
+    MRS		r4, spsr
+    STMFD	sp!, {r4}			; push spsr
 
-	STR	sp, [r0]				; store sp in preempted tasks TCB
-	LDR	sp, [r1]				; get new task stack pointer
+    STR	sp, [r0]				; store sp in preempted tasks TCB
+    LDR	sp, [r1]				; get new task stack pointer
 
-	LDMFD	sp!, {r4}			; pop new task spsr
-	MSR	spsr_cxsf, r4
-	LDMFD	sp!, {r4}			; pop new task cpsr
-	MSR	cpsr_cxsf, r4
+    LDMFD	sp!, {r4}			; pop new task spsr
+    MSR	spsr_cxsf, r4
+    LDMFD	sp!, {r4}			; pop new task cpsr
+    MSR	cpsr_cxsf, r4
 
-	LDMFD	sp!, {r0-r12, lr, pc}	; pop new task r0-r12, lr & pc
-	ENDP
+    LDMFD	sp!, {r0-r12, lr, pc}	; pop new task r0-r12, lr & pc
+    ENDP
 
 ;/*
 ; * void rt_hw_context_switch_to(rt_uint32 to);
 ; * r0 --> to
 ; */
 rt_hw_context_switch_to	PROC
-	EXPORT rt_hw_context_switch_to
-	LDR	sp, [r0]				; get new task stack pointer
+    EXPORT rt_hw_context_switch_to
+    LDR	sp, [r0]				; get new task stack pointer
 
-	LDMFD	sp!, {r4}			; pop new task spsr
-	MSR	spsr_cxsf, r4
-	LDMFD	sp!, {r4}			; pop new task cpsr
-	MSR	cpsr_cxsf, r4
+    LDMFD	sp!, {r4}			; pop new task spsr
+    MSR	spsr_cxsf, r4
+    LDMFD	sp!, {r4}			; pop new task cpsr
+    MSR	cpsr_cxsf, r4
 
-	LDMFD	sp!, {r0-r12, lr, pc}	; pop new task r0-r12, lr & pc
-	ENDP
+    LDMFD	sp!, {r0-r12, lr, pc}	; pop new task r0-r12, lr & pc
+    ENDP
 
 ;/*
 ; * void rt_hw_context_switch_interrupt(rt_uint32 from, rt_uint32 to);
 ; */
-	IMPORT rt_thread_switch_interrupt_flag
-	IMPORT rt_interrupt_from_thread
-	IMPORT rt_interrupt_to_thread
+    IMPORT rt_thread_switch_interrupt_flag
+    IMPORT rt_interrupt_from_thread
+    IMPORT rt_interrupt_to_thread
 
 rt_hw_context_switch_interrupt	PROC
-	EXPORT rt_hw_context_switch_interrupt
-	LDR r2, =rt_thread_switch_interrupt_flag
-	LDR r3, [r2]
-	CMP r3, #1
-	BEQ _reswitch
-	MOV r3, #1							; set rt_thread_switch_interrupt_flag to 1
-	STR r3, [r2]
-	LDR r2, =rt_interrupt_from_thread	; set rt_interrupt_from_thread
-	STR r0, [r2]
+    EXPORT rt_hw_context_switch_interrupt
+    LDR r2, =rt_thread_switch_interrupt_flag
+    LDR r3, [r2]
+    CMP r3, #1
+    BEQ _reswitch
+    MOV r3, #1							; set rt_thread_switch_interrupt_flag to 1
+    STR r3, [r2]
+    LDR r2, =rt_interrupt_from_thread	; set rt_interrupt_from_thread
+    STR r0, [r2]
 _reswitch
-	LDR r2, =rt_interrupt_to_thread		; set rt_interrupt_to_thread
-	STR r1, [r2]
-	BX	lr
-	ENDP
+    LDR r2, =rt_interrupt_to_thread		; set rt_interrupt_to_thread
+    STR r1, [r2]
+    BX	lr
+    ENDP
 
-	END
+    END

+ 9 - 13
libcpu/arm/AT91SAM7X/context_rvds.S

@@ -1,16 +1,12 @@
-;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
-; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
-; *
-; * Change Logs:
-; * Date           Author       Notes
-; * 2009-01-20     Bernard      first version
-; */
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
+ * Date           Author       Notes
+ * 2009-01-20     Bernard      first version
+ */
 
 NOINT	EQU		0xc0	; disable interrupt in psr
 

+ 2 - 16
libcpu/arm/arm926/context_gcc.S

@@ -1,21 +1,7 @@
 ;/*
-; * File      : context_iar.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; *  This program is free software; you can redistribute it and/or modify
-; *  it under the terms of the GNU General Public License as published by
-; *  the Free Software Foundation; either version 2 of the License, or
-; *  (at your option) any later version.
-; *
-; *  This program is distributed in the hope that it will be useful,
-; *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-; *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; *  GNU General Public License for more details.
-; *
-; *  You should have received a copy of the GNU General Public License along
-; *  with this program; if not, write to the Free Software Foundation, Inc.,
-; *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 10 - 24
libcpu/arm/arm926/context_iar.S

@@ -1,27 +1,13 @@
-;/*
-; * File      : context_iar.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
-; *
-; *  This program is free software; you can redistribute it and/or modify
-; *  it under the terms of the GNU General Public License as published by
-; *  the Free Software Foundation; either version 2 of the License, or
-; *  (at your option) any later version.
-; *
-; *  This program is distributed in the hope that it will be useful,
-; *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-; *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; *  GNU General Public License for more details.
-; *
-; *  You should have received a copy of the GNU General Public License along
-; *  with this program; if not, write to the Free Software Foundation, Inc.,
-; *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-; *
-; * Change Logs:
-; * Date           Author       Notes
-; * 2011-08-14     weety      copy from mini2440
-; * 2015-04-15     ArdaFu     convert from context_gcc.s
-; */
+/*
+ * Copyright (c) 2006-2018, RT-Thread Development Team
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Change Logs:
+ * Date           Author       Notes
+ * 2011-08-14     weety    copy from mini2440
+ * 2015-04-15     ArdaFu     convert from context_gcc.s
+ */
 
 #define NOINT            0xc0
 

+ 2 - 16
libcpu/arm/arm926/start_iar.S

@@ -1,21 +1,7 @@
 ;/*
-; * File      : start.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; *  This program is free software; you can redistribute it and/or modify
-; *  it under the terms of the GNU General Public License as published by
-; *  the Free Software Foundation; either version 2 of the License, or
-; *  (at your option) any later version.
-; *
-; *  This program is distributed in the hope that it will be useful,
-; *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-; *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; *  GNU General Public License for more details.
-; *
-; *  You should have received a copy of the GNU General Public License along
-; *  with this program; if not, write to the Free Software Foundation, Inc.,
-; *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 29 - 29
libcpu/arm/common/backtrace.c

@@ -13,51 +13,51 @@
 #ifdef __GNUC__
 /*
 -->High Address,Stack Top
-PC<-----|
-LR	 	 |
-IP	 	 |
-FP	 	 |
-......		 |
-PC<-|	 |
-LR	 |	 |
-IP	 |	 |
+PC<------|
+LR       |
+IP       |
+FP       |
+......   |
+PC <-|   |
+LR   |   |
+IP   |   |
 FP---|-- |
-......	 |
-PC	 |
-LR	 |
-IP 	 |
+......   |
+PC       |
+LR       |
+IP       |
 FP---
 -->Low Address,Stack Bottom
 */
 void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry)
 {
-	rt_uint32_t i, pc, func_entry;
+    rt_uint32_t i, pc, func_entry;
 
-	pc = *fp;
-	rt_kprintf("[0x%x]\n", pc-0xC);
+    pc = *fp;
+    rt_kprintf("[0x%x]\n", pc-0xC);
 
-	for(i=0; i<10; i++)
-	{
-		fp = (rt_uint32_t *)*(fp - 3);
-		pc = *fp ;
+    for(i=0; i<10; i++)
+    {
+        fp = (rt_uint32_t *)*(fp - 3);
+        pc = *fp ;
 
-		func_entry = pc - 0xC;
+        func_entry = pc - 0xC;
 
-		if(func_entry <= 0x30000000) break;
+        if(func_entry <= 0x30000000) break;
 
-		if(func_entry == thread_entry)
-		{
-			rt_kprintf("EntryPoint:0x%x\n", func_entry);
+        if(func_entry == thread_entry)
+        {
+            rt_kprintf("EntryPoint:0x%x\n", func_entry);
 
-			break;
-		}
+            break;
+        }
 
-		rt_kprintf("[0x%x]\n", func_entry);
-	}
+        rt_kprintf("[0x%x]\n", func_entry);
+    }
 }
 #else
 void rt_hw_backtrace(rt_uint32_t *fp, rt_uint32_t thread_entry)
 {
-	/* old compiler implementation */
+    /* old compiler implementation */
 }
 #endif

+ 2 - 6
libcpu/arm/cortex-m0/context_iar.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_iar.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2009, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/cortex-m0/context_rvds.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2009, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/cortex-m3/context_iar.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_iar.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006 - 2013, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/cortex-m3/context_rvds.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/cortex-m4/context_iar.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_iar.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/cortex-m7/context_iar.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_iar.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/cortex-m7/context_rvds.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 3 - 7
libcpu/arm/cortex-r4/context_ccs.asm

@@ -1,14 +1,10 @@
 ;/*
-; * File      : context_ccs.asm
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
-; * Date       Author       Notes
+; * Date           Author       Notes
 ; * 2009-01-20     Bernard      first version
 ; * 2011-07-22     Bernard      added thumb mode porting
 ; * 2013-05-24     Grissiom     port to CCS

+ 2 - 16
libcpu/arm/dm36x/context_rvds.S

@@ -1,21 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; *  This program is free software; you can redistribute it and/or modify
-; *  it under the terms of the GNU General Public License as published by
-; *  the Free Software Foundation; either version 2 of the License, or
-; *  (at your option) any later version.
-; *
-; *  This program is distributed in the hope that it will be useful,
-; *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-; *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; *  GNU General Public License for more details.
-; *
-; *  You should have received a copy of the GNU General Public License along
-; *  with this program; if not, write to the Free Software Foundation, Inc.,
-; *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/lpc214x/context_rvds.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/lpc24xx/context_rvds.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/s3c24x0/context_rvds.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/s3c44b0/context_rvds.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 2 - 6
libcpu/arm/sep4020/context_rvds.S

@@ -1,11 +1,7 @@
 ;/*
-; * File      : context_rvds.S
-; * This file is part of RT-Thread RTOS
-; * COPYRIGHT (C) 2006, RT-Thread Development Team
+; * Copyright (c) 2006-2018, RT-Thread Development Team
 ; *
-; * The license and distribution terms for this file may be
-; * found in the file LICENSE in this distribution or at
-; * http://www.rt-thread.org/license/LICENSE
+; * SPDX-License-Identifier: Apache-2.0
 ; *
 ; * Change Logs:
 ; * Date           Author       Notes

+ 5 - 15
libcpu/arm/zynq7000/context_gcc.S

@@ -1,21 +1,11 @@
 /*
- * COPYRIGHT (C) 2013-2014, Shanghai Real-Thread Technology Co., Ltd
+ * Copyright (c) 2006-2018, Shanghai Real-Thread Technology Co., Ltd
  *
- *  All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Change Logs:
+ * Date           Author       Notes
+ * 2009-01-20     Bernard      first version
  */
 
 #define NOINT           0xc0

+ 8 - 17
libcpu/arm/zynq7000/cp15.h

@@ -1,25 +1,16 @@
-#ifndef __CP15_H__
-#define __CP15_H__
 /*
- * COPYRIGHT (C) 2013-2014, Shanghai Real-Thread Technology Co., Ltd
- *
- *  All rights reserved.
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (c) 2006-2018, RT-Thread Development Team
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * SPDX-License-Identifier: Apache-2.0
  *
- *  You should have received a copy of the GNU General Public License along
- *  with this program; if not, write to the Free Software Foundation, Inc.,
- *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * Change Logs:
+ * Date           Author       Notes
+ * 2013-07-20     Bernard      first version
  */
 
+#ifndef __CP15_H__
+#define __CP15_H__
+
 unsigned long rt_cpu_get_smp_id(void);
 
 void rt_cpu_mmu_disable(void);

部分文件因为文件数量过多而无法显示