Hi @andyliu,
I just went to findchips for the pricing info. And yes, it is mostly a supply constraint at the moment.
What I was trying to say was (at least in my experience) that the most embedded chips are not 600MHz Cortex M7 chips but more lower end MCU like the Cortex M0/M3 types.
If the idea is to support lower end chips eventually but to get it working on a higher end first (more room / faster etc) I fully understand, since there is little to no room on an M0. But I would like to make the point that lower end MCUs are in much larger volume and not taking these into account for swift embedded would be missing a large target audience.
I'm happy to read that CMSIS support is already in Zephyr, although in a limited fashion. I will take a further look into Zephyr. A quick read of the original link didn't mention CMSIS (my assumption that it was missing was incorrect) but I am more familiar with RTX / FreeRTOS / SafeRTOS, which are CMSIS compliant.
Please do not misunderstand me that I am criticizing what you are tying to do, I fully support your idea and the time you are spending on this. I am just trying to give some input from someone who spend the last 20 years working on embedded devices.
I really appreciate your advice. And you are right, our plan is to use this high-end chip to find out the limitation of Swift in this area. If everything goes well, we can do some cost-down work then. Due to the chip shortage, seems there is still a long way to go
Something I have found really interesting is the way SwiftWASM has approach their project. If you look closely at their additions to the codebases you can see how similar it is to bare-metal-esque targets. I have been reading into it even more and am slowly working towards creating something similar for thumbv7em targets, with the hope that it can be kept in sync with upstream until it can be upstreamed.
edit: assuming we use the thumbv7em target that is already in LLVM.
I'm a huge proponent of being able to use Swift in embedded projects, so this is great work! But I do think we need to be able to target Cortex M0 and M4 MCUs, as well.
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.
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?
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.