mbed-src updated for BMD-200 evaluation board. Just pin numbers are updated.

Dependents:   mbed_blinky-bmd-200 bmd-200_accel_demo firstRig

Fork of mbed-src by mbed official

Replacement for the "mbed" or "mbed-src" library when using the BMD-200 Evaluation kit. This library only remaps the pin names (i.e. LED1 points to p0.01 instead of p0.18, etc) as used by the BMD-200 Evaluation board (select the nRF51822_mkit platform). All other code is untouched.

Revision:
83:5a6f638110fe
Parent:
24:75304dd5f5fb
Child:
221:8276e3a4886f
--- a/common/retarget.cpp	Fri Jan 31 10:00:06 2014 +0000
+++ b/common/retarget.cpp	Fri Jan 31 10:15:06 2014 +0000
@@ -398,15 +398,23 @@
 
 // ****************************************************************************
 // mbed_main is a function that is called before main()
+// mbed_sdk_init() is also a function that is called before main(), but unlike
+// mbed_main(), it is not meant for user code, but for the SDK itself to perform
+// initializations before main() is called.
 
 extern "C" WEAK void mbed_main(void);
 extern "C" WEAK void mbed_main(void) {
 }
 
+extern "C" WEAK void mbed_sdk_init(void);
+extern "C" WEAK void mbed_sdk_init(void) {
+}
+
 #if defined(TOOLCHAIN_ARM)
 extern "C" int $Super$$main(void);
 
 extern "C" int $Sub$$main(void) {
+    mbed_sdk_init();
     mbed_main();
     return $Super$$main();
 }
@@ -414,6 +422,7 @@
 extern "C" int __real_main(void);
 
 extern "C" int __wrap_main(void) {
+    mbed_sdk_init();
     mbed_main();
     return __real_main();
 }
@@ -424,6 +433,7 @@
 // code will call a function to setup argc and argv (__iar_argc_argv) if it is defined.
 // Since mbed doesn't use argc/argv, we use this function to call our mbed_main.
 extern "C" void __iar_argc_argv() {
+    mbed_sdk_init();
     mbed_main();
 }
 #endif