WickedShell has joined #forth
Zarutian_HTC has quit [Read error: Connection reset by peer]
Zarutian_HTC has joined #forth
<tp> crest, wow, thats a big improvement
<tp> 20x +
<tp> crest, stm32 -> host direction is going to be the fastest anyway
cp- has quit [Quit: Disappeared in a puff of smoke]
cp- has joined #forth
<tabemann> back
<tabemann> ugh
<tabemann> working with the nRF52840-DONGLE board is such a fucking pain
<tp> why ?
<tabemann> they had to make everything so complex, and they seem to omit key points like where in hell is the application vectors
<tabemann> is it just at the start of the application binary?
<tabemann> if not, where?
<tp> I have a svd2forth for it
<tp> not that it helps there
<tabemann> they also had to make their installation process so complex
<tp> flashing you mean ?
<tabemann> yeah
<tabemann> and you have to make sure you don't overwrite the MBR at the start of flash, or else you've effectively bricked the device, unless you manage to solder a connector to the SWD pads on the bottom of the board
<tabemann> but at the same time, nrfutil only flashes the pages where code is being installed, so you have to make sure to flash the space after it (up to the bootloader code) if you want to use it for Forth
<tp> eww with other NRF boards you just connect the usual SWDIO, SWCLK and GND pins and use openocd as usual.
<tabemann> I think this has these, but instead of pins they are surface mounts
<tabemann> and I'm not good at soldering, and forget about surface mounts
cp- has quit [Quit: Disappeared in a puff of smoke]
<tp> yes, I recall the pic, those test pads are just unusable
<tp> tabemann, you may find this interesting at some point re NRF https://github.com/juju2013/swd-bb
<tp> tabemann, what you have there are 'test points' theyre not made for soldering
<tabemann> yeah
<tp> tabemann, theyre designed to touch a the point of a spring loaded test needle in a special jiig
<tabemann> I figured
<tp> tabemann, I have the pins and all the machinery to make a jig, but no nrf boards
<tp> looks like the $100 board was a better idea and the $10 one is hard to use ?
<tp> still ... the NRF chip is very impressive
<tabemann> seems so
<tp> tabemann, I think that if the user has no soldering skills, it's always gotta be the more expensive boards
<tp> I use the single chips, but one must have the skills and gear
<tabemann> provided the $100 board can be programmed with SWD out of the box
<tp> tabemann, agreed, and they usually have all the right connectors
<tp> plus didnt that one come with a bunch of cables etc
<tabemann> I didn't look at the details of the $100 board, just saw the price and passed on it
<tp> the $100 board is vastly cheaper than my way, Ive probably $30,000 in machinery here so I can use a $0.60 cent cpu
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
<tabemann> I like my $25 boards
<tabemann> not so cheap that the quality is reduced or there are limitations like needing soldering and not too expensive either
<tp> theyre good value, probably the best out there
<tp> but they have short pins which *really* annoys me
<tabemann> I managed to deal with the short pins on the STM32 DISCOVERY boars
<tabemann> *boards
<tp> in comparison a Olimex board has full length pins st the top and theyre all gold plated, it also has JTAG, rs/232 and USB
<tp> it's a much better board, the schematic is even better
<tp> but it cost about 2 -3 x that of the disco board
<tp> in the long run, the better board is worth the extra imho
<tabemann> question
<tabemann> what is the relationship between SWD, ST-Link, JTAG, AN J-Link?
<tabemann> *and*
<tp> actualy the disco board pins are gold plates as well, just way too short
<tp> SWD is the ARM alternative to JTAG, just a protocol for flashing/testing the chip
<tp> st-link is the firmware used to provide the SWD protocol within a pc
<tabemann> so for a Nordic board that provides SWD, what would I use to connected that to my PC?
<tp> j-link, I dont really know, I think it's a commercial equivalent to st-link thats supposed to be better somehow
<tp> tabemann, you can use a disco board
<tp> tabemann, your disco board has SWD connectors on it ready to be used to connect to a chip or abother board
<tabemann> then I need to learn how SWD works - lol
<tp> tabemann, atm your disco board SWD subsystem is connected to the target chip on the same board with option jumpers
<tp> tabemann, yeah but thats easy, it's all user stuff
<tp> tabemann, basically you use OPENOCD with a 'mcu' and 'board' configuration
<tp> like this
<tp> openocd -f /usr/local/share/openocd/scripts/interface/ftdi/olimex-arm-usb-tiny-h.cfg -f /usr/local/share/openocd/scripts/target/stm32f1x.cfg
<tp> except here I'm using a olimex jtag adaptor
<tp> youd use stlink-v2-1.cfg
<tp> or something like that
<tp> just list the files in whatever/openocd/scripts/interface/
<tp> to see what your choices are
<tp> then look in /usr/local/share/openocd/scripts/target/ to find what chip to use
<tp> after that it's just use openocs
<tp> openocd I mean
<tabemann> I see a group of six pins on my STM32L476 discovery board
<tabemann> labeled SWD V-somethingoranother SWCU GND SWDIO NRST SWO
<tabemann> are these them?
<tp> yes
<tp> there are option jumpers there ?
<tp> should be two of them side by side
<tp> they will be opposite those 6 pins (more or less)
<tp> that part of the disco is the SWD section
<tp> you actually have two systems on that board, 1) SWD system 2) STM32L476 target system
<tabemann> yes there is
<tabemann> there are two sets of settings, "DISCOVERY" and "ST-LINK"
<tp> use "DISCOVERY" to flash the STM32L476 and "ST-LINK" to use those 6 pins to flash a external device such as your nRF52840-DONGLE board
<tp> you have to switch the SWD substem to one or the other using the two jumpers
<tabemann> why are there two jumpers rather than one?
<tp> remove the jumpers to use those 6 pins to flash a external device such as your nRF52840-DONGLE board
<tp> why should there only be one ?
<tabemann> donno
<tabemann> that seems to imply that one could be off and one could be on
<tp> why do you have 2 legs rather than one ;-)
<tp> no, both option jumpers are removed together, or instanned together
<tp> installed
<tabemann> I figured that
<tp> the fact that a disco/nucleo has a complete SWD interface makes them even better value
<tp> se the chip in the SWD section ?
<tabemann> yeah
<tp> thats a STM32F103 ... same as in the 'blue pill'
<tabemann> and I remember reading something a while back about people turning blue pills into ST-Link programmers
<tp> exactly
<tp> there are a number of firmwares that claim to do that but theyre a bit dodgy imho because people want to sell the hardware not give the fw away
<tp> i tried it once and couldnt get it working, was a uggly mess
<tp> tabemann, oh, you can also use a RPI as a SWD/JTAG programmer
<tp> there are much friendlier FW around for thiose
<tp> they also include a gdb server etc
<tabemann> whereas blue pills aren't very friendly devices
<tp> tabemann, no, theyre pretty junky
<tp> but the easiest device is the one on your disco board
<tp> it's all set and ready to go
<tabemann> yeah
<tabemann> so you just take each pin of those six on the DISCO board and use a jumper cable to hook it up to the matching pin on the target?
<tp> pull the jumpers, wire 4 wires I think, +v,0v, signal and clock, reset and youre good to go
<tp> ill check
<tp> tabemann, this looks interesting ?
<tp> bbl, gtg shopping
dave0 has quit [Quit: dave's not here]
warriors has joined #forth
warriors has left #forth [#forth]
<tp> bak
<tabemann> wb
* tabemann has been reorganizing his documentation for zeptoforth
<tp> cool
<tabemann> the only issue I have is that the level-5 headers with code strings appear correctly in github markdown, but in recommonmark markdown the headers just seem too big
<tabemann> I could make them just code strings, but then the user wouldn't be able to link to the strings themselves
<tabemann> that's my only gripe w.r.t. sphinx + recommonmark
<tabemann> with github markdown the headers are just bolded some relative to normal code strings
<tp> could it be your browser settings ?
<tabemann> nah - I'm viewing the two on the same browser
<tp> well github is probably wrong
<tp> I know that most github pages dont render properly for me
<tp> most are unreadable
<tabemann> okay, sphinx+recommonmark are converting my level-5 headers to level-2 headers
<tabemann> whereas github is keeping them as level-5 headers
WickedShell has quit [Remote host closed the connection]
<tp> honestly many github sites are unreadable for me
<tp> they have been for a long tim
<tp> the fonts are widely spaced or too big or whatever
<tp> I hardly ever browse github sites
<tabemann> I haven't had any problems with github sites myself
<tabemann> are you sure this isn't a font problem?
<tabemann> okay, I should hit the sack
<tabemann> g'night
<tp> i dont know, but i never have that problem anywhere else
<tp> gnight tabemann
jsoft has joined #forth
cp- has joined #forth
cp- has quit [Client Quit]
cp- has joined #forth
cp- has quit [Client Quit]
cp- has joined #forth
dddddd has quit [Ping timeout: 260 seconds]
dave0 has joined #forth
antaoiseach has joined #forth
dys has quit [Ping timeout: 256 seconds]
reepca` is now known as reepca
TCZ has joined #forth
TCZ has quit [Remote host closed the connection]
TCZ has joined #forth
TCZ has quit [Remote host closed the connection]
TCZ has joined #forth
mtsd has joined #forth
TCZ has quit [Client Quit]
TCZ has joined #forth
andrei-n has joined #forth
proteus-guy has quit [Ping timeout: 256 seconds]
reepca has quit [Read error: Connection reset by peer]
reepca has joined #forth
dys has joined #forth
[1]MrMobius has joined #forth
MrMobius has quit [Ping timeout: 256 seconds]
[1]MrMobius is now known as MrMobius
TCZ has quit [Quit: Leaving]
gravicappa has joined #forth
proteus-guy has joined #forth
xek has joined #forth
proteus-guy has quit [Ping timeout: 272 seconds]
reepca has quit [Remote host closed the connection]
reepca has joined #forth
<crest> tp: i spent last night on the second prototype
<crest> the first one just used four bytes in a single cell
<crest> that worked but was very inefficient
<crest> because the host and stm32 are always waiting for each other
<crest> and the host just polled the whole 32bit word again and again until something changed
<crest> if it wanted to change something it wrote (ack a byte, send a byte and mark the buffer used) it used one or two 8 bit writes
<crest> it tranfered very little data per command
<tp> interesting!
<crest> and every single byte transmission that direction was blocked until the receiver polled
<crest> now i used a large 256 (- 1) byte ring buffers per direction
<tp> so you won the battle of the buffers ?
<crest> all four indicies (read and write per direction) still fit in a single 32bit word
<crest> the host still polls a single word for changes
<tp> wow, serious design skills you have there
antaoiseach has quit [Quit: leaving]
<crest> but this time host drains the whole buffer with one or two commands
<tp> so 4x faster ?
<crest> for the data and on 8 bit write to move the data
<crest> much more
<tp> very nice
<crest> because the stlink does a block copy of 32bit words
reepca has quit [Remote host closed the connection]
reepca has joined #forth
<crest> the host only has pad the read sizes to natural alignment and ignore the padding
<crest> i wanted to avoid using aligned loads because they result in twice as many sram accesses
<crest> stolen by the debug hardware
<crest> now i have to find time to implement the host -> stm32 direction
<crest> and add things to make it useful like file upload
<crest> and the ability to reset the stm32 via swd
<tp> is your new technique responsible for the under one second wordlisting ?
<tp> reset the stm32 via swd, hmm thats handy if it can reset under any conditions
<crest> it should be able to reset under all conditions except if you disabled swd at runtime
<crest> yes adding a ring buffer to decouple the producer and consumer helped a lot
<tp> I'm going to fit a touch pad on the development box for resetting the MCU as I do it a million times a day anyway
<tp> unlike a PB switch I cant wear a touchpad out
<crest> but doing the data transfers in large batched made a real difference
<tp> the device is always right next to me anyway, so resetting it is second nature now
<tp> crest, seems like youyre making real headway there
<tp> tis will be the first 'new' mecrisp-stellaris thing Ive seen in a while
<tp> we received a donated python 'ok-wait' program the other day
<tp> $ picocom -b 115200 /dev/ttyACM0 --imap lfcrlf,crcrlf --omap delbs,crlf --send-cmd "./xfr.py"
<tp> 1
<tp> 4
<tp> 3
<tp> 2
<tp> 5
<tp> 6
<tp> 7
<tp> 8
<tp>
<tp> #!/usr/bin/env python3
<tp> import sys
<tp> for l in open(sys.argv[1], "rt"):
<tp> sys.stdout.write(l)
<tp> r = sys.stdin.readline()
<tp> sys.stderr.write(r)
<tp> if not r.endswith("ok.\n"):
<tp> sys.exit(1)
<tp> oops
<tp> didnt translate well to irc
<tp> The script waits for an "ok." before sending consecutive lines so the transmission is somewhat faster than when using a fixed delay per line.
<crest> yes but suffers from data transparency problems
<crest> what if my code includes as literal "ok.\n" at the end of a line?
<tp> you mean when the 'ok' prompt is not consistent so it gets locked up ?
<tp> then you have a problem I suppose ?
<crest> exactly
<tp> this is of course why I use RTS handshaking
<tp> all software handshaking can run into problems
<crest> unless your usb<->serial adapter is buggy
<tp> my $0.90 usb-serial dongles have been fine
<tp> I bought 20 at a time
<crest> e.g. a ftdi232 has an errta notice that some versions of the chip send up to 3 bytes after hardware flow control stopped them
<tp> mine have different chips
<tp> theyre not fttdi
<tp> but I have the ftdi ones in cables and they seemed ok when I used them
<tp> i use Silicon Labs CP2102
<tp> devices as they have all the control lines available
<tp> but your SWD technique sounds very exciting
<tp> be interesting to see where it leads
dave0 has quit [Quit: dave's not here]
xek_ has joined #forth
xek has quit [Read error: Connection reset by peer]
dddddd has joined #forth
proteus-guy has joined #forth
va_ has joined #forth
va has quit [Ping timeout: 256 seconds]
X-Scale` has joined #forth
X-Scale has quit [Ping timeout: 272 seconds]
X-Scale` is now known as X-Scale
Zarutian_HTC has quit [Ping timeout: 260 seconds]
Zarutian_HTC has joined #forth
reepca has quit [Remote host closed the connection]
reepca has joined #forth
Zarutian_HTC has quit [Ping timeout: 256 seconds]
APic has quit [Ping timeout: 240 seconds]
APic has joined #forth
mtsd has quit [Quit: Leaving]
proteus-guy has quit [Ping timeout: 246 seconds]
APic has quit [Ping timeout: 260 seconds]
reepca has quit [Remote host closed the connection]
reepca has joined #forth
APic has joined #forth
reepca has quit [Read error: Connection reset by peer]
proteus-guy has joined #forth
jsoft has quit [Ping timeout: 265 seconds]
Zarutian_WEB has joined #forth
antaoiseach has joined #forth
xek__ has joined #forth
xek_ has quit [Ping timeout: 256 seconds]
antaoiseach has left #forth [#forth]
jackdaniel has quit [Remote host closed the connection]
jackdaniel has joined #forth
jackdaniel has quit [Remote host closed the connection]
dys has quit [Ping timeout: 244 seconds]
jackdaniel has joined #forth
arrdem has quit [Ping timeout: 265 seconds]
guan has quit [Read error: Connection reset by peer]
arrdem has joined #forth
guan has joined #forth
arrdem has quit [Ping timeout: 258 seconds]
arrdem has joined #forth
arrdem has quit [Ping timeout: 256 seconds]
guan has quit [Ping timeout: 264 seconds]
arrdem has joined #forth
guan has joined #forth
WickedShell has joined #forth
karswell has joined #forth
Zarutian_WEB has quit [Quit: Zarutian_WEB]
reepca has joined #forth
Zarutian_HTC has joined #forth
<andrei-n> Hello. Does anyone know gforth? Is there a way to modify the ctrl-z behavior? I'd like to reuse it for my app...
<crest> andrei-n: what does ctrl+z do on your platform?
<andrei-n> crest, it exits to linux shell.
<andrei-n> And the process goes to background.
<crest> you can't catch the stop signal, but you can put the tty in raw mode
<crest> but you can register a handler for SIGTSTP
<andrei-n> So that will require calling C code from Forth...
<cmtptr> andrei-n, signal() and sigaction() are linux system calls
TCZ has joined #forth
xek__ has quit [Ping timeout: 258 seconds]
gravicappa has quit [Ping timeout: 272 seconds]
dave0 has joined #forth
<andrei-n> yes...
<andrei-n> Is it possible to do the same without C calls?
andrei-n has quit [Quit: Leaving]
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
C-Keen has quit [Ping timeout: 272 seconds]
C-Keen has joined #forth
C-Keen is now known as Guest46854
L1 has joined #forth
CORDIC has quit [Remote host closed the connection]
TCZ is now known as DoomSlayer2020
jn__ has quit [Ping timeout: 272 seconds]
<WilhelmVonWeiner> Chuck just said registers are better than stacks!
<WilhelmVonWeiner> (watching Forth Day 2019)
<cmtptr> it really is the end of times
<WilhelmVonWeiner> oh nevermind
<WilhelmVonWeiner> hes just talking about certain pointers
Guest46854 has joined #forth
Guest46854 has quit [Changing host]
Guest46854 is now known as C-Keen
jn__ has joined #forth
DoomSlayer2020 has quit [Quit: Leaving]
TCZ has joined #forth
TCZ is now known as DoomSlayer2020