2015-10-10 16:03:53 +00:00
|
|
|
#include <base.hpp>
|
2015-10-10 12:59:23 +00:00
|
|
|
#include <output.hpp>
|
|
|
|
#include <serial.hpp>
|
2015-10-10 16:03:53 +00:00
|
|
|
#include <textDISP.hpp>
|
|
|
|
namespace MTGosHAL {
|
|
|
|
Serial* debug;
|
|
|
|
Screen* out;
|
|
|
|
Screen* err;
|
2015-10-10 12:59:23 +00:00
|
|
|
void main() {
|
2015-10-10 13:39:32 +00:00
|
|
|
Serial serialOUT(115200);
|
2015-10-10 16:03:53 +00:00
|
|
|
Screen display;
|
|
|
|
debug=&serialOUT;
|
|
|
|
err=&display;
|
|
|
|
out=&display;
|
|
|
|
*out << BG_color::BLACK << FG_color::WHITE << "Loading MTGos...\n";
|
|
|
|
*debug << "Hello debugger! This is MTGos version 0.0\nThese logs are probably very long, so please redirect the output to a file.\n";
|
|
|
|
for(;;);
|
2015-10-10 12:59:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
extern "C" void init() {
|
|
|
|
MTGosHAL::main();
|
|
|
|
}
|
|
|
|
extern "C" void __cxa_pure_virtual() {
|
2015-10-10 16:03:53 +00:00
|
|
|
*MTGosHAL::debug << "A pure virtual function just got called.\n";
|
2015-10-10 12:59:23 +00:00
|
|
|
}
|
|
|
|
|