00:00:00 --- log: started forth/20.02.01 00:14:14 --- join: dys joined #forth 00:39:25 --- quit: _whitelogger (Remote host closed the connection) 00:42:28 --- join: _whitelogger joined #forth 01:40:45 --- quit: forthnutter (Quit: forthnutter) 02:19:35 --- join: f-a joined #forth 04:07:00 --- quit: jn__ (Ping timeout: 252 seconds) 04:29:40 --- quit: jsoft (Ping timeout: 268 seconds) 04:32:35 --- quit: f-a (Quit: leaving) 05:54:06 --- join: dddddd joined #forth 06:04:01 --- quit: ryke (Ping timeout: 240 seconds) 06:06:46 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 06:29:48 --- quit: ovf () 06:31:21 --- join: ovf joined #forth 06:57:19 --- quit: djinni (Quit: Leaving) 07:27:23 --- join: djinni joined #forth 07:47:07 --- quit: tabemann (Ping timeout: 248 seconds) 07:59:53 --- join: jn__ joined #forth 08:11:08 --- quit: proteusguy (Remote host closed the connection) 08:20:59 --- quit: rann () 08:21:34 --- join: rann joined #forth 08:34:31 --- quit: dave0 (Quit: dave's not here) 09:42:17 --- join: ryke joined #forth 11:45:41 --- quit: ryke (Ping timeout: 260 seconds) 12:35:37 --- join: ryke joined #forth 12:55:08 --- join: Croran joined #forth 13:07:53 --- quit: Croran (Remote host closed the connection) 13:13:44 --- quit: gravicappa (Ping timeout: 265 seconds) 13:59:36 --- join: jsoft joined #forth 14:10:09 --- quit: jedb (Remote host closed the connection) 14:10:26 --- join: jedb joined #forth 14:33:37 --- join: tabemann joined #forth 14:57:25 --- quit: _whitelogger (Remote host closed the connection) 15:00:27 --- join: _whitelogger joined #forth 15:38:43 question 15:39:36 does anyone have any recommendations on how to implement CREATE and in a native code forth? 15:39:36 --- join: crab1 joined #forth 15:39:55 okay, for crab1, who just entered: 15:39:58 does anyone have any recommendations on how to implement CREATE and in a native code forth? 15:40:09 wym by native code 15:40:33 like it compiles to actual processor instructions 15:41:42 Anyone know of a formal semantics for a subset of Forth? I'm working through http://concrete-semantics.org/ and there's some pretty interesting stack machine compilation going on in the later chapters. 15:42:05 This is pretty good; https://pdfs.semanticscholar.org/43cd/c0f52701e022b506b5819d6a3c4fea12c001.pdf 15:42:13 "Forth Semantics for Compiler Verification" 15:43:56 to me at least, there's a reason even Haskell doesn't have formal semantics 15:44:16 tabemann: Yes, but the core language, System F Omega, does. 15:44:32 Also Haskell is enormously complex at this point to do a formal semantics. 15:44:45 yeah 15:44:58 Haskell is too much 15:45:19 the problem I see with forth is that it has direct arbitrary access to memory 15:45:25 Given Forth's simplicity, it would be a good way to learn about grounding a small language's semantics, IMO. 15:45:44 crab1: Could you elaborate? 15:45:52 tabemann: Right, and self-modifying code as well. 15:46:00 exactly 15:46:38 (there is research on SMC, but that's way beyond a toy stack language I'm trying to practice formal semantics on) 15:46:43 research on SMC semantics* 15:46:51 http://flint.cs.yale.edu/flint/publications/smc.pdf 15:47:34 tabemann: Then a small core has to be kept, w/out SMC or direct access to memory. 15:47:49 Stack operations, WHILE, IF, various looping operators. 15:48:04 Return stack too, perhaps. 15:48:21 Haskell is too much: the language is complicated, there's too much to know and keep track of when using it, I think 15:50:03 crab1: I think the language is actually pretty small. The ecosystem and libraries are huge, yes, but recently seeing a small self-hosting compiler with a C runtime has changed my mind; https://github.com/blynn/compiler 15:50:54 Certainly, the variuos language extensions added over the years have added complexity enormously. 15:51:02 s/variuos/various 15:51:06 Also I like that forth programs can be self modifying and allow memory manipulation to occur freely, it shouldn't be terribly hard to ensure a word does not modify the program or do bad with memory 15:52:16 crab1: Right, seems like it's just a matter of seeing if an arbitrary write happens for that word. 15:52:24 siraben: I would argue that becoming a regular haskeller requires you to be involved in the ecosystem, like the ecosystem and the language are inseperable 15:52:52 also I need to stop participating in multiple tracks of conversation at once, it's weird 15:53:21 crab1: Yeah, to transition to using a language do things, ecosystem is a must, and I agree that it's pretty wild out there. 15:54:03 Sort of fun, we'll see what comes out of it all, decades from now. 15:54:24 I do like functional though, I just think I need a different language for it 15:54:49 Thanks for the inputs crab1, tabemann, I've got to go. 15:55:08 toodleoo 16:03:20 --- join: X-Scale` joined #forth 16:05:51 --- quit: X-Scale (Ping timeout: 260 seconds) 16:05:51 --- nick: X-Scale` -> X-Scale 16:10:53 tabemann: how you make CREATE and DOES> will depend on some design decisions like threading technique and all but CREATE has to make a word's header and code field from its name and link it to the dictionary then I think before DOES> and (DOES>) you should look at ;CODE and (;CODE). 16:11:30 https://www.bradrodriguez.com/papers/moving3.htm may be helpful 16:22:56 back 16:23:39 I'm implementing CREATE separately from 16:24:07 so I can have a simpler implementation of CREATE 16:29:14 I don't know how you would do it without implementing them separately 16:33:36 but yeah create just makes a header something like | 4 NAME link | 17:14:15 --- quit: tabemann (Ping timeout: 265 seconds) 17:59:52 --- quit: ryke (Ping timeout: 265 seconds) 18:39:17 --- join: iyzsong joined #forth 18:51:10 --- join: boru` joined #forth 18:51:14 --- quit: boru (Disconnected by services) 18:51:16 --- nick: boru` -> boru 18:58:12 tp, Hey so whats your synopsis on stm32l0's vs other mecrisp capable low power uC offerings? 20:18:23 --- join: rdrop-exit joined #forth 20:29:57 c[] good afternoon Forthwrights 20:30:41 afternoon oh unwell Zen Forth Guru living in the shadow of the volcano! 20:31:06 my life is one big adventure ;-) 20:31:20 hello Master Forth Technician (tm) 20:31:37 sounds like it! 20:32:47 rdrop-exit, as youre the local risc-v guru, in your readings did you see only JTAG, was there any mention of SWD ? 20:33:30 Isn't SWD ARM specific? 20:33:51 yes 20:34:06 at least I believe so 20:34:12 Basically in the RISC-V spec they have a thing called the DMI (Debug Module Interface) 20:34:27 which in theory doesn't have to be JTAG 20:34:37 rdrop-exit, have you read the debug specs for cortex-m ? 20:34:52 but for the moment the only DMI that's spec'd is a JTAG DMI 20:35:05 no, I have not 20:35:24 I didn't delve into ARM, decided to focus on RISC-V 20:35:26 darn, youre the one person who could help me if he had! 20:36:10 You're having problems with SWD? 20:36:11 it's more fun deducing alone, but Ive been deducing all day and so far ... nada 20:36:19 no, Im designing as usual 20:36:52 i want to read a dbg register, and I can, problem is that it's all 0's 20:37:14 I know it had ID data (from the specs) 20:38:33 I've phoned 'psychic friends' and they 'feel' that the register is unhappy talking to me directly and I must first please a register it knows 20:41:27 Are you using a debugger to read the debug register via SWD? 20:42:30 I know nothing about ARM but I would assume the CPU has to be in debug mode before you can access it. 20:42:54 do you ever get tired of being right ? 20:43:10 i can read the register in debug mode via SWD/JTAG 20:43:44 but I cant from within the MCU, however the doc is a bot ambiguous there 20:44:22 and I quote " The STM32F10xxx MCUs integrate an MCU ID code. This ID identifies the ST MCU part- 20:44:23 number and the die revision. It is part of the DBG_MCU component and is mapped on the 20:44:23 external PPB bus (see Section 31.16). This code is accessible using the JTAG debug port 20:44:23 (four to five pins) or the SW debug port (two pins) or by the user software." 20:44:48 *or by the user software* is the ambiguous part 20:46:01 In RISC-V there are a *few* debug registers that are also accessible in other CPU modes, but they are the exception. 20:48:17 is there a MCU ID code ? 20:48:37 --- join: gravicappa joined #forth 20:48:44 yes 20:49:10 It's a Machine Mode CSR 20:49:10 is it only accessable in dbug mode ? 20:49:15 No 20:49:34 and that makes sense, why limit a device ID to debug mode only ? 20:49:42 0 shadow RV32 - CSRs - M-Mode - Machine IDs & csr.misa 20:49:42 1 20:49:42 2 csr.mvendorid CSR# of 32-bit Machine Vendor ID CSR (R/O). 20:49:42 3 20:49:42 4 csr.marchid CSR# of MXLEN-bit Machine Architecture ID CSR (R/O). 20:49:44 5 20:49:46 6 csr.mimpid CSR# of MXLEN-bit Machine Implementation ID CSR (R/O). 20:49:49 7 20:49:51 there are valid reasons for a user program wanting to know it 20:49:51 8 csr.mhartid CSR# of MXLEN-bit Hart ID CSR (R/O). 20:49:54 9 20:49:56 a csr.misa CSR# of MXLEN-bit Machine ISA and extensions CSR 20:49:59 b (WARL). 20:50:11 yeah, makes sense 20:50:20 That's my shadow block for it 20:50:48 It's accessible in Machine Mode, but not in Supervisor Mode or User Mode 20:51:09 (and in Debug Mode too of course) 20:51:27 i posted a question in a popular forum about it but also added "replies from those with actual experience on this exact matter appreciated" 20:51:34 :)) 20:52:05 trying to stop the usual idiots dumping sections of the manual as a reply 20:52:44 I would assume on the ARM it would be similarly limited, is the program running in ARM's "machine mode" or whatever they call it? 20:53:02 ar`m doesnt have modes like that as afaik 20:53:08 rather cortex-m 20:53:35 I think it only has debug and normal mode 20:53:57 and I can read the registers in debug, no problem 20:54:25 but I want to be able to read them in user mode. they are listed in the CMSIS-SVD so should be available 20:54:41 and they are, but the contents are not (so far) 20:54:51 that's also the case in small RISC-V, they only have D-Mode and M-Mode, while the bigger chips also have a S-Mode and U-Mode 20:55:27 (for running OS's and VMs and such) 20:56:23 Which Cortex-M in particular are you using 20:57:49 in this case STM32F103C8 20:58:03 which is a STM32F1xx class cortex-m3 20:58:47 thanks, taking a look 20:59:13 I guess youre finding (as I am) that googling will produce millions of hits all the same providing a C user asks it ? 20:59:34 I usually go to the specs 20:59:36 but outside the usual boring and obvous C user questions ... nothing 21:00:10 Ive grepped the device specs and thats the only info Ive come up with 21:00:32 the info is probably in another more specific ARM doc 21:00:43 .. maybe 21:00:51 "The Cortex-M3 processor supports two operating modes, Thread and Handler and two levels of access for the code, privileged and unprivileged" 21:02:04 Maybe this priveleged/unpriveleged stuff is the analagous ARM concept 21:02:32 --- quit: reepca (Read error: Connection reset by peer) 21:03:40 eww 21:04:03 "Code can execute as privileged or unprivileged. Unprivileged execution limits or excludes access to some resources. Privileged execution has access to all resources. Handler mode is always privileged. Thread mode can be privileged or unprivileged." 21:04:12 Ive been conveniently ignorant using Forth on this chip 21:04:48 Perhaps your Forth hides too many of the details 21:04:56 and perhaps I'm in 'unprivileged' is what youre thinking ? 21:05:02 yes 21:05:33 I've had no problems until now 21:05:48 The above quote is from section 3.2.3 of the 21:06:00 usually a register that hides the data belongs to a peripheral that is not enabled 21:06:04 CortexTM-M3 21:06:05 Revision r2p0 Technical Reference Manual 21:06:39 but debug sounds like the province of the privileged 21:07:19 Ill do a grep on "privileged" 21:07:45 I would assume the *few* debug registers that may be accessible to a program would be limited to the most privileged mode 21:07:59 yes, I think youre right 21:08:30 --- join: reepca joined #forth 21:08:46 I'm jst shooting in the dark of course 21:08:51 *just 21:10:55 it's all we have 21:11:21 "priv" is mentioned only 3 times in the entire tech manual and none refer to this issue 21:11:46 it does refer to deep debug stuff 21:11:51 as you expected 21:12:26 there is nothing relating on how to read these registers from inside the mcu 21:12:42 I'm desperate now ... ill have to email Matthias! 21:12:58 that may be covered in a separate Cortex-M3 debug spec 21:13:25 At least that's how it is with RISC-V 21:14:08 I think youre right, but it's odd. generally if thats the case there is *nothing* in the stm tech data or the SVD 21:14:45 the fact that these two registers are in the SVD and mentioned in the STMN tech doc normally indicates it's within their province and not arm 21:15:54 still there is a ton of docs, bound to be some ommisions and crossovers 21:21:22 A Machine ID register though, isn't normally a debug register, it should just require that you be in the most priveledged CPU mode right above degug mode, (what RISC-V calls Machine Mode) 21:21:54 So you shouldn't have to delve into the debug specs for it 21:22:27 hell .. 21:22:39 I just quit out of debug mode and guess what ? 21:23:00 DBG_IDCODE. 21:23:00 DBG_IDCODE $20036410 21:23:00 3|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1| 21:23:00 1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0 21:23:00 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 0 0 0 0 21:23:14 voila 21:24:07 and after a hard reset ... 21:24:10 DBG_IDCODE. 21:24:10 DBG_IDCODE $00000000 21:24:10 3|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1| 21:24:10 1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0 21:24:10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 21:24:28 at least I know that something makes this possible 21:24:37 and it has to do with dbg mode 21:25:46 Can you use your debugger to tell you if your Forth program is running in "privileged" mode? 21:26:34 the Forth program wasnt running as the program was halted before I rudely pulled the jtag plug 21:26:56 but thats a great idea 21:28:11 ! 21:28:29 soon as I hook up the jtag and run openocd I can read the register from forth! 21:28:44 i just halted it before as SOP 21:30:57 heh 21:31:09 so the truth is out there ! 21:31:15 ... somewhere 21:31:47 I'm happy I won't need openocd, doens't seem trustworthy 21:31:50 I guess I just need to read *every* register before I attach the jtag and grep it 21:32:24 and Im actually planning to make a binary to do just that for another reason anyway! 21:32:54 I mean difference it against a non jtag one 21:33:12 all my XML stuff is still paying off 21:33:22 check this out, try not to throw up 21:33:29 ok 21:33:47 21:33:47 21:33:47 21:33:47 0 21:33:47 0 21:33:48 0 21:33:50 0 21:33:52 0 21:33:56 0 21:33:58 21:34:00 21:34:02 $FFFF0040 21:34:04 65536 21:34:06 0 21:34:08 21:34:10 21:34:12 $066FFF53 21:34:14 .o.S 21:34:16 21:34:18 21:34:20 $55507150 21:34:22 UPqP 21:34:26 21:34:28 21:34:30 $87042957 21:34:32 ..)W 21:34:34 21:34:36 21:34:38 thats straight out of the chip running my new Forth diags prog 21:35:07 damn, where did I put that barf bag? ;-) 21:35:12 i decided to create a 'record' option which generates the XML 21:35:22 I did warn you ;-) 21:35:45 tether tether tether 21:36:11 (cough cough) 21:36:23 :) 21:36:29 better now 21:36:29 nah, Ive had 88 downloads of my V1 diags binary and it's all windows mainly arduino users 21:37:46 cool 21:38:37 I'm glad you convinced me to go RISC-V instead of ARM 21:42:28 it will be a freezing day in hell whan I manage to convince you of anything! 21:43:36 hey I've a suggestion song for your daughter, it might suit her style, but it could make her infamous and hated by the left for 1000 years tho ... 21:43:42 You're insights were whatr put me over the edge :) 21:44:01 ok 21:44:19 "garryowen" along with the flutes etc 21:44:42 she could do the original irish version to be a bit safer ? 21:45:00 not familiar, will mention it to her when we next skype 21:45:43 this is the chorus in the Amer`ican version 21:45:46 Our hearts so stout have got us fame 21:45:46 For soon t'is from whence we came; 21:45:46 Where'er we go they dread the name, 21:45:46 Of GarrOwen in Glory. 21:45:58 think Custer 21:46:10 she recorded an original song which I quite liked, but she hasn't put it on youtube 21:46:31 one has to be very careful thesedays 21:47:08 singing is just a hobby for her, her real job is acting 21:47:19 wow 21:47:26 well her` singing is awesome! 21:47:42 thanks, I'll share that with her! 21:47:43 she makes Nancy S sound like a old tired fishwife 21:50:12 she also dances pretty well, she won on the local TV dance contest, similar to dancing with the stars 21:50:46 (that was like 10 years ago) 21:51:40 I'll see if it's on youtube 21:51:59 yup, low-res though 21:52:01 https://youtu.be/0msBa3sSJqE 21:53:13 https://www.youtube.com/watch?v=4m7RPjQxjmA 21:53:20 thats the one I saw today 21:53:44 I remember that movie 21:53:56 i never saw it 21:54:01 is that errol flynn ? 21:54:04 yes 21:54:10 tasmanian 21:54:37 cool 21:55:25 the irish version is much longer and not about war 21:55:30 and it's the original 21:56:16 but think what a stir that tune would be on utube sung by your daughter and advertised as 'GarryOwen' ? 21:56:28 then again utube might demonetise her :( 21:56:38 heh 21:57:09 well I think the risc-v is a good way to go, it could be massive one day 21:57:31 right now the doc sucks and the current die has a few errors 21:57:38 but that can all be fixed 21:57:49 and I do have a Forth running nicely on it 21:58:39 here is one gd32vf103 issue, there is no single command to reset all the registers to defaults 21:58:47 unlike cortex-m 21:59:01 the doc claims there is, but it's wrong 21:59:54 and it's wrong because that part of the doc is a paste from the GD32F103 which is a cortex-m with cloned STM peripherals 22:00:40 so thats something to beware, it looks like the GD32VF103 manual started life as a GD32F103 manual with the differences edited 22:02:14 that particular RISC-V implementation seems oriented to ARM developpers 22:03:04 i dont believe thats the reason it exists 22:03:33 the STM32F103 has been cloned in China 22:04:03 and millions of counterfeit STM32F103C8's now exist, but inside theyre a clone 22:06:12 the ARM (counterfeit or real) ecosystem 22:06:44 thats the reason for my 'diagnostics' binary 22:07:01 it attempts to discover if the chip is real or cloned 22:07:30 cool 22:08:20 well V1 did 22:08:31 V2 is mainly after the facts ... jack 22:09:03 and the XML output is for posterity, so anyone can analyse the user feedback 22:11:32 FTDI's sample code sucks 22:12:03 you said 22:12:24 but it's a good choice 22:12:24 But their MPSSE engine is cool 22:12:33 FTDI is probably the market leader ? 22:12:42 yes 22:12:52 (at least I think so) 22:12:53 ugly as they are 22:14:43 I wish the internals were documented, I hate using 3rd party libraries 22:15:20 the open source alternatives don't inspire confidence 22:15:29 though 22:16:16 theyre all reverse engineered I guess ? 22:16:33 so how much confidence can you have ? 22:16:45 right 22:18:03 plus doing a deep dive into USB would give me ulcers 22:18:58 yeah, tho we do have a couple of working Forth examples 22:19:22 for a usb-serial bridge that is 22:19:36 it's not as bad as I thought but TONS of config 22:23:29 Tons of options make my nose bleed, I like to pin things down 22:24:38 yeah, Ive been afraid of USB for years 22:29:00 What I would like to eventually do is replace their library with my own code for going from the USB driver to their synchronous serial bridging thingie (MPSSE) 22:29:32 but youre doing more than that ? youre goung from usb to JTAG ? 22:29:57 ahh that is MPSSE ? 22:31:55 MPSSE is a feature of their USB chip that receives commands and outputs synchronous serial signals. 22:34:33 Dealing with JTAG requires configuring the MPSSE output pins and clock, then 22:34:59 sending sequences through it to make the JTAG TAP controller on the other end dance to your tune. 22:35:10 i like it! 22:35:33 I may harass you for information later in the year if we are still alive 22:35:39 :) 22:36:45 Im assuming your volcano has decided not to to eradicate all life in Philippines today ? 22:37:08 although you still have to know what you need to send that JTAG TAP controller for it to in turn make stuff on the target board dance. 22:37:09 perhaps tomorrow ? 22:37:23 i do know a lot of that 22:37:50 it actually seems fairly straightforward 22:38:36 hahah, I'm about to make one of the longest Words I'll ever make 22:38:55 at some level yes, but there's ton's of detail work 22:39:14 ever seen a Word 466 lines long ? 22:39:56 i'll bet there are some who think that's too long ? 22:39:59 hahahahah 22:40:00 no, impossible 22:40:27 no it's not :) 22:40:36 I already have some far longer 22:40:39 are you just comma-ing in 466 lines of data, this is not code right? 22:40:55 it's code all right 22:41:26 like if you do CREATE STUFF 123 , 234 , ... and on and on... that's fine 22:42:12 i already have one Word 1541 lines long 22:42:20 here is a sample 22:42:20 You mean a colon definition like : humonguous ( -- ) ... 466 lines ... ; ? 22:42:29 no 22:42:39 seperate short lines 22:43:13 oops. ok, Im weong 22:43:17 wrong even 22:43:26 it's a file length 22:44:06 inside the file are words that are like this 22:44:09 ( USB - Universal serial bus full-speed device interface ) 22:44:09 $40005C00 constant USB_EP0R ( endpoint 0 register ) 22:44:09 $40005C04 constant USB_EP1R ( endpoint 1 register ) 22:44:09 $40005C08 constant USB_EP2R ( endpoint 2 register ) 22:44:09 $40005C0C constant USB_EP3R ( endpoint 3 register ) 22:44:09 $40005C10 constant USB_EP4R ( endpoint 4 register ) 22:44:11 $40005C14 constant USB_EP5R ( endpoint 5 register ) 22:44:13 $40005C18 constant USB_EP6R ( endpoint 6 register ) 22:44:15 $40005C1C constant USB_EP7R ( endpoint 7 register ) 22:44:17 $40005C40 constant USB_CNTR ( control register ) 22:44:19 $40005C44 constant USB_ISTR ( interrupt status register ) 22:44:21 $40005C48 constant USB_FNR ( frame number register ) 22:44:23 $40005C4C constant USB_DADDR ( device address ) 22:44:27 $40005C50 constant USB_BTABLE ( Buffer table address ) 22:44:29 : USB_EP0R. ." USB_EP0R (read-write) $" USB_EP0R @ hex. USB_EP0R 1b. ; 22:44:29 that's fine 22:44:31 : USB_EP1R. ." USB_EP1R (read-write) $" USB_EP1R @ hex. USB_EP1R 1b. ; 22:44:33 : USB_EP2R. ." USB_EP2R (read-write) $" USB_EP2R @ hex. USB_EP2R 1b. ; 22:44:35 : USB_EP3R. ." USB_EP3R (read-write) $" USB_EP3R @ hex. USB_EP3R 1b. ; 22:44:37 : USB_EP4R. ." USB_EP4R (read-write) $" USB_EP4R @ hex. USB_EP4R 1b. ; 22:44:39 : USB_EP5R. ." USB_EP5R (read-write) $" USB_EP5R @ hex. USB_EP5R 1b. ; 22:44:41 : USB_EP6R. ." USB_EP6R (read-write) $" USB_EP6R @ hex. USB_EP6R 1b. ; 22:44:43 : USB_EP7R. ." USB_EP7R (read-write) $" USB_EP7R @ hex. USB_EP7R 1b. ; 22:44:45 : USB_CNTR. ." USB_CNTR (read-write) $" USB_CNTR @ hex. USB_CNTR 1b. ; 22:44:47 : USB_ISTR. ." USB_ISTR (read-write) $" USB_ISTR @ hex. USB_ISTR 1b. ; 22:44:49 : USB_FNR. ." USB_FNR (read-only) $" USB_FNR @ hex. USB_FNR 1b. ; 22:44:51 : USB_DADDR. ." USB_DADDR (read-write) $" USB_DADDR @ hex. USB_DADDR 1b. ; 22:44:53 : USB_BTABLE. ." USB_BTABLE (read-write) $" USB_BTABLE @ hex. USB_BTABLE 1b. ; 22:44:57 : USB. 22:44:59 USB_EP0R. 22:45:01 USB_EP1R. 22:45:03 USB_EP2R. 22:45:05 USB_EP3R. 22:45:07 USB_EP4R. 22:45:09 USB_EP5R. 22:45:11 USB_EP6R. 22:45:13 USB_EP7R. 22:45:15 USB_CNTR. 22:45:17 USB_ISTR. 22:45:19 USB_FNR. 22:45:21 USB_DADDR. 22:45:23 USB_BTABLE. 22:45:27 ; 22:45:29 about 33 Words like that for a STM32F103 22:45:33 but the new word needs to read and print 466 registers 22:46:00 and as it's autogenerated from a massive XML file, it will probably be 466 lines long 22:46:08 something like this 22:46:18 That doesn't seem like a good idea 22:46:32 $40005C00 @ hex. 22:46:41 but 466 of them 22:46:59 why ? 22:47:45 when you get a combinitorial explosion of words, you shoud refactor to make words that work in phrases. 22:47:52 * should 22:48:23 this is just a complete register contents dump 22:48:30 i dont see a easier way 22:48:48 a dump should be a loop 22:49:24 the addresses arent a contiguous sequence, they come from a XML file 22:49:50 they jump around all over the place, and ONE wrong address will cause a exception 22:50:15 this is all about hardware, not coding style 22:50:50 thos it's nice to have efficient coding style 22:50:58 but it's also autogenerated 22:51:14 Ill ask the XML parser to please be efficient with the code ? 22:51:20 ;) 22:51:20 well you're sourcing them from XML not hardware per se 22:52:42 just a sec looking over what you posted 22:53:02 I'm sourcing the addresses from XML 22:53:11 and generating the Forth Words 22:53:21 with a XML parser 22:53:38 Where does the XML originate? 22:54:04 from STM in this case, and it conforms to the ARM CMSIS-SVD XML format 22:54:51 ah, ARM-specific stuff 22:54:55 https://mecrisp-stellaris-folkdoc.sourceforge.io/register-generator.html#svd2forth 22:54:58 yeah 22:55:17 tho I now have some Ti MCU XML files in the same format 22:55:59 it seems the RUST people love converting proprietary MCU definition files into CMSIS-SVD 22:56:04 files 22:56:29 I even have a CMSIS-SVD for the GD32VF103 22:56:41 compliments of the RUST folks 22:56:57 thats how Ive been able to have Words for every register 22:57:27 Constants for every register is fine 22:57:56 but a combinatorial explosion of colon definitions is not IMO 22:59:06 I think of it as a "flatulence of colon definitions" myself 23:00:01 whenever I'm tempted to do a combinatorial explosion of colon definitions, I try to see if I can make words that work in phrases instead. 23:00:29 IIRC Thinking Forth covers this 23:01:00 In fact this is why CREATE and VARIABLE words are now non-standard 23:01:42 I could break it up into register groups, thats the finest grain I can do wordwise 23:03:16 As long as there aren't many exceptions to the regularity, a combinatorial explosion can usually be reduced to words that work in phrases 23:04:14 there will be a lot of exceptions, remember the addresses come from a xml file 23:04:39 the cool thing here is I can try the simple way and see what happens 23:04:58 all I want is a file of all the register contents in a MCU 23:05:30 also a combinatorial explosion of words takes up much more dictiory space than the phrasal approach 23:06:05 all 466 of them 23:06:17 as long as it fits in 128Kb I'm good 23:06:40 doesn't impact me as much since I keep headers on the PC side of a tether, but if you're doing resident Forth it will impact you more 23:06:48 if it doesnt then I'll have to look at other choices, but I already know it will easily fit 23:07:22 it can also slow down your dictionary lookup 23:07:52 I then write a script so the progran works with gnu screen and is saved into a correctly titled log with any extraneous crap removed 23:08:12 the only porpose it to get a register dump 23:08:31 I'm not going to need any thing else from it 23:09:17 then I post it on my website and others with counterfeit chips use it to produce dumps which they then email to me 23:09:51 i then run diffs against my genuine chip :) 23:10:27 plus I also use it for my most recent problem, what did enabling the DBG do to my chip ? 23:10:38 see if I can find it that way 23:11:01 detective tp is on the job! 23:11:23 elementary my dear watson 23:11:50 as long as I get my dump, which I know I will, job done! 23:12:39 the public binary release will also have the working USB driver installed 23:13:02 right if it's just throw away then it doesn't really matter if it's well factored or not 23:13:03 so the good arduino folks can use their PC to easily get the data 23:13:07 yeah 23:13:13 it's very limited use 23:13:30 but it will be neat, Im very anti ugly Forth code! 23:13:43 a great public service, helping arduino users take dumps 23:13:57 the good arduino folks wont even know it's forth, they just see a menu 23:13:59 hahaha 23:14:04 ;) 23:14:08 it's a shitty job but someone has to do it 23:15:18 I use awk for all my thro-away text processing needs 23:16:26 in this case it would be the right tool for the wrong job :) 23:16:48 If I had to deal with XML, I would flatten it out then feed it to an awk script 23:17:11 the data is xml, a xml parser creates a Forth word(s) including the data which is then run on the MCU 23:17:35 well, youre a programmer, I'm not worthy to do that kind of thing 23:18:05 what do those generated Forth words output? 23:18:21 I mean what format do they output? 23:18:39 but honestly, flattening out XML and then hydrating it with AWK could get you banned from programming ever again 23:18:55 they output the contents of every register in the MCU 23:19:02 as what? 23:19:07 XML again? 23:19:36 yeah, probably 23:19:45 but maybe not 23:19:46 probably? 23:19:49 ah 23:20:04 I only need the register address and the data on each ine 23:20:06 line 23:20:16 then I can simply difference the files 23:20:21 much better 23:20:25 to find changes 23:20:50 only one data item, so xml would be wasted I think 23:21:52 probably "register-address,hex. cr " per line of output 23:22:00 XML on the input side is being imposed upon you by the vendors, but there's no need to impose it again on yourself downstream 23:22:39 I'm a XML fan, it's no imposition for me 23:23:06 take my V2 diags output, thats XML because there are a number of items 23:23:49 and it's that way so I can easily build a XML to sqlite or postgress DB parser 23:24:03 or maybe comma delimited for a spreadsheet 23:25:15 Hey whatever turns you on. Personnaly the first thing I'd do with a XML file is un-XML-ize it somehow. 23:25:41 haha, XML is universally hated, but not by me 23:25:49 I learnt to love XML 23:26:24 I guess I'm immune from programming language hate as Im not a programmer :) 23:26:32 --- join: dave0 joined #forth 23:26:44 --- join: X-Scale` joined #forth 23:27:12 Hey who am I to question your fetishes 23:27:37 --- quit: X-Scale (Ping timeout: 240 seconds) 23:27:38 --- nick: X-Scale` -> X-Scale 23:27:43 when I first announced I was designing my SVD2FORTH program vomit rained down on me from the lofty heights of my programmer friends 23:27:47 lol 23:28:00 they universally loathed XML 23:28:43 but I was too dumb to know I shouldnt use it, and eventually I fell in love with XML and we eloped to Vegas and got married 23:29:05 and there was much rejoycing 23:29:32 no, everyone who saw the bride threw up, bikies threatened to beat me up, my mum slapped me 23:29:56 no more Mr. nice guy 23:30:10 no more Mr. clean 23:30:38 no Im still a nice guy, but Mrs XML and I dont go outside a lot 23:31:34 then to add insult to injury I got my self a Forth mistress! 23:31:49 now I was *really* unpopular 23:32:12 XML and Forth got along famously 23:34:20 it takes all kinds 23:35:23 it do 23:35:44 i mean there is some real perversion going on out there 23:36:10 lucky for you nobody reads this IRC's log 23:36:14 take Linux, C and VisualStudio from microsoft, disgusting! 23:36:52 yeah, only 42 Forth users in the world might read this 23:37:32 if this was a Arduino IRC channel there would be 7000 regular members and 100,000 lurkers 23:37:53 wow, really? 23:37:59 probably 23:38:14 I'll just hide here, thanks 23:38:15 if Arduino users used IRC 23:38:28 but they dont, it's all forums for them 23:38:40 millions of them 23:38:52 (arduinoistas) 23:39:28 8-O 23:40:34 watching a Arduino ATMEL Mega8 user trying to use Arduino on a STM32F is like watching a 4 year old child wander onto a 12 lane superhighway 23:40:47 very messy 23:47:11 bbiab 23:47:56 no problemo 23:59:59 --- log: ended forth/20.02.01