llvm-mos-sdk icon indicating copy to clipboard operation
llvm-mos-sdk copied to clipboard

Add new platform(s): Foenix F256 Jr & K

Open bcampbell opened this issue 1 year ago • 5 comments

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...

bcampbell avatar Dec 09 '23 08:12 bcampbell

I built this and made a simple binary to test with FoenixIDE. Fantastic!

sduensin avatar Dec 10 '23 00:12 sduensin

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.

mysterymath avatar Dec 11 '23 19:12 mysterymath

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.

bcampbell avatar Dec 12 '23 04:12 bcampbell

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 :-)

bcampbell avatar Dec 12 '23 04:12 bcampbell

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.

sduensin avatar Jan 02 '24 01:01 sduensin