Fix build on debian
This commit is contained in:
parent
1f9390005f
commit
278c9c79c2
3 changed files with 18 additions and 9 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 63265020429ce78dfc09df887e27c70b6b048eda
|
||||
Subproject commit f0fc4b1219243143b722bb6ae9a1cd757c805d53
|
||||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ def trace_source_files(linker, cmdline, trace_sections=[], total_sections=['.tex
|
|||
continue
|
||||
|
||||
# first part of continuation line
|
||||
if m := re.match('^(\.[0-9a-zA-Z-_.]+)$', line):
|
||||
m = re.match('^(\.[0-9a-zA-Z-_.]+)$', line)
|
||||
if m:
|
||||
line_cont = line
|
||||
sec_name = None
|
||||
continue
|
||||
|
|
@ -76,7 +77,8 @@ def trace_source_files(linker, cmdline, trace_sections=[], total_sections=['.tex
|
|||
line_cont = None
|
||||
|
||||
# -ffunction-sections/-fdata-sections section
|
||||
if m := re.match('^(\.[0-9a-zA-Z-_.]+)\.([0-9a-zA-Z-_.]+)\s+(0x[0-9a-f]+)\s+(0x[0-9a-f]+)\s+(\S+)$', line):
|
||||
m = re.match('^(\.[0-9a-zA-Z-_.]+)\.([0-9a-zA-Z-_.]+)\s+(0x[0-9a-f]+)\s+(0x[0-9a-f]+)\s+(\S+)$', line)
|
||||
if m:
|
||||
sec, sym, loc, size, obj = m.groups()
|
||||
*_, sym = sym.rpartition('.')
|
||||
sym = cxxfilt.demangle(sym)
|
||||
|
|
@ -93,7 +95,8 @@ def trace_source_files(linker, cmdline, trace_sections=[], total_sections=['.tex
|
|||
continue
|
||||
|
||||
# regular (no -ffunction-sections/-fdata-sections) section
|
||||
if m := re.match('^(\.[0-9a-zA-Z-_]+)\s+(0x[0-9a-f]+)\s+(0x[0-9a-f]+)\s+(\S+)$', line):
|
||||
m = re.match('^(\.[0-9a-zA-Z-_]+)\s+(0x[0-9a-f]+)\s+(0x[0-9a-f]+)\s+(\S+)$', line)
|
||||
if m:
|
||||
sec, _loc, size, obj = m.groups()
|
||||
size = int(size, 16)
|
||||
obj = path.abspath(obj)
|
||||
|
|
@ -106,7 +109,8 @@ def trace_source_files(linker, cmdline, trace_sections=[], total_sections=['.tex
|
|||
continue
|
||||
|
||||
# symbol def
|
||||
if m := re.match('^(0x[0-9a-f]+)\s+(\S+)$', line):
|
||||
m = re.match('^(0x[0-9a-f]+)\s+(\S+)$', line)
|
||||
if m:
|
||||
loc, sym = m.groups()
|
||||
sym = cxxfilt.demangle(sym)
|
||||
loc = int(loc, 16)
|
||||
|
|
@ -129,7 +133,7 @@ def trace_source_files(linker, cmdline, trace_sections=[], total_sections=['.tex
|
|||
fn = path.abspath(fn)
|
||||
|
||||
if member:
|
||||
subprocess.check_call(['ar', 'x', '--output', tempdir, fn, member])
|
||||
subprocess.check_call(['ar', 'x', fn, member], cwd=tempdir)
|
||||
fn = path.join(tempdir, member)
|
||||
|
||||
with open(fn, 'rb') as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue