-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[rust][tools] Fix Rust build example configuration handling #11584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
8f32c4e
f89e400
a05282c
5d38245
fb9252b
75310a8
fc87fc7
269212f
53a4e0c
49869b5
076f21c
1d59a52
6f86c79
537b128
33479c1
cf128c8
425b779
7a097ec
795f63f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -246,6 +246,25 @@ component.cherryusb_cdc: | |
| - CONFIG_RT_CHERRYUSB_DEVICE_DWC2_ST=y | ||
| - CONFIG_RT_CHERRYUSB_DEVICE_CDC_ACM=y | ||
| - CONFIG_RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM=y | ||
| # ------ rust CI ------ | ||
| rust: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 新增的 Rust CI 目前也只覆盖 F407 GCC 下的 core/component,没有覆盖:
另外作者是否有实际在硬件板卡上将RUST成功运行过?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 感谢提醒,已补充 application 的显式 CI 配置:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 关于真实硬件:目前没有在真实 STM32F407 板卡上烧录并运行 Rust。当前完成的是 F407 GCC + Rust Nightly 的完整固件构建验证;此前的运行验证是在 QEMU A9 单核和 SMP 环境中完成的。
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 目前新的 workflows 显示 awaiting approval。@Rbb666 @foxg1ove1 麻烦您们有空时批准一下 CI workflows,谢谢您们啦~
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
这个可以给出测试截图吗?然后最好建议找块实际的开发板,测试下这块是否可以真实跑通哈
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
感谢您的建议,以上是我补充的PR 当前提交的测试结果和截图。
我在 stm32f407-rt-spark BSP 上使用 GCC 和 Nightly Rust 进行了完整交叉构建,Rust target 为 thumbv7em-none-eabihf。本次构建中:
Rust core 构建并链接成功;
thread、queue、mutex、param、semaphore 这 5 个 Rust application 示例均构建成功,并正常参与最终链接;
Rust log component 构建成功,component registry library 正常参与链接;
最终成功生成 rt-thread.elf、rtthread.hex 和 rtthread.bin;
SCons 正常执行至 scons: done building targets.。
构建时使用的主要命令为:
RTT_EXEC_PATH=/usr/bin RUSTUP_TOOLCHAIN=nightly scons --strict -j1
我也补充验证了 clean 路径:先关闭全部 Rust 相关配置,再执行 scons -c。日志显示 build/rust、build/example_usrapp、build/example_component 和 build/rust_modules 均在配置关闭状态下成功注册并被清理,clean 过程中没有重新触发 Rust 构建。截图中的 rust_modules 使用的是专门的 cleanup sentinel,仅用于验证 clean guard,不代表完成了 module 运行验证。
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 我可能表达有误,这块不仅是编译的截图,而是qemu运行RUST后的截图哈
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 感谢您的指正,之前是我对您的意思理解不够准确。
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| <<: *scons | ||
| pre_build: | | ||
| python3 -m pip install --user toml | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly --profile minimal | ||
| sudo ln -sf "$HOME/.cargo/bin/cargo" /usr/local/bin/cargo | ||
| sudo ln -sf "$HOME/.cargo/bin/rustc" /usr/local/bin/rustc | ||
| sudo ln -sf "$HOME/.cargo/bin/rustup" /usr/local/bin/rustup | ||
| rustup target add thumbv7em-none-eabihf | ||
| rustc --version | ||
| cargo --version | ||
| kconfig: | ||
| - CONFIG_RT_USING_RUST=y | ||
| - CONFIG_RT_RUST_CORE=y | ||
| - CONFIG_RT_USING_RUST_EXAMPLES=y | ||
| - CONFIG_RT_RUST_BUILD_APPLICATIONS=y | ||
| - CONFIG_RT_RUST_BUILD_COMPONENTS=y | ||
| - CONFIG_RUST_LOG_COMPONENT=y | ||
|
|
||
| devices.soft_i2c: | ||
| <<: *scons | ||
|
|
||





Uh oh!
There was an error while loading. Please reload this page.