Introduce embedded development using Swift

Did anyone work on getting Swift usable on RISC-V yet? In particular the ESP-C3 looks like an interesting target.

5 Likes

I've build Swift for RISCV64 and Buildroot. The caveat is that I only was able to compile targeting Soft Float.

4 Likes

In the previous release, I added flags to the Swift frontend, but I found that there were standard flags later.

Now I use -Xcc -mhard-float, -Xcc -mfloat-abi=hard flags to tell the compiler to generate hard float instruction and ABI. I don't know if this would work in RISCV64.

2 Likes

I did try that, it was an issue of Clang assuming soft float for Swift when specifying the triple. Wasn't a dealbreaker for me.

3 Likes

This got me going on a chill Saturday morning. So good

I'm still going to learn C on a fundamental level before trying anything embedded with Swift. Would you agree that it is vital to know where and why Swift came from?

1 Like

I'd like to encourage anyone interested in embedded development to check out Embedded Swift, where a vision for a possible first class support for embedded programming is presented.

9 Likes

Here, I am an embedded EE engineer, interested in working with Swift lang. :)

3 Likes

Nice!