提交 0e977c00 编写于 作者: armink_ztl's avatar armink_ztl

Sync from master (0889bafd).

上级 18dfb50e
### 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
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"
......
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 "/"
......
......@@ -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')
......
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"
......
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"
......
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 "/"
......
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"
......
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"
......
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"
......
......@@ -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')
......
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"
......
......@@ -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')
......
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"
......
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"
......
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 "/"
......
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"
......
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
......
......@@ -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')
......
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
......
......@@ -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')
......
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
......
......@@ -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')
......
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"
......
......@@ -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
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"
......
......@@ -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')
......
......@@ -192,7 +192,6 @@
/* Select i2c bus drivers */
#define BSP_USING_I2C4
#define BSP_USING_ROMFS
#define BSP_USING_SDCARD
#define BSP_USING_SPIFLASH
......
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"
......
......@@ -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')
......
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"
......
......@@ -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')
......
......@@ -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')
......
......@@ -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')
......
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"
......
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"
......
; *************************************************************
; *** 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)
}
}
......@@ -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')
......
......@@ -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')
......
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"
......
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"
......
......@@ -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')
......
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"
......
......@@ -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')
......
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"
......
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 "/"
......
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"
......
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"
......
......@@ -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,
......
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"
......
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"
......
......@@ -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,
......
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"
......
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"
......
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"
......
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"
......
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"
......
......@@ -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);
}
/**
......
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"
......
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"
......
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"
......
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"
......
......@@ -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')
......
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"
......
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"
......
......@@ -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')
......
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"
......
/*
* 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);
......
......@@ -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 */
......
......@@ -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);
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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))
......
......@@ -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 */
......@@ -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;
......
......@@ -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;
......
......@@ -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
;/*
; * 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
\ No newline at end of file
END
\ No newline at end of file
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
......@@ -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
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
;/*
; * 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
......
/*
* 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
......
#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);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册