Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug builds fail due to missing bsp.h #11

Closed
Timmmm opened this issue May 29, 2015 · 2 comments
Closed

Debug builds fail due to missing bsp.h #11

Timmmm opened this issue May 29, 2015 · 2 comments

Comments

@Timmmm
Copy link
Contributor

Timmmm commented May 29, 2015

In app_error.c there are the following lines:

#ifdef DEBUG
#include "bsp.h"

If you're doing a debug build (offline; I'm not sure the online compiler supports it) then DEBUG is defined and compilation fails because there is no bsp.h.

@rgrover
Copy link
Contributor

rgrover commented May 29, 2015

Will the following diff work for you? If this is acceptable, I'll include it in the next release.

--- a/nordic-sdk/components/libraries/util/app_error.c
+++ b/nordic-sdk/components/libraries/util/app_error.c
@@ -24,7 +24,7 @@
 #include "compiler_abstraction.h"
 #include "nordic_common.h"
 #ifdef DEBUG
-#include "bsp.h"
+// #include "bsp.h"^M

 /* global error variables - in order to prevent removal by optimizers */
 uint32_t m_error_code;
@@ -52,11 +52,11 @@ __WEAK void app_error_handler(uint32_t error_code, uint32_t line_num, const uint
 #ifndef DEBUG
     NVIC_SystemReset();
 #else
-    
-#ifdef BSP_DEFINES_ONLY 
+^M
+#ifdef BSP_DEFINES_ONLY^M
     LEDS_ON(LEDS_MASK);
 #else
-    UNUSED_VARIABLE(bsp_indication_set(BSP_INDICATE_FATAL_ERROR));
+    // UNUSED_VARIABLE(bsp_indication_set(BSP_INDICATE_FATAL_ERROR));^M
     // This call can be used for debug purposes during application development.
     // @note CAUTION: Activating this code will write the stack to flash on an error.
     //                This function should NOT be used in a final product.

@Timmmm
Copy link
Contributor Author

Timmmm commented Jun 1, 2015

Yep that works. :-)

richard-sim added a commit to IsHumanCo/nRF51822 that referenced this issue Jun 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants