00:19
Zarutian_HTC has quit [Remote host closed the connection]
00:21
<
crest >
what happend between stlink 1.5 and stlink 1.6?!?!?
00:21
<
crest >
did the authors switch their drugs?
00:22
<
crest >
it logs to stdout instead of stderr
00:22
<
crest >
and produces debug logs when asked to log only errors
00:27
iyzsong has joined #forth
00:29
X-Scale` has joined #forth
00:30
X-Scale has quit [Ping timeout: 256 seconds]
00:30
X-Scale` is now known as X-Scale
00:31
<
tabemann >
hey guys
00:32
<
tabemann >
it's been working smoothly for me
00:32
<
crest >
it's not for me
00:33
<
tabemann >
what did you change?
00:33
<
crest >
i don't think it's just my problem
00:33
<
crest >
even their own tools spam libusb debugging messages to stdout
00:34
<
crest >
anyway would you be willing to review at my swdcom assembler code?
00:35
<
tabemann >
so the freebsd package suddenly got broken?
00:35
<
crest >
not just the port/package
00:35
<
crest >
upstream broke (at least on freebsd)
00:36
<
crest >
i built directly from upstream as well
00:37
<
tabemann >
I can look at your asm
00:41
<
crest >
i haven't written arm code before
00:41
<
crest >
i'm sure there some things that can be improved by someone more familar with the ISA
00:43
<
tabemann >
you're definitely using some optimizations to make tighter code that I've never used
00:43
* tabemann
does not try to write clever code
00:44
<
tabemann >
but I'm gonna go eat dinner now, so I'll finish reading your code later
00:49
jedb_ has joined #forth
01:24
<
crest >
still awake
01:27
<
tabemann >
here's some clues
01:27
<
tabemann >
whenever possible, use adds, subs, movs, etc. instructions
01:28
<
tabemann >
they're smaller in memory
01:28
<
tabemann >
they're also thumb-1 instructions
01:29
<
tabemann >
also, have you tried: add r0, 256+4
01:29
<
tabemann >
I don't know if that's kosher or not - it's definitely not kosher in thumb-1
01:41
<
tabemann >
bist du da?
01:43
<
crest >
hos would using the *s instructions help?
01:44
<
tabemann >
crest: it would make the instructions take up 16 bits rather than 32
01:44
<
crest >
i need explicit comparisons
01:44
<
tabemann >
cmp doesn't take -s
01:45
<
crest >
i do use add r0, 256+4 the code compiles and works as expected
01:45
<
tabemann >
it just turns out that most of the thumb-1 instructions are -s instructions, even though the flags they set do nothing else followed by an instruction like beq
01:45
<
crest >
ok getting more compact code is always nice
01:45
<
tabemann >
okay, that must be compiling to a 32 bit instruction - but that's fine, because doing it the thumb-1 way in that case would actually take up more space
01:46
<
crest >
even if changing the status flags for no good reason feels wrong coming from out of order cpus
01:46
<
tabemann >
changing the status flags for no good reason is the norm on cortex-m
01:46
<
crest >
a single 32bit add with imm isn't longer than two 16bit adds and probably faster
01:47
<
crest >
i haven't found time to look at your pull request because of my problems with stlink 1.6
01:47
<
tabemann >
actually it's shorter, because you'd have to do an ldr (literal) which'd read it out of another memory location
01:47
<
tabemann >
crest: I already made an improvement to swd2.c so it can compile fine on both linux and bsd
01:48
<
tabemann >
now I just need to figure out how to do the same with the Makefile
01:48
<
crest >
anything that's not covered by your pull request?
01:48
<
crest >
let's just use cc instead of gcc or clang
01:49
<
tabemann >
my adding of #if
__linux__ in two places to swd2.c
01:49
<
tabemann >
crest: there's also an issue with the library
01:49
<
crest >
the library name change is part of stlink 1.6
01:49
<
tabemann >
on my machine at least it has to be -lstlink not -lstlink-shared
01:49
<
crest >
which is the version in freebsd ports as well (as of a few days ago)
01:50
<
crest >
but the stlink logging code ist just wrong
01:50
<
tabemann >
maybe you'll just have to turn off all logging for the time being?
01:51
<
crest >
there is no way to turn of logging through the broken wrapper code
01:52
<
crest >
they copied the numeric values instead of using the defines
01:53
WickedShell has quit [Remote host closed the connection]
01:55
boru` has joined #forth
01:55
boru has quit [Disconnected by services]
01:55
boru` is now known as boru
01:58
<
crest >
oh and the new st-flash tool fails to write the flash as well
01:58
<
tabemann >
fuckin A
01:59
<
tabemann >
I don't know what I'd do without that
01:59
<
crest >
st-flash erase worked
01:59
<
crest >
at least it didn't report an error
01:59
<
tabemann >
how did the st-flash people manage to break things so bad
02:00
<
tabemann >
and how did people not notice at let it into things like freebsd?
02:00
<
tabemann >
*and let
02:00
<
crest >
i suspect the current port maintainer isn't a daily user
02:00
<
crest >
and it compiled
02:00
<
crest >
he didn't run any kind of regression testing
02:01
<
tabemann >
but the damn developers of st-flash should've known!
02:01
<
crest >
unless they don't test on freebsd
02:02
<
tabemann >
that must be it
02:02
<
tabemann >
because I'm using 1.6.0
02:02
iyzsong has joined #forth
02:04
<
tabemann >
I'd say complain complain complain on the stlink people's github or wherever
02:04
<
tabemann >
but bbiab
02:06
<
crest >
i tried it on the nucleo stm32l476 and the bluepill board
02:06
<
crest >
both fail to write
02:07
MrMobius has quit [Read error: Connection reset by peer]
02:08
<
crest >
wtf their latest release fails even worse than the git clone
02:09
<
crest >
ld: error: attempted static link of dynamic object /usr/lib/libusb.so
02:17
<
crest >
back to the asm code
02:18
<
crest >
do have any other recommendations than using the *s integer ops
02:18
<
tabemann >
that's the only real thing that stuck out to me as needing changing
02:18
<
tabemann >
and it'll work without them
02:19
<
tabemann >
it'll just take up more space
02:19
<
tabemann >
the mov r11, ... instruction has to be mov not movs
02:19
<
tabemann >
because the movs instruction only permits access to registers <= r7
02:20
<
tabemann >
actually
02:20
<
crest >
and thumb1 support is out of scope for now because i have no hardware to test it on
02:20
<
tabemann >
that's ldr r11, =...
02:20
<
tabemann >
so forget about it
02:20
<
tabemann >
ldr r11, =... should be just fine
02:21
<
tabemann >
I don't even support M0 with zeptoforth
02:21
<
tabemann >
but unless I wouldn't be saving any memory otherwise I tend to prefer thumb-1 instructions
02:21
<
tabemann >
just for space savings
02:22
<
tabemann >
but I use 32-bit instructions where if I were to use 16-bit instructions I'd need two instructions, in most cases
02:30
<
tabemann >
one little pet peeve
02:31
<
tabemann >
it's spelled "indices" even though it's pronounced "indicies"
02:31
<
tabemann >
English spelling is a pain
02:34
guan has quit [Ping timeout: 240 seconds]
02:35
MrMobius has joined #forth
02:36
arrdem has quit [Read error: Connection reset by peer]
02:39
arrdem has joined #forth
02:43
arrdem has quit [Read error: Connection reset by peer]
02:45
<
crest >
tabemann: thx
02:46
<
crest >
does stlink 1.6.1 work for you?
02:47
<
tabemann >
haven't tried it
02:50
<
tp >
stlink is a mess, open solaris complained about all kinds of things before it gave up
02:58
<
crest >
is there a better library?
02:59
<
tp >
no, you have to read the spec and make your own ;-)
02:59
<
tp >
rdrop-exit has made his own I think
02:59
<
crest >
at that point it would probably be easier to just write my own swd programmer firmware for a cheap board
03:00
<
tp >
actualy I think rdrop-exit uses a ftdi cable and their closed source jtag library
03:00
<
tp >
maybe ftdi also do a swd library (closed)
03:01
<
crest >
i was thinking about using a blue pill
03:01
<
crest >
just because they're cheap and should be fast enough
03:01
<
tp >
what about the swd interface you have on your own L476 boards ?
03:01
<
crest >
and there is forth code for the usb
03:02
<
tp >
thats what stlink talks to
03:02
<
crest >
with the right firmware a blue pill could use the existing usb modem driver
03:02
reepca` has quit [Read error: Connection reset by peer]
03:02
reepca` has joined #forth
03:02
<
tp >
then youre wasting the swd interface on your L476
03:03
<
tp >
and anyway, your L476 already has a STM32F103 on it, same as a blue pill
03:03
<
crest >
the problem is if yout lift the lid of libstlink a wiff of rotting corpse escapes
03:03
<
tp >
it sure does. Im not advocating using it
03:03
<
tp >
it's a frigging mes
03:03
<
crest >
why use the defines from the header
03:04
<
tp >
what I'm saying is that your nucleo (and all discoveries) have a blue pill mcu on one end already
03:04
<
crest >
lets just copy their numerical values
03:04
<
crest >
*aaaargggghhhhh*
03:04
<
crest >
sure but i don't want to wipe that one yet
03:05
<
tp >
you can save the firmware first
03:05
<
tp >
it's just a micro'
03:05
<
crest >
they didn't enable the read out protection?
03:05
<
tp >
but sure, if you have to find a use for your blue pills, why not
03:06
<
tabemann >
stlink on debian seems to be poorly maintained
03:06
<
tp >
I dont think so, or it must have been defeated because you can get them off the web
03:06
<
tabemann >
when I installed the latest it was missing one significant header file
03:06
<
tp >
tabemann, yeah, it's a horrorshow
03:07
<
crest >
tabemann: i just filed a problem report against the freebsd port as well
03:07
<
tp >
besides, the stm32f103 security has been broken, you cant secure your firmware on it
03:07
<
crest >
to use the damn libstlink you require headers from the stlink src directory
03:07
<
crest >
the ones from their include directory even unconditonally #include them
03:07
<
tp >
it's 16 year old, broken, has serious problems
03:08
<
crest >
there is no way to use include/stlink.h unless you also copy most headers from their src directory
03:08
<
tp >
open solaris complained about a bunch of missing M4 declarations
03:09
<
crest >
probably because it's written by embedded devs that just want this one feature (e.g. support for the latest mcu) yesterday
03:09
<
crest >
after all it has 109 open and 436 issues on github
03:09
<
tp >
crest, why not just impliment only the base support you need with (whatever) for swdcom and flash the chip with the serialbootloader ?
03:10
<
crest >
because i swdcom needs a working libstlink with headers to build
03:10
<
crest >
one that doesn't spam stdout with multiple lines for every usb command
03:10
<
tp >
how does it compare to openocd ?
03:10
<
crest >
i haven't used openocd
03:11
<
crest >
because libstlink 1.5 just worked
03:11
<
crest >
and had a short but useful doc/developer.txt and example-app
03:11
<
tp >
openocd seems a lot more professional, tho I havent seen the code
03:11
<
crest >
btw they didn't upgrade their example-app
03:12
<
crest >
their example app is incompatible with the new open api that requires a fourth argument
03:12
<
crest >
(the swd/jtag clock)
03:16
arrdem has joined #forth
03:18
guan has joined #forth
03:27
<
crest >
which versions of libstlink did you use?
03:33
<
tabemann >
I'm trying out stflash 1.6.1 compiled from source
03:33
<
tabemann >
and I'm having much of the same problems
03:34
<
tabemann >
stupid sloppy programmers
03:34
<
tabemann >
they don't even document what should go in the freq parameter
03:34
<
crest >
on which operating systems?
03:34
<
tabemann >
on linux!
03:35
<
crest >
timeouts as well?
03:35
<
tabemann >
and I can't even run swd2 now
03:35
<
crest >
stupid amount of debugging messages?
03:36
<
tabemann >
it can't even find the shared library!
03:36
<
tabemann >
and st-flash is appearing as non-existent
03:38
<
tabemann >
oh wait it's in /usr/local/bin
03:38
<
crest >
on linux?!?
03:38
<
tabemann >
but when I enter st-flash from the command line it says it can't find it
03:38
<
tabemann >
when enter /usr/local/bin/st-flash it says it can't find libstlink.so.1
03:39
* crest
just started listening to eisregen again to get ideas how to deal with the culprit
03:40
<
crest >
why do you need cmake to build a project with just 22 .c files?
03:42
<
crest >
wtf their mmap.c fakes mmap with malloc+read and munmap with free on the memory
03:42
<
crest >
what is going on in that codebase
03:42
<
tabemann >
fucking hell!
03:42
<
tabemann >
fucking hell!
03:42
<
tabemann >
it doesn't work for me either!!!!
03:42
<
crest >
tabemann: i fixed the typo and used 16bit opcode in the obvious places
03:42
<
tabemann >
did these people ever test their code!!!!!
03:43
<
crest >
probably on their macbook with an stlink v3
03:43
<
crest >
i just happen to have a mac running macos 10.15 which they claim to support
03:44
<
tabemann >
them and their macbooks can go to hell
03:44
arrdem has quit [Ping timeout: 240 seconds]
03:44
<
crest >
okay the mmap code is just for windows with mingw
03:45
<
crest >
did you look into their CMakeLists.txt
03:45
<
tp >
guys, openocd works fine with swd as well. I think stlink is just a hack job
03:45
<
tp >
but openocs also allows telnet connections
03:46
<
tp >
hmm oops thats gdb
03:46
<
crest >
set(STLINK_HEADERS
03:46
<
crest >
include/stlink/backend.h
03:46
<
crest >
include/stlink/commands.h
03:46
<
crest >
include/stlink.h
03:46
<
crest >
include/stlink/chipid.h
03:46
<
crest >
include/stlink/flash_loader.h
03:46
<
tp >
openocd has a ton more facilities than stlink
03:46
<
crest >
include/stlink/reg.h
03:46
<
crest >
src/logging.h
03:47
<
crest >
why oh why didn't someone notice the glaring problem in that
03:47
<
crest >
why install any headers at all if they have missing dependencies?
03:49
<
crest >
i used stlink because it had a simple to use api
03:49
<
crest >
not the most elegant api but good enough
03:49
<
crest >
and stlink 1.5.0 just worked
03:49
<
crest >
i had my first prototype working in a few hours
03:50
<
crest >
by comparison openocd is about as approachable as the stm32l476 reference manual
03:51
arrdem has joined #forth
03:52
guan has quit [Ping timeout: 256 seconds]
03:58
<
tp >
he the STM reference manuals are complete and detailed, tech love them
03:59
arrdem has quit [Ping timeout: 260 seconds]
03:59
<
tp >
dont knock a STM ref manual before you try a Chinese one for something like the GS32VF103, it's a nightmare and had a ton of errors
03:59
<
tp >
who knocks an acccurate detailed reference for a complex thing ?
04:00
reepca` has quit [Read error: Connection reset by peer]
04:00
reepca` has joined #forth
04:10
guan has joined #forth
04:11
arrdem has joined #forth
04:11
<
crest >
i didn't say the stm ref man isn't useful
04:11
<
crest >
just that it falls far shor of what is needed
04:12
<
crest >
the customers stm cares about know how to deal with it
04:12
<
crest >
and just call their STM contact person if something isn't clear
04:13
<
crest >
the rest of the world just has to survive on their scraps
04:13
<
tp >
125 downloads of my stm32f103-diages ine the last few days
04:14
reepca` has quit [Read error: Connection reset by peer]
04:14
guan has quit [Read error: Connection reset by peer]
04:14
reepca` has joined #forth
04:15
guan has joined #forth
04:20
<
tabemann >
I had to revert to 1.6.0
04:20
<
tabemann >
and it worked perfectly after I did
04:20
<
tabemann >
why in hell was 1.6.1 such a royal fuckup
04:21
<
tabemann >
I posted not one but two issues on the stlink github
04:21
<
tabemann >
one was to point out that A) st-link write didn't work
04:22
<
tabemann >
one was to point out that they really screwed up with their handling of headers
04:32
dave0 has quit [Quit: dave's not here]
04:33
<
crest >
i just tried the 1.6.0 tarball from github on freebsd
04:33
<
crest >
and it works
04:35
<
tp >
tabemann, with 109 open issues dont expect a fast reply
04:37
<
tabemann >
it seems like they made a lot of changes, more than one would expect from a patch-level version update
04:37
<
crest >
the build directory layout is different as well
04:37
<
tabemann >
and they were sloppy in the process
04:37
<
tabemann >
they also now have .rpm and .deb builds
04:38
<
crest >
but they claim to follow semantic versioning ROFL
04:38
<
tabemann >
to me it seems like that it should be 6.1.0 rather than 1.6.1
04:39
<
tabemann >
that is semantic versioning
04:39
<
crest >
they just fucked up
04:39
<
tabemann >
they fucked up, yes, but they also tried to roll out a lot of changes
04:40
<
tabemann >
they even changed the command line format
04:40
<
crest >
in incompatible ways?
04:40
<
crest >
or just options?
04:40
<
tabemann >
I tried entering st-flash write zeptoforth.bin 08000000
04:40
<
tabemann >
and it complained
04:41
<
tabemann >
I had to enter st-flash write zeptoforth.bin 0x08000000
04:41
<
crest >
i didn't know that the 0x was optional
04:41
<
crest >
*used to be
04:42
* tabemann
suspects that zeptoforth will always be at 0.x
04:47
<
crest >
turns out that inside if-then blocks it doens't matter which endcoding i used
04:48
<
crest >
i assume that branching would still be slower for a single instruction on each path
04:50
<
tabemann >
that looks right to me
04:51
<
crest >
i used the shell-storm.org asm -> (quoted) hex webinterface to check the output length
04:52
<
crest >
some instructions required a 32bit encoding for other reasons e.g. larger imm values
04:52
<
crest >
in those cases i kept the version without flag updates
04:54
<
tabemann >
yeah, I noticed that with AND
04:54
<
tabemann >
AND immediate is always 32-bit
05:01
<
tabemann >
welche Zeit ist es in Deutschland?
05:02
<
crest >
oder auf deutsch: Es ist 7 Uhr morgens.
05:04
<
tabemann >
I should get to bed myself, as I've got work to do tomorrow morning
05:34
reepca` has quit [Ping timeout: 246 seconds]
05:48
_whitelogger has joined #forth
05:51
jedb_ is now known as jedb
05:52
jsoft has quit [Ping timeout: 256 seconds]
06:04
gravicappa has joined #forth
07:18
jsoft has joined #forth
07:26
jsoft has quit [Max SendQ exceeded]
07:27
jsoft has joined #forth
07:36
dddddd has quit [Ping timeout: 246 seconds]
08:32
jedb has quit [Ping timeout: 246 seconds]
08:54
jedb has joined #forth
08:54
andrei-n has joined #forth
10:06
iyzsong has joined #forth
10:19
jedb has quit [Ping timeout: 258 seconds]
10:28
jedb_ has joined #forth
11:11
TCZ has joined #forth
11:50
iyzsong has joined #forth
12:55
dddddd has joined #forth
13:25
TCZ has quit [Quit: Leaving]
13:43
TCZ has joined #forth
14:07
reepca has joined #forth
14:19
TCZ has quit [Quit: Leaving]
14:20
iyzsong has joined #forth
15:02
Zarutian_HTC has joined #forth
15:41
Zarutian_HTC has quit [Ping timeout: 264 seconds]
16:12
Zarutian_HTC has joined #forth
16:26
Zarutian_HTC has quit [Ping timeout: 265 seconds]
16:27
jedb_ has quit [Ping timeout: 264 seconds]
16:53
jsoft has quit [Ping timeout: 256 seconds]
17:10
Zarutian_HTC has joined #forth
17:51
TCZ has joined #forth
18:18
TCZ has quit [Quit: Leaving]
19:23
WickedShell has joined #forth
20:15
<
andrei-n >
Hello. Do you use ROBODoc with Forth? If so, I would like to see some examples...
20:56
dave0 has joined #forth
21:11
andrei-n has quit [Quit: Leaving]
21:29
<
crest >
tabemann: the stlink developers responded
21:47
TCZ has joined #forth
21:56
gravicappa has quit [Ping timeout: 258 seconds]
22:15
<
tp >
tabemann, NOTICE: This bug report may be closed without further notice, if not enough information is provided! ... ACHTUNG!!!! if not enough information is provided the bug will go away and fix itself!!!!
22:25
TCZ has quit [Quit: Leaving]
22:34
WickedShell has quit [Remote host closed the connection]
23:08
jsoft has joined #forth