Skip to content

Instantly share code, notes, and snippets.

View corecode's full-sized avatar

Simon Schubert corecode

View GitHub Profile
dfu.elf: file format elf32-littlearm
Disassembly of section .text:
00000000 <isr_vectors>:
0: 48 05 00 20 59 0a 00 00 55 03 00 00 55 03 00 00 H.. Y...U...U...
00000010 <usb_ep0_tx_cp.constprop.14.4410>:
dfu.elf: file format elf32-littlearm
Disassembly of section .text:
00000000 <isr_vectors>:
0: 68 f9 ff 1f 31 0a 00 00 81 08 00 00 81 08 00 00 h...1...........
10: 81 08 00 00 81 08 00 00 81 08 00 00 ............
#define bf_mask_to_width(mask) \
mask == 0b1 ? 1 : \
mask == 0b11 ? 2 : \
mask == 0b111 ? 3 : \
mask == 0b1111 ? 4 : \
mask == 0b11111 ? 5 : \
mask == 0b111111 ? 6 : \
mask == 0b1111111 ? 7 : \
mask == 0b11111111 ? 8 : \
mask == 0b111111111 ? 9 : \
#define bf_set(loc, name, val) \
({ \
typeof(&loc) locp = &loc; \
uint32_t locval = *locp; \
*locp = bf_set1(locval, name ## _SHIFT, name ## _MASK, val); \
})
static inline uint32_t
bf_set1(uint32_t locval, int bitpos, uint32_t bitmask, uint32_t val)
{
dfu.elf: file format elf32-littlearm
Disassembly of section .text:
00000000 <isr_vectors>:
0: 70 0a 00 20 99 0b 00 00 49 09 00 00 49 09 00 00 p.. ....I...I...
00000010 <usb_ep0_tx_cp.constprop.14.4434>:
Archive member included because of file (symbol)
/usr/bin/../lib/gcc/arm-none-eabi/4.8.4/armv6-m/libgcc.a(_thumb1_case_uqi.o)
/tmp/ccraPaDk.ltrans0.ltrans.o (__gnu_thumb1_case_uqi)
/usr/bin/../lib/gcc/arm-none-eabi/4.8.4/armv6-m/libgcc.a(_udivsi3.o)
/tmp/ccraPaDk.ltrans0.ltrans.o (__aeabi_uidivmod)
/usr/bin/../lib/gcc/arm-none-eabi/4.8.4/armv6-m/libgcc.a(_dvmd_tls.o)
/usr/bin/../lib/gcc/arm-none-eabi/4.8.4/armv6-m/libgcc.a(_udivsi3.o) (__aeabi_idiv0)
Discarded input sections
Discarded input sections
.text 0x00000000 0x0 /tmp/cccly5tu.ltrans0.ltrans.o
.data 0x00000000 0x0 /tmp/cccly5tu.ltrans0.ltrans.o
.bss 0x00000000 0x0 /tmp/cccly5tu.ltrans0.ltrans.o
Memory Configuration
Name Origin Length Attributes
void *
memset(void *dest, int c, unsigned n)
{
unsigned char *buf = dest;
for (; n > 0; ++buf, --n) {
*buf = c;
}
return (dest);
Changes in reorg
16 files changed, 238 insertions(+), 676 deletions(-)
.../bootloader-update-dfu/bootloader-update-dfu.c | 4 +-
src/soc/cortex-m/system.c | 2 +-
src/soc/kinetis/MK20D5/soc.h | 24 +-
src/soc/kinetis/MK20D5/startup.c | 7 +-
src/soc/kinetis/adc.h | 16 +-
src/soc/kinetis/bitfield.h | 16 ++
src/soc/kinetis/ftfl.c | 41 ++--
src/soc/kinetis/ftm.h | 2 +-
#include <stdint.h>
#include <type_traits>
template<typename Tsize_type>
class GenericAddressBacking {
public:
using size_type = Tsize_type;
using size_type_nv = typename std::remove_volatile<size_type>::type;
template<unsigned Tbitpos, unsigned Tbitwidth>