Skip to content

Instantly share code, notes, and snippets.

@dogtopus
Created July 19, 2024 15:55
Show Gist options
  • Save dogtopus/4ebd5c40b8a1c3050b79ae583dfd5ce7 to your computer and use it in GitHub Desktop.
Save dogtopus/4ebd5c40b8a1c3050b79ae583dfd5ce7 to your computer and use it in GitHub Desktop.
Muteki toolchain testbench
#!/bin/bash
arm-none-bestaeabi-gcc -Wall -g -O2 test.c -o test.elf -lmutekix && elf2bestape test.elf
#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