You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:: Location of the compiled Rust app and external libraries. The Rust compiler generates a *.rlib archive for the Rust app and each external Rust library here.
@@ -31,7 +41,7 @@ if %rust_build_profile%==release (
31
41
:: If this is the very first build, do the Mynewt build to generate the rust_app and rust_libcore stubs. This build will not link successfully but it's OK.
32
42
ifnotexist%rust_app_dest% (
33
43
@echo"----- Build Mynewt stubs for Rust app and Rust libcore (ignore error)"
34
-
newt\newt.exe build bluepill_my_sensor
44
+
newt\newt.exe build %mynewt_build_app%
35
45
)
36
46
37
47
:: Delete the compiled ROM image to force the Mynewt build to relink the Rust app with Mynewt OS.
@@ -101,7 +111,7 @@ popd
101
111
:: Copy Rust libcore to libs_rust_libcore.a, which is originally generated by libs\rust_libcore.
102
112
@echo"----- Copy Rust libcore"
103
113
:: Get the Rust compiler sysroot e.g. C:\Users\guppy\.rustup\toolchains\nightly-x86_64-pc-windows-msvc
104
-
for /f %%lin ('rustc --print sysroot --target thumbv7m-none-eabi') dosetrust_sysroot=%%l
114
+
for /f %%lin ('rustc --print sysroot --target %rust_build_target%') dosetrust_sysroot=%%l
105
115
:: Copy libcore to the Mynewt build folder.
106
116
ifnotexist%rust_libcore_dir% (
107
117
mkdir%rust_libcore_dir%
@@ -113,24 +123,24 @@ if exist %rust_libcore_dest% (
113
123
)
114
124
:: Get the Rust compiler sysroot e.g. C:\Users\guppy\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\thumbv7m-none-eabi\lib\libcore-6ea1de1c8a090cbc.rlib
115
125
:: Overwrite our custom libs_rust_libcore.a to inject Rust libcore into the build.
0 commit comments