You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
409 B
C
38 lines
409 B
C
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#include "console.h"
|
|
|
|
void rust_main();
|
|
|
|
void crash()
|
|
{
|
|
void (*fun_ptr)() = (void(*)()) 0xdeadbeef;
|
|
(*fun_ptr)();
|
|
}
|
|
|
|
void init_bss()
|
|
{
|
|
extern int _bss, _ebss;
|
|
int *p = &_bss;
|
|
while (p < &_ebss) {
|
|
*p++ = 0;
|
|
}
|
|
}
|
|
|
|
#define HELLO_WORLD "Hello World\n"
|
|
|
|
int main(void)
|
|
{
|
|
init_bss();
|
|
console_init();
|
|
|
|
puts(HELLO_WORLD);
|
|
|
|
rust_main();
|
|
crash();
|
|
|
|
while (1)
|
|
;
|
|
}
|