Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os by
Diff: TESTS/mbedmicro-mbed/call_before_main/main.cpp
- Revision:
- 0:f269e3021894
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/TESTS/mbedmicro-mbed/call_before_main/main.cpp Sun Oct 23 15:10:02 2016 +0000
@@ -0,0 +1,16 @@
+#include "greentea-client/test_env.h"
+
+namespace {
+ bool mbed_main_called = false;
+}
+
+extern "C" void mbed_main() {
+ printf("MBED: mbed_main() call before main()\r\n");
+ mbed_main_called = true;
+}
+
+int main() {
+ GREENTEA_SETUP(5, "default_auto");
+ printf("MBED: main() starts now!\r\n");
+ GREENTEA_TESTSUITE_RESULT(mbed_main_called);
+}
