summaryrefslogtreecommitdiff
path: root/fw/src
diff options
context:
space:
mode:
Diffstat (limited to 'fw/src')
-rw-r--r--fw/src/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fw/src/main.c b/fw/src/main.c
index b84e24b..982b1c2 100644
--- a/fw/src/main.c
+++ b/fw/src/main.c
@@ -4,6 +4,7 @@
#include "main.h"
#include "usb_device.h"
#include "usbd_hid.h"
+#include "assert.h"
#define HID_MEDIA_REPORT 2
#define HYSTERESIS 200
@@ -103,10 +104,9 @@ int main(void)
}
}
-void * _sbrk(ptrdiff_t __incr);
-void * _sbrk(ptrdiff_t __incr) {
+void __libc_init_array(void);
+void __libc_init_array() {
/* FIXME Do we even need this? */
- return NULL;
}
void _init(void);
@@ -114,6 +114,11 @@ void _init() {
/* FIXME Do we even need this? */
}
+void __assert_func (const char *file, int line, const char * func, const char * exp) {
+ asm volatile ("bkpt");
+ while (1);
+}
+
static uint32_t poll_encoders() {
static bool tx_vol_reset = 0;
static uint16_t tim1_last = 0, tim3_last = 0; /* timers init to 0 */