RT-thread官方源码点击进入
官方教程:https://www.rt-thread.org/document/
一、起因
最近开始学习板载操作系统,由于RT-thread作为一款国产物联网操作系统,教程详细,使用方便,所以这一个系统作为入门实时操作系统的入门之选,为了记录学习过程,在这记录发帖子。
这里我们使用VScode编程,基于EIDE进行编写程序,不使用官方RT-thread studio
关于TR-thread的入门教程有很多,这里就不再赘述
RT-thread新手入门教程——》教程
准备工作
在开发前,我们需要先安装好
- keil MDK,
- stm32pack包
- STM32cubeMX,
- vscode 安装好EIDE插件(也可以使用TR-thread studio官方插件)
- RT-thread源码
- Env
由于不使用RT-thread studio,因此配置工程我们需要安装Env(点击跳转)进行下载,解压到安装目录。
Env 用户手册
并将Env配置到右键菜单内如下:
根据图片上的步骤操作,就可以在任意文件夹下通过右键菜单来启动 Env 控制台。效果如下:
关于RT-thread源码
RT-Thread源代码目录结构如下图所示:
名称 | 描述 |
---|---|
BSP | Board Support Package(板级支持包)基于各种开发板的移植 |
components | RT-Thread 的各个组件代码,例如 finsh,gui 等。 |
documentation | 相关文档,如编码规范等 |
examples | 相关示例代码 |
include | RT-Thread 内核的头文件。 |
libcpu | 各类芯片的移植代码。 |
src | RT-Thread 内核的源文件。 |
tools | RT-Thread 命令构建工具的脚本文件。 |
RT-Thread RTOS 支持许多架构,并且已经涵盖了当前应用中的主要架构。涉及的架构和芯片制造商有:
ARM Cortex-M0/M0+:如芯片制造商 ST
ARM Cortex-M3:如芯片制造商 ST、全志、灵动等.
ARM Cortex-M4:如芯片制造商 ST、Nuvton、NXP、GigaDevice、Realtek、Ambiq Micro等
ARM Cortex-M7:如芯片制造商 ST、NXP
ARM Cortex-M23:如芯片制造商 GigaDevice
ARM Cortex-M33:如芯片制造商 ST
ARM Cortex-R4
ARM Cortex-A8/A9:如芯片制造商 NXP
ARM7:如芯片制造商Samsung
ARM9:如芯片制造商Allwinner、Xilinx 、GOKE
ARM11:如芯片制造商Fullhan
MIPS32:如芯片制造商loongson、Ingenic
RISC-V:如芯片制造商Hifive、Kendryte、芯来Nuclei
ARC:如芯片制造商SYNOPSYS
DSP:如芯片制造商 TI
C-Sky
x86
支持的 IDE 和编译器
RT-Thread主要支持的IDE/编译器包括:
- MDK KEIL
- IAR
- Gcc
- RT-Thread Studio
使用基于 Python 的 scons 进行命令行生成。我们使用KEIL的工程,使用vscode gcc调试编译。
打开项目
打开源码中的BSP(板级支持包)文件夹 可以看到rt-thread支持的芯片都在各个文件夹中,找到STM32,选择对应的开发板文件夹(我是用的是野火的开发板,所以我这里打开的是野火的板子文件夹)
打开会是一个基于rt-thread的keil工程
双击就可以打开这个工程,并且编译,下载进开发板。
各个目录所包含的文件类型的描述如下表所示:
目录名 | 描述 |
---|---|
applications | RT-Thread 应用程序。 |
rt-thread | RT-Thread 的源文件。 |
components | RT-Thread 的各个组件目录。 |
include | RT-Thread 内核的头文件。 |
libcpu | 各类芯片的移植代码,此处包含了 STM32 的移植文件。 |
src | RT-Thread 内核的源文件。 |
tools | RT-Thread 命令构建工具的脚本文件。 |
drivers | RT-Thread 的驱动,不同平台的底层驱动具体实现。 |
Libraries | ST 的 STM32 固件库文件。 |
创建项目
由于这个rt-thread的代码是上层文件夹的,复制出来很麻烦,在内部修改,容易改动源码。
因此我们需要基于源码创建一个独立项目
1、空白处右键,启动Env,或者通过CD到当前的板载项目目录
我们需要使用scons命令
SCons 是一套由 Python 语言编写的开源构建系统,类似于 GNU Make。它采用不同于通常 Makefile 文件的方式,而是使用 SConstruct 和 SConscript 文件来替代。这些文件也是 Python 脚本,能够使用标准的 Python 语法来编写。所以在 SConstruct、SConscript 文件中可以调用 Python 标准库进行各类复杂的处理,而不局限于 Makefile 设定的规则。
/
-- rtconfig.py ---- 控制SCons构建的配置文件,存放了如工具链,构建参数等配置。
-- SConscript
-- SConstruct ---- SCons的入口脚本,初始化了SCons构建rt-thread所需的必要环境
-- Kconfig ---- 顶层Kconfig文件,menuconfig的入口Kconfig文件
-- rt-thread/
--- src/
---- SConscript ---- 各级源码的scons子脚本,控制当前级别下的源码构建行为
---- Kconfig ---- 各级源码的Kconfig子脚本,存放当前级别下的配置项
---- **.c
关于scons的使用教程----》scons教程
2、在界面内输入命令scons --dist
上面显示更新了新的MDK5等工程
3、这时在我们的文件夹多了一个dist的文件夹,里面有一个生成的项目的压缩包和一个文件夹,这个项目就是独立外部源码的项目
4、我们的独立工程就创建完成了
打开工程
我们在这个生成的工程文件夹内,右键打开Env输入 code打开vscode
选择EIDE插件(使用RT-Thread Studio插件也是差不多操作),选择导入项目、再选择MDK,打开该项目的keil工程
配置好烧入器,配置好调试器,具体方法这里不过多赘述,并且在终端我们也可以调用scons
点击编译并且烧入程序
至此我们的板子led灯被成功点亮
打开vscode的串口调试助手,可以看到输出了RT-thread的版本信息。
我们输入list_thread,可以查看系统的线程信息
配置外设资源
在目录右键打开Env下打开输入menuconfig 打开配置界面。如图所示
通过键盘上的上下键移动光标,选中 (Hardware Drivers Config)然后按回车键进入硬件驱动配置菜单。
在硬件配置菜单里有三个选项,分别是 (板载外设配置菜单)、(片上外设配置菜单)和(扩展模块配置菜单),按回车键进入板载外设配置菜单。
在外设外设配置菜单里按空格建开启,按回车建进入
最后保存退出
然后右移光标选中 Save 按回车键保存,然后继续按按回车键退出配置工具。
更新工程
输入命令 scons --target=mdk5 -s 重新生成 MDK5 的工程。
输入命令code 打开vscode 使用EIDE重新导入工程,导入vscode编译下载
从新打开的工程可以看到,外设菜单中多了很多的外设文件。
至此我们完成了RT-thread 的工程配置。
bookmarked!!, I love your web site!
Its like you read my mind! You appear to know so much about this,
like you wrote the book in it or something. I think that you
could do with a few pics to drive the message home a bit, but other than that, this is wonderful blog.
A great read. I’ll certainly be back.
My coder is trying to persuade me to move to .net from PHP.
I have always disliked the idea because of the expenses.
But he’s tryiong none the less. I’ve been using WordPress on various websites for about a year and am
concerned about switching to another platform. I have heard
good things about blogengine.net. Is there a way I can transfer all my wordpress posts into
it? Any kind of help would be really appreciated!
My partner and I absolutely love your blog and find many
of your post’s to be just what I’m looking for. Would you offer guest writers to write content for yourself?
I wouldn’t mind writing a post or elaborating on many of the subjects you write related to
here. Again, awesome web site!
With soaring multipliers, Aviator keeps players on their toes. It’s all about strategy and timing. Players in India can start with demo play and then go for real money rounds, aiming to cash out at just the right time.
online aviator game aviator crash game .
hello there and thank you for yolur information ?
I?ve certainly picked up anything new from right here. I did
however expertise several technical points using this site, as
I experienced to reload the site a lot of times
previous to I could get it to load properly. I hhad been wondeering if
your web host is OK? Not that I’m complaining, but sluggish
loading instanes times will ofrten affect your placement iin google and could damage your high-quality score iif ads aand
marketing with Adwords. Anyway I am adding this
RSS to mmy email and can look out for a llot mor of your respective
excitiing content. Ensure that you update this abain very
soon.. https://Storage.Googleapis.com/wordpresssupport/wordpress-support/Key-features-of-WordPress-live-chat-plugins.html
Aviator is ideal for gamers in India who crave real money thrills and strategic play. Master the timing to cash out before the plane crashes! With demo modes and bonus offers, it’s perfect for new and seasoned players alike.
online aviator game [url=https://aviator-games-online.ru/]aviator crash game[/url] .
Stops vs thins mucous how to buy priligy in usa reviews They removed 5 liters in December, 2016
Very nice post. I just stumbled upon your weblog and wished to say that I’ve truly enjoyed browsing
your blog posts. After all I’ll be subscribing to your
feed and I hope you write again very soon!
Aviator combines excitement with high-stakes decisions, perfect for Indian players who love strategic gambling. Start with a demo to practice cash-out timing, then dive into real money rounds for serious rewards.
aviator game for money [url=https://aviator-games-online.ru/]avaitor game[/url] .
I’m gone to say to my little brother, that he should also
pay a quick visit this blog on regular basis to take
updated from most up-to-date news update.
Good day the newlyweds!
Elopement packages in NYC with professional proposal photography services. Celebrate your love with stunning photos that will last a lifetime. Our team of skilled photographers will document every detail of your engagement. Choose our full service proposal photography for an unforgettable experience. Make your NYC elopement proposal magical with our expert team.
The site here – https://wykop.pl/ludzie/daretodream
Marriage proposal photoshoot ideas
proposal photographers
Proposal photo shoot locations in New York
Engagement and proposal ideas NYC
Good luck!
How to Securely Log Into Debank: A Step-by-Step Guide
Logging into your Debank account is the first step towards managing your DeFi portfolio. Ensuring that your login credentials remain secure is crucial for protecting your investments. In this guide, we’ll walk you through the process of logging into Debank safely and efficiently.
debank portfolio
Step 1: Visit the Official Debank Website
Start by navigating to the official Debank website. Avoid using search engine results to prevent phishing attacks. The URL should be .
Step 2: Click on the Login Button
On the homepage, locate the Login button usually positioned at the top right corner of the page. Click on it to proceed to the login page.
Step 3: Enter Your Credentials
Input your registered email address and password. Ensure your password is strong, combining letters, numbers, and symbols to enhance security.
Step 4: Two-Factor Authentication
It’s recommended to enable Two-Factor Authentication (2FA) for an additional security layer. This can be done using an app like Google Authenticator. Enter the code generated by your 2FA app to continue.
Step 5: Secure Your Account
Regularly Update Your Password: Change your password every 3-6 months.
Use a Password Manager: Helps store and recall complex passwords without difficulty.
Monitor Account Activity: Regularly check for any unauthorized access or activity.
Additional Tips for Staying Safe Online
Be vigilant about where you input your credentials. Always ensure that you have a secure and reliable internet connection. Avoid accessing your Debank account on public Wi-Fi networks, which might be unsecured.
By following these guidelines, you can enhance the security of your Debank login process and safeguard your investments effectively. Stay aware of the latest security practices and updates from Debank to keep your account secure.
Good day the newlyweds!
Elopement packages in NYC with professional proposal photography services. Celebrate your love with stunning photos that will last a lifetime. Our team of skilled photographers will document every detail of your engagement. Choose our full service proposal photography for an unforgettable experience. Make your NYC elopement proposal magical with our expert team.
The site here – https://community.jamf.com/t5/user/viewprofilepage/user-id/164980
Rooftop engagement proposal in NYC
Romantic proposal photography NYC
Central Park proposal photographer
Capturing the perfect proposal in New York
Good luck!
Illinois media coverage (https://knowyourmeme.com) announcements are essential
for sharing updates about corporate activities.
They allow news organizations to deliver stories about
the latest developments. A carefully composed news bulletin may seize the
interest of news writers, creating positive publicity.
Additionally, news briefs provide an reliable channel of updates,
which media platforms can rely on. By crafting frequent media releases, businesses guarantee their recognition within the market,
building credibility while solidifying partnerships with the
press.
Every weekend i used to go to see this site, because i wish for enjoyment, for the reason that this this web page conations truly good funny information too.
It’s truly a great and helpful piece of info. I’m glad that you just
shared this useful info with us. Please stay us up to date like this.
Thanks for sharing.
Здравствуйте!
Обработка от клопов в Могочае с СЭС Эксперт — это надежность и эффективность. Мы гарантируем быстрый и длительный результат с помощью профессиональных услуг. Обратитесь к нам, чтобы решить проблему.
Подробная информация – https://xn—-7sbbfmcearkbx1bdaoet8fxbxmpa.xn--p1ai/
Дезинсекция от клопов
Как справиться с клопами в Сосновоборске
Клопы в доме: как бороться
Эффективные средства от клопов
[url=https://xn—-7sbbfmcearkbx1bdaoet8fxbxmpa.xn--p1ai]Как выбрать СЭС для обработки от клопов[/url]
Удачи!
Good day fans of games!
Find top free online games and explore diverse genres without spending a cent. Play online games without download and enjoy quick access. Discover free browser games for a seamless experience. Compete in free multiplayer online games and show off your skills. Choose no-download online games for fast, on-the-go fun.
The site with description here – https://www.appinn.com/the-stanley-parable
free online games no download
free online trivia games
free online RPG games
free games online with no download
Good luck!
What is DeBridge Finance?
DeBridge Finance is an innovative solution designed to facilitate seamless cross-chain blockchain operations. It empowers developers and users by allowing the transfer of data and assets across different blockchain networks efficiently and securely.
debridge swap
Key Features of DeBridge Finance
DeBridge Finance stands out due to its remarkable features which include:
Interoperability: The platform provides effective interoperability between multiple blockchains, eliminating the boundaries that exist.
Security: By leveraging advanced security protocols, DeBridge ensures the safe transit of data and assets.
Scalability: It is designed to handle a growing number of transactions without compromising on performance.
How Does DeBridge Finance Work?
DeBridge Finance operates through a combination of smart contracts and decentralized communication protocols. These components work together to authenticate and execute cross-chain data and asset transfers swiftly and securely.
Smart Contracts
The platform utilizes smart contracts to automate processes and ensure trustless operations across different chain environments.
Decentralized Communication
Communication across blockchains is made possible through a decentralized message protocol, enabling effective data sharing.
Benefits of Using DeBridge Finance
Choosing DeBridge Finance for cross-chain operations brings several advantages:
Cost-Effectiveness: By integrating various blockchains, it reduces the cost and complexity of using multiple networks.
Developer-Friendly: Offering robust tools and resources, DeBridge makes it easier for developers to build cross-chain applications.
Enhanced User Experience: Users benefit from smoother transactions without the need to switch between different network interfaces.
Hello!
Discover new free games online and be the first to try trending titles. Dive into immersive worlds with free online RPG games. Experience lifelike scenarios in free online simulation games. Play your favorites with play free games no registration required. Start now with play free online games now and enjoy uninterrupted fun.
The site with description here – https://github.com/lodle/awesomium
best online free games to play
free sports games online
free mobile games online
free online platformer games
Good luck!
Aerodrome Finance: Unlocking Potential for Growth
The world of aerodrome finance is pivotal for ensuring the efficient operation, enhancement, and expansion of aerodrome facilities globally. With the increasing demand for air travel, understanding aerodrome financial processes is more important than ever.
Aerodrome fi
Why Aerodrome Finance Matters
Aerodrome finance plays a critical role in the lifespan of airport projects, providing necessary funding from initial development to ongoing management. Here are key reasons why it matters:
Infrastructure Development: Secure financial backing enables the construction and maintenance of essential airport infrastructure.
Operational Efficiency: Adequate funding ensures that airports can operate smoothly, adapting to technological advancements and logistical demands.
Economic Growth: Airports serve as economic hubs; their development stimulates job creation and boosts local economies.
Aerodrome Finance Strategies
Various strategies can be employed to optimize aerodrome finance, ensuring both immediate and long-term benefits. Here are a few notable approaches:
Public-Private Partnerships (PPP)
These partnerships combine public sector oversight and private sector efficiency, leading to shared risks and rewards. They facilitate diverse financial resources and innovative solutions for airport projects.
Revenue Diversification
Exploring non-aeronautical revenue streams, such as retail concessions and property leases, can significantly bolster an airport’s financial resilience. Such diversification allows for a steady income flow independent of ticket sales.
Sustainable Financing
Adopting sustainable financial practices, including green bonds and ESG (Environmental, Social, and Governance) criteria, aligns with modern ecological standards and attracts environmentally conscious investors.
Quality posts is the key to attract the visitors to visit the web site, that’s what this web page is providing.
It’s going to be finish of mine day, except before end
I am reading this fantastic article to increase
my know-how.
You really make it appear really easy with your presentation however
I to find this matter to be actually one thing which I think I’d
never understand. It seems too complicated and very wide for
me. I am taking a look forward for your subsequent post,
I will try to get the grasp of it!
continuously i used to read smaller content which also clear their motive,
and that is also happening with this post which I am reading here.
Explore the Aviator game for an intense betting experience where timing is key. Beginners can start with a free demo to learn the ropes, while seasoned players can enjoy the risk and potential big wins.
online aviator game aviator game for money .
With havin so much content do you ever run into any problems of plagorism or
copyright violation? My blog has a lot of unique content I’ve either authored
myself or outsourced but it appears a lot of
it is popping it up all over the web without my agreement.
Do you know any methods to help reduce content from being stolen? I’d
certainly appreciate it.
I really like what you guys are up too. This kind of clever work and
reporting! Keep up the fantastic works guys I’ve incorporated you guys to my personal
blogroll.
Indian gamers are flocking to Aviator for its quick play and real-time rewards. Practice in demo mode to get the feel of the game, then move to real money rounds for the ultimate rush. Cash out before it’s too late!
online aviator game aviator game for money .
Usually I do not read post on blogs, but I
wish to say that this write-up very pressured me to check out and
do it! Your writing style has been surprised me. Thank you, very great post.
Simply wish to say your article is as astonishing.
The clarity for your submit is simply great and i could think you’re knowledgeable in this subject.
Well along with your permission allow me to snatch your RSS feed to stay up to date with coming near near post.
Thanks 1,000,000 and please continue the enjoyable work.
Very descriptive post, I enjoyed that bit. Will there be a part 2?
These are truly wonderful ideas in about blogging. You have
touched some pleasant things here. Any way keep up wrinting.
I believe what you posted was very reasonable.
But, what about this? suppose you wrote a catchier post title?
I mean, I don’t wish to tell you how to run your blog,
however suppose you added a headline that grabbed a person’s attention?
I mean 基于STM32的RT-thread工程创建-使用VSCode –
冯笑一的主页 is a little boring. You could peek at Yahoo’s front page and see how they
create post titles to get viewers to click. You might add a video or a picture or two to grab readers excited
about everything’ve written. In my opinion, it could
make your posts a little livelier. – Freddie,
I am not sure where you are getting your info, but great topic.
I needs to spend some time learning much more or understanding
more. Thanks for fantastic information I was looking for this info for my mission.
There are various tools and websites that claim to permit users to view private Instagram profiles, but it’s important to read these taking into consideration caution. Many of these tools can be unreliable, may require personal information, or could violate Instagram’s terms of service.
Additionally, using such tools how can you view private instagram accounts compromise your own security or guide to scams.
The safest and most ethical way to view a private profile is
to send a follow request directly to the user. Always prioritize privacy and exaltation in your online
interactions.