#avr Logs

Mar 29 2020

#avr Calendar

03:41 AM twnqx: heya. I've done my first steps towards STM32, and I am not very successfull :( i've built a CANTACT clone from https://github.com/linklayer/cantact-hw/blob/master/cantact.pdf
03:47 AM twnqx: i see the DFU device in bootloader mode, but when I flash the software, disconnect, remove the bootloader jumper, and reconnect, USB doesn't do anything :(
04:11 AM twnqx: ohhh fun, a prebuilt firmware works
04:14 AM twnqx: soooo there's an issue qith my toolchain, i guess - seems arm is WAY harder than avr
04:17 AM vmt: what?
04:21 AM nohit: all you need is a arm gcc and bin utils
04:21 AM nohit: and a makefile
04:21 AM nohit: https://gitlab.com/nohit/stm32dct/-/blob/master/Makefile here's mine
04:40 AM Thrashbarg: no IDEs for you!@
04:40 AM Thrashbarg: -@
05:31 AM polprog: i tried to do a make debug target but i couldnt get GDB to run fine with oocd..
05:31 AM polprog: it would crap out, idk
05:45 AM nohit: With that makefile?
05:45 AM nohit: First do make remote
05:47 AM nohit: That creates gdb server
05:47 AM nohit: Then connect with make debug
05:50 AM nohit: Also aflags cflags lnkflags need -g
06:19 AM twnqx: i git cloned a repo
06:19 AM twnqx: actually, two different ones
06:19 AM twnqx: the compiled binaries do not work
07:34 AM twnqx: out of curiosity, can someone with a known-working toolchain (preferyble like mine gcc 9.3, binutils 2.34, newlib nano 3.3, but others will do) build https://github.com/candle-usb/candleLight_fw and provide me the gsusb_cantact.elf (not the binary)?
07:39 AM nohit: whats wrong with your toolchain
07:43 AM nohit: my cmake isnt the minimum version
07:51 AM twnqx: how would i know
07:51 AM twnqx: all i know is that when i flash my binaries, they don't seem to run
07:51 AM twnqx: e.g. the LEDs don't turn on
07:51 AM twnqx: and the device doesn't show itself on USB
07:52 AM twnqx: actually that's why i would want the elf - easier to disassemble with objdump
07:52 AM twnqx: and compare with mine
07:54 AM nohit: im building it right now
07:55 AM nohit: i didnt get gsusb_cantact.elf
07:59 AM twnqx: wait, i switched to the same revision
07:59 AM twnqx: one moment
08:01 AM nohit: there http://dancingclown.tech/candle/
08:01 AM twnqx: cantact_fw
08:02 AM twnqx: thank you
08:02 AM nohit: np
08:03 AM twnqx: fun, your file is nearly 2kB smaller
08:03 AM twnqx: dmesg
08:03 AM twnqx: and works.
08:15 AM * twnqx stares at objdump output
08:16 AM * twnqx takes a step back and looks at "file" output
08:16 AM twnqx: cantact_fw: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /usr/lib/ld.so.1, with debug_info, not stripped
08:16 AM twnqx: erm....
08:17 AM twnqx: yeah, i kind of see why this wouldn't run inside an stm32.
08:21 AM crazy_imp is now known as dc1mp
08:21 AM dc1mp is now known as crazy_imp
08:23 AM nohit: i have gcc 8.2.1 binutils 2.31
08:23 AM twnqx: well, i get a dynaically linked binary
08:23 AM twnqx: that can't run in rom
08:23 AM nohit: i download them here https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
08:23 AM nohit: yeah
08:25 AM nohit: are you sure you dont have the toolchain for the Cortex-A architecture
08:25 AM twnqx: i have quite a few arm toolchains, but it's arm-none-eabi
08:25 AM nohit: ok
08:26 AM twnqx: cmake doesn't apply -static... fun
08:30 AM twnqx: so i suppose the official toolchains can only create static binaries, while mine can also produce dynamic ones. oh well, time to test this binary :)
08:31 AM twnqx: :/ nope, still not
08:35 AM nohit: try 8
08:35 AM nohit: just for kicks
08:35 AM twnqx: nah, i think it's worse
08:36 AM twnqx: there are still .got and .got_plt sections in my elf
08:49 AM twnqx: better, no more unrelocated offsets in my .elf
08:49 AM twnqx: let's see...
08:51 AM twnqx: nope, still not
09:16 AM twnqx: nohit: i might switch to prebuilt toolchains if i can't work out how to make an unpatched gcc work, yes...
11:40 PM day__ is now known as day