Created
July 19, 2024 15:55
-
-
Save dogtopus/4ebd5c40b8a1c3050b79ae583dfd5ce7 to your computer and use it in GitHub Desktop.
Muteki toolchain testbench
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
arm-none-bestaeabi-gcc -Wall -g -O2 test.c -o test.elf -lmutekix && elf2bestape test.elf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <muteki/memory.h> | |
#include <muteki/utils.h> | |
#include <muteki/ui/event.h> | |
#include <mutekix/console.h> | |
// Declaration here | |
// End of declaration | |
int main() { | |
ui_event_t uievent = {0}; | |
mutekix_console_init(NULL); | |
atexit(&mutekix_console_fini); | |
mutekix_console_printf("GetFreeMemory() -> %u\n", GetFreeMemory()); | |
// Experiment here | |
mutekix_console_puts("Hello world!"); | |
// End of experiment | |
mutekix_console_printf("GetFreeMemory() -> %u\n", GetFreeMemory()); | |
while (true) { | |
if ((TestPendEvent(&uievent) || TestKeyEvent(&uievent)) && GetEvent(&uievent) && uievent.key_code0 == KEY_ESC) { | |
return 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment