-
-
Notifications
You must be signed in to change notification settings - Fork 944
New issue
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
Add small bytecode language for watchfaces #2092
base: main
Are you sure you want to change the base?
Conversation
Build size and comparison to main:
|
Oh you're right, it isn't being cleaned up. |
That's cool. I'm not too clued up on assembly, but is there an assembler available for this or did you hand-write the machine code? |
I'm using a crude assembler written in Go, I'll release a proper one if this PR gets merged or if you want to toy around with it. Maybe some visual programming thing would be cool too, but that's just an idea. |
I've implemented a small bytecode assembly language intended for making watchfaces without recompiling InfiniTime. Right now it's only a proof of concept and I'm open to any ideas and improvements. The program is currently being loaded from a hardcoded path in the external LittleFS file system, but the idea is to let users choose any fle. It's also not very optimized for memory, as it's only a proof of concept.
You can try a sample out in InfiniEmu, currently the ASM screen is the app with the eye icon. The firmware is running the following assembly code, which only takes 78 bytes when compiled: