llvm-mos-sdk
llvm-mos-sdk copied to clipboard
Add new platform(s): Foenix F256 Jr & K
https://c256foenix.com/f256k and https://c256foenix.com/f256-jr I think they're similar enough to just be a single target.
I've got a very rough first pass going at: https://github.com/bcampbell/llvm-mos-sdk/tree/f256k
It's pretty specific to my own current project, but it'd be good to get some critique and feedback and start it heading down the path toward upstream inclusion...
I built this and made a simple binary to test with FoenixIDE. Fantastic!
The changes you have look more or less like I'd expect; I think we can hammer out the details in a PR if you're up for it.
I'm going to be traveling overseas for the next month, so I'm probably not going to have a whole lot of time to put into this. Happy for someone else to pick it up, or I'll get stuck into it properly when I have more time for it.
One thing that was a little odd - I had trouble with some for
loops which just filled a block of memory with a value. They just weren't working. Turns out they were being optimised to use memset
instead. For whatever reason, that seemed to not work right. Using -fno-builtin-memset
got the loops behaving as they should.
So I suspect I've screwed up something with the runtime... TBH I'm pretty shaky on all the merged utility routines to initialise bss, copy data into zp, etc etc... I just added the ones that sounded right and fiddled a bit. So I don't have a lot of confidence I got it 100% right :-)
I had trouble with some for loops which just filled a block of memory with a value. They just weren't working. Turns out they were being optimised to use memset instead. For whatever reason, that seemed to not work right.
Just ran into this myself. -fno-builtin-memset
also helped in my case.