We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
swift-mmio might be suitable for swift_os.
However, I have not succeeded in building swift_os with swift-mmio added as an external dependency.
On the other hand, swift-embedded-examples has succeeded in doing it. I don't know what's the difference between them.
Logs:
$ swift --version Swift version 6.0-dev (LLVM 3b959ba388a8ad9, Swift bb339b8f50f01fb) Target: aarch64-unknown-linux-gnu $ git diff diff --git a/Package.swift b/Package.swift index 9e41ccc..253a73d 100644 --- a/Package.swift +++ b/Package.swift @@ -7,12 +7,16 @@ let package = Package( products: [ .library(name: "Kernel", type: .static, targets: ["Kernel"]) ], + dependencies: [ + .package(url: "https://github.com/apple/swift-mmio", branch: "swift-embedded-examples") + ], targets: [ .target( name: "Kernel", dependencies: [ "Volatile", "MailboxMessage", + .product(name: "MMIO", package: "swift-mmio"), ], swiftSettings: [ .enableExperimentalFeature("Embedded"), $ make clang -x assembler -target aarch64-none-none-elf -c boot.s -o boot.o clang -x assembler -target aarch64-none-none-elf -c asmfunc.s -o asmfunc.o swift build --triple aarch64-none-none-elf -c release Building for production... <unknown>:0: error: unable to load standard library for target 'aarch64-none-none-elf' <unknown>:0: error: unable to load standard library for target 'aarch64-none-none-elf' make: *** [Makefile:25: swift] Error 1
The text was updated successfully, but these errors were encountered:
I built with --static-swift-stdlib and nothing changed.
--static-swift-stdlib
Sorry, something went wrong.
On Linux, stm32-uart-echo cannot be built with make too. So swift-mmio might be usable only on macOS.
make
$ swift --version Swift version 6.0-dev (LLVM 3b959ba388a8ad9, Swift bb339b8f50f01fb) Target: aarch64-unknown-linux-gnu $ git diff diff --git a/stm32-uart-echo/Makefile b/stm32-uart-echo/Makefile index 5d1c929..df6269c 100755 --- a/stm32-uart-echo/Makefile +++ b/stm32-uart-echo/Makefile @@ -17,10 +17,10 @@ BUILDROOT := $(SRCROOT)/.build/release # Setup tools and build flags ARCH := armv7em -TARGET := $(ARCH)-apple-none-macho +TARGET := $(ARCH)-none-none-eabi VECTORS_ADDRESS=-0x00200000 -SWIFT_BUILD := $(shell xcrun -f swift-build) +SWIFT_BUILD := swift build MACHO2BIN := $(SRCROOT)/../Tools/macho2bin.py .PHONY: build diff --git a/stm32-uart-echo/Sources/Support/startup.S b/stm32-uart-echo/Sources/Support/startup.S index 6e8c7c2..4328465 100644 --- a/stm32-uart-echo/Sources/Support/startup.S +++ b/stm32-uart-echo/Sources/Support/startup.S @@ -14,7 +14,6 @@ .text .thumb - .section __TEXT,__text,regular,pure_instructions .syntax unified // reset handler, main entry point $ make ... <unknown>:0: error: unable to load standard library for target 'armv7em-none-none-eabi' <unknown>:0: error: unable to load standard library for target 'armv7em-none-none-eabi' make: *** [Makefile:29: build] Error 1
kkebo
No branches or pull requests
swift-mmio might be suitable for swift_os.
However, I have not succeeded in building swift_os with swift-mmio added as an external dependency.
On the other hand, swift-embedded-examples has succeeded in doing it. I don't know what's the difference between them.
Logs:
The text was updated successfully, but these errors were encountered: