00:00:00 --- log: started forth/20.03.19 00:20:35 --- join: mtsd joined #forth 00:45:25 --- quit: _whitelogger (Remote host closed the connection) 00:48:29 --- join: _whitelogger joined #forth 00:57:31 --- quit: X-Scale (Ping timeout: 258 seconds) 00:57:52 --- join: X-Scale` joined #forth 00:58:35 --- nick: X-Scale` -> X-Scale 01:00:36 --- join: gravicappa joined #forth 01:09:00 --- quit: mjl (Ping timeout: 272 seconds) 01:09:44 --- join: mjl joined #forth 01:19:32 --- join: kieselsteini joined #forth 01:26:53 --- join: dys joined #forth 01:56:08 --- join: xek joined #forth 02:02:04 --- quit: jsoft (Ping timeout: 246 seconds) 02:12:01 --- quit: dys (Ping timeout: 256 seconds) 03:12:24 --- quit: _whitelogger (Remote host closed the connection) 03:15:28 --- join: _whitelogger joined #forth 03:23:20 --- join: the_cuckoo joined #forth 03:24:27 --- join: mtsd_ joined #forth 03:26:53 --- quit: mtsd (Ping timeout: 256 seconds) 03:40:41 --- quit: mtsd_ (Quit: Leaving) 03:48:48 --- quit: kieselsteini (Quit: Palaver https://palaverapp.com) 04:02:39 --- quit: iyzsong (Remote host closed the connection) 04:03:11 --- join: iyzsong joined #forth 04:07:03 --- join: dave0 joined #forth 04:34:23 --- join: jsoft joined #forth 05:00:24 --- join: dddddd joined #forth 05:01:19 tabemann, after much work, my svd2forth now differentiates "read-only" registers in it's output 05:02:35 tabemann, as theyre "read-only" it adds a "-?" to the name and appends the "bit@" word before the ":" 05:03:18 for single bits: ": IWDG_SR_WVU-? ( -- x ) 2 bit IWDG_SR bit@ ; \ IWDG_SR_WVU, Watchdog counter window value update" 05:04:09 for multi bits: ": I2C2_RXDR_RXDATA-? ( %bbbbbbbb -- x ) I2C2_RXDR bit@ ; \ I2C2_RXDR_RXDATA, 8-bit receive data" 05:05:00 --- join: dys joined #forth 05:05:37 the latter being a bad example as it's a receive data byte, unless one is looking for a specific byte I gues 05:53:20 --- quit: iyzsong (Ping timeout: 256 seconds) 05:55:58 --- join: iyzsong joined #forth 06:22:12 --- join: reepca joined #forth 06:31:37 --- quit: iyzsong (Ping timeout: 256 seconds) 06:41:19 --- join: iyzsong joined #forth 06:42:11 --- quit: iyzsong (Client Quit) 06:50:55 * tabemann got waiting based on systick with multitasking working 06:51:05 nice 06:51:13 --- quit: _whitelogger (Remote host closed the connection) 06:51:20 Ive done some mods to sfv2forth 06:51:48 the chat I had with rdrop-exit yesterday really got me thinking 06:52:18 my new read only words 06:52:21 \ IWDG_SR (read-only) 06:52:22 : IWDG_SR_PVU? ( -- 1|0 ) 0 bit IWDG_SR bit@ ; \ IWDG_SR_PVU, Watchdog prescaler value update 06:52:44 and for a multibit choice 06:53:16 \ I2C2_PECR (read-only) 06:53:17 : I2C2_PECR_PEC? ( %bbbbbbbb -- 1|0 ) I2C2_PECR bit@ ; \ I2C2_PECR_PEC, Packet error checking register 06:53:39 yet for a R/W register 06:53:42 --- join: _whitelogger_ joined #forth 06:53:56 \ I2C2_TXDR (read-write) 06:53:57 : I2C2_TXDR_TXDATA ( %bbbbbbbb -- x ) I2C2_TXDR ; \ I2C2_TXDR_TXDATA, 8-bit transmit data 06:55:21 in the above case there are only 8 bits that start at bit position 0, so no shifting is needed 06:57:09 in this case bitfield "sclh" starts at bit 8 06:57:11 : I2C2_TIMINGR_SCLH ( %bbbbbbbb -- x ) 8 lshift I2C2_TIMINGR ; \ I2C2_TIMINGR_SCLH, SCL high period master mode 06:59:14 wouldn't there be two words for each RW register? 07:00:35 in the case of I2C2_TIMINGR_SCLH one use may be "$11111111 I2C2_TIMINGR_SCLH bis!" 07:00:44 to set all the bits 07:01:11 or "$11111111 I2C2_TIMINGR_SCLH BIC!" to clear all the bits 07:01:36 or even just "$11111111 I2C2_TIMINGR_SCLH !" 07:01:47 depends what the programmer wants 07:02:38 in the case of read-only words they are all input to bit@ as the bits can only be tested not written 07:03:10 gotcha 07:03:26 these are all template words of course, premade to provide the most useful syntax 07:04:16 itr had been bugging me for a while now that my existing code treated "read-only" like all the other registers 07:07:06 I eventually plan to make a parser that creates the low level config words based on the higher level code 07:08:01 by simply pulling out all the bitfield templates corresponding to bitfields named in the higher level part of the program 07:08:29 and putting them into a 'config.fs' file 07:09:51 that's be cool 07:09:54 *that'd 07:11:03 so say you added "$11111111 I2C2_TIMINGR_SCLH BIC!" to your main program and then click make 07:11:44 the 'config.fs' file would now contain ": I2C2_TIMINGR_SCLH ( %bbbbbbbb -- x ) 8 lshift I2C2_TIMINGR ; \ I2C2_TIMINGR_SCLH, SCL high period master mode" 07:12:59 but I need to study a compiler type application or perhaps practice using Retro to do it instead 07:13:25 tempted as I am to do it in shell 07:14:49 of course rdrop-exit would say "Id just write all the code" but I still believe he doesnt fully appreciate the extend of the work involved 07:19:18 for instance, ADC0 in a GD32Vf103 contains 07:19:21 1 peripherals 07:19:21 21 registers 07:19:21 88 bitfields 07:20:12 and to hand enter that stuff from the tech manual which has a lot of errors .... :( 07:22:12 yeeeah 07:22:55 how long would it have taken you to nut out the blinky code from the tech manual only ? 07:24:19 a programmer has enough to learn just finding out what 'open drain' or 'push pull' means 07:27:01 lol 07:27:03 a while 07:27:13 I have no clue as to what those mean 07:27:30 and thats probably the easiest task that can be done 07:27:45 well, I did figure out how to use systick just from ARM's documentation 07:27:49 it's the hardware world equivalent of "hello world" 07:27:53 but that was trivial 07:28:05 thats because systick is all software 07:28:24 any programmer would find systick easy enough 07:28:44 systick doesnt interact with the outside world 07:28:52 okay, well, I should go off to work 07:29:05 but systick is vital 07:29:08 okies, cya! 07:29:15 (yes, they're still making me come in unless I'm sick or the weather is inclement) 07:29:24 it's 1:30 am here 07:29:33 bastards! 07:29:42 it's 9:30 am here 07:29:47 see ya 07:30:14 as the infection stage is contagious and the patient doesnt know he/she is infected, seems pretty dumb to me 07:31:09 that's why you tell everyone to not come in 07:31:15 not just the sick people 07:31:20 exactly 07:31:30 ah well, good luck :) 07:32:14 k, off to work 07:32:22 bye 07:45:27 hmm, I wonder if anyone has made a forth bot like geordi for C 07:46:05 like if you type "geordi, int main() {return 2+3;}" it compiles it and runs it then answers back 5 07:46:09 sure 07:46:18 there was one here, may still be here 07:46:25 retrobot 07:47:02 CRC had it running here for ages 07:49:01 retro: #2 #15 * #12 + n:put 07:49:26 but the server it was on needed to be rebuilt 07:49:27 neato 07:49:44 that code would answer "42" 07:50:13 oh hmm, why the #? 07:50:16 retrobot was here until a couple of months ago 07:51:55 http://forth.works/book.html#retro-a-modern-pragmatic-forth 07:52:11 # means decimal 07:52:52 retro compiled in a flash and has been bugfree here on this FreeBSD machine, but I don't know retro well 07:53:22 retro is different to the gforth and the usual forths 07:53:41 in that it has different classes of Words 07:54:17 "n:" for instance is the 'number class' I think 07:58:47 did the bot keep your stack or was it new every time? 08:00:18 i think it was new every time 08:00:49 I think CRC made sure it was "Mobius safe" 08:01:06 lol 09:26:29 I'll have the retrobot back soon 10:16:28 --- quit: cartwright (Remote host closed the connection) 10:18:54 --- join: cartwright joined #forth 10:27:48 --- join: TwoNotes joined #forth 10:29:06 --- part: TwoNotes left #forth 10:41:31 --- quit: jsoft (Ping timeout: 256 seconds) 11:12:16 --- quit: ecraven (Quit: bye) 12:12:39 --- join: ecraven joined #forth 13:11:48 --- quit: dave0 (Quit: dave's not here) 14:01:44 --- join: WickedShell joined #forth 14:19:26 --- quit: xek (Ping timeout: 250 seconds) 14:59:25 --- quit: logand``` (Ping timeout: 246 seconds) 15:11:52 --- quit: gravicappa (Ping timeout: 250 seconds) 16:21:49 --- join: jsoft joined #forth 16:30:28 crc, excellent! 17:06:13 should I bother to write docs for zeptoforth? 17:06:21 it's still... dynamic 17:06:38 no, programmers should never write docs :) 17:06:45 lol :D 17:06:50 except CRC 17:07:28 tabemann, have a look at http://forth.works/book.html#retro-a-modern-pragmatic-forth as a guide to great doc for Forth 17:08:42 I use py.sphinx which is very easy and produces all the usual formats as output 17:09:05 but good doc is a art and I don't have it 17:09:10 Im a tech 17:10:46 Mecrisp-Stellaris comes with a few text files, better than nothing but fairly minimal, just hand formatted text which is pretty ordinary 17:22:32 my documentation is essentially vary bare comments - lol 17:22:49 a lot of my assembly doesn't even have stack comments 17:23:03 for shame! 17:23:05 ;-) 17:23:08 but it all goes by very consistent conventions 17:23:23 all programmers could say that tho 17:23:34 a programmer has to be consistent 17:23:44 like 0 6 0 lsl-imm, means take register r6, apply an lsl of #0 to it, and put the reseult in register r0 17:23:51 *result 17:24:00 or more like compile the code that does this 17:24:54 this is why programmers should never write doc "good code is self documenting" a comment by a really smart programmer jerk I once knew 17:25:53 "0 6 0 lsl-imm" ? 17:26:03 thats not assembly tho ? 17:26:16 is that your Forth to assembly generator ? 17:26:29 that compiles an lsls instruction 17:26:52 -imm means that the logical shift left is by an immediate amount 17:27:02 , means that it is compiling, not executing 17:27:43 matthias uses pretty much the same syntax as actual assembly, but of course couldnt resist changing it (or couldnt be bothered making it the same) so I cant feed it into gas without preprocessing 17:28:39 hmm, ok, all that was wrong 17:28:44 please disregard 17:28:54 ? 17:28:58 Mecrisp-Stellaris generates machine code 17:29:08 it doesnt generate assembly 17:29:19 there is no assembler contained in Mecrisp-Stellaris 17:29:48 there is a non core dissasembler Word 17:30:06 and it's this one that doesnt produce 100% compatible assembly 17:31:03 as an mcu has no idea what assembly source means 17:31:11 a mcu only understands machine code 17:31:51 zeptoforth also generates machine code and has no assembler, but it has a minimalistic mini-assembler in it so the compiler can compile instructions 17:32:34 with instructions being indicated by words like lsl-imm, cmp-imm, bx, blx, and so on 17:33:01 ah! 17:33:34 that is what I'd do if I ever tried to write my own forth, but doesnt it make the kernel much larger ? 17:34:06 in many cases I use these words where if I reall felt like being compact I could just hardcode instructions (which I do do in a few places where I didn't feel I needed the flexibility) 17:34:13 and it does make the kernel bigger 17:34:25 but far easier to use 17:34:29 probably why zeptoforth is bigger than mecrisp-stellaris 17:34:46 matthias thinks in assembler so he has a major advantage 17:35:57 I've gotten thumb-2 assembly down pretty well - whereas I know very few thumb-2 opcodes 17:37:40 yeah, it's a pain, Ive written tons of machine code by hand 17:38:09 and that was for the 8085 which is pretty horrible 17:38:24 (in comparison to the 6800 machine code) 17:39:29 tabemann, do you use a 'utility assembly to machine code generator" at all 17:40:01 ie something you can enter in a isolated assembly code and get the machine code to plug into zeptoforth ? 17:40:48 no I haven't 17:41:48 As of yesterday, 18th March 2020, the Australian and NSW Government has banned all non-essential indoor gatherings of 100 people or more. 17:42:02 lol, way too little way too late I think 17:42:28 I was doing the reverse to test Forth words on Mecrisp-Stellaris 17:43:07 Ive made up a word that pulls out the machine code on a word by word basis and dumps it as ihex into the terminal 17:43:52 here everything is shutting down or has shut down 17:44:30 i was then putting the de-ihexed data into a binary, addeing the preamble needed and running it in Cutter2 17:44:32 surprisingly my work is still open... but half the people didn't show 17:45:04 I had very poor luck with getting cutter2 to work 17:45:12 I went to the supermarket yesterday and was walking to a checkout when a old unwell guy came in coughing everywhere 17:45:35 no mask, no attempt to even block his cough 17:45:40 when I first ran my code on my DISCOVERY board it ran far better than it ever did on cutter2 17:45:54 in this town it takes a appointment then a week to even see a doctor 17:46:26 yeah, that's the advantage of using real hardware 17:46:53 I never use simulators except with machine code 17:47:23 there were glaring mistakes in the emulation of Thumb-2 with cutter2 17:47:28 I mean mistakes 17:47:36 not just minor incompatibilities 17:47:37 like 17:47:40 for instance 17:47:51 and GDB has made using a simulator fairly pointless if your mcu has jtag or swd 17:47:59 instruction vectors on Thumb-2 must point to odd addresses 17:48:03 *exception 17:48:07 youre saying that 'mistakes were made' ? 17:48:22 likewise, addresses fed into bx and blx must be at odd addresses 17:48:33 did you see my comment here regarding using radare2 from the cli ? 17:48:49 because the lower bit of Thumb-2 code addresses indicates that the code is Thumb 17:49:08 it's a world away from cutter as regards automating and configuration 17:49:14 and this is required on Cortex-M4, because Cortex-M4 only executes Thumb-2 code 17:49:21 yeah, thats well known I think 17:49:52 it's the same with thumb1 isnt it ? 17:49:57 yep 17:51:22 so basically I had to make changes to my code to get it to run at all under Cutter2 17:51:29 but that wasn't enough 17:51:45 because Thumb2 instructions weren't being properly decoded in places 17:51:54 for reasons that were beyond me 17:52:09 I just had to give up with Cutter2 17:52:10 I was running my extracted words on cutter no problem 17:52:22 but the address was always wrong 17:52:55 I was only interested in seeing that the word behaved as expected, ie jumping to loops etc 17:53:27 cutter is just a gui on top of radare2 which is a lot like gdb 17:55:30 be nice to have a word that allows single stepping thru a words machine code for debugging ON the target ... 17:57:52 you can do that with gdb 17:58:02 unfortunately gdb sucks at debugging forth code 17:58:16 but it's still very handy for debugging assembly code 18:00:37 I was only running a binary 18:01:20 can gdb run a binary without source on the target ? 18:01:35 I cant remember 18:01:45 gdb doesn't like it when there's not an .elf file 18:01:49 yeah 18:02:09 wheras ra2 (radare2) is fine with that 18:02:48 okay, I'm gonna go have dinner in a sec, so I'll bbl 18:02:55 I'm still undecided on my previous method tho 18:02:57 no problemo 18:43:17 --- quit: jsoft (Ping timeout: 250 seconds) 19:03:51 back 19:48:18 okay, updated my scheduler so that it uses systick 19:48:41 nice! 19:49:14 the scheduler is dependent on the multitasker though if one wants to be able to use the prompt simultaneously 19:49:23 I was confused for a while with mine, initially Id run task1 every 100ms, that was fine 19:50:58 then when I ran the 2nd task at 110 ms, it would slowly increase so all I had was a lovely slowly changing duty cycle with the same 100ms timing! 19:51:33 eventually I had to sync task2 to task1 to keep the same 10ms seperation 19:51:36 --- join: boru` joined #forth 19:51:40 --- quit: boru (Disconnected by services) 19:51:42 --- nick: boru` -> boru 19:52:35 I only need one variable per task tho, so it's very light 19:54:00 anyway, bbl 20:20:39 --- quit: tp (Remote host closed the connection) 20:20:55 --- join: tp joined #forth 20:26:45 wb 20:27:56 * tabemann had his forth code scattered in a bunch of files, so he made one meant for e4thcom to load everything (using the #include directive) and then set a cornerstone to enable deleting everything added afterwards 20:29:46 it was getting to be a pain to manually load each of the files separately 20:37:02 g'night 21:26:02 ouch! 21:30:45 --- join: jsoft joined #forth 21:30:47 --- join: iyzsong joined #forth 21:36:25 --- quit: _whitelogger_ (Remote host closed the connection) 21:39:28 --- join: _whitelogger joined #forth 22:01:28 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 22:01:47 --- join: iyzsong joined #forth 22:05:26 --- quit: Mellowlink (Remote host closed the connection) 22:06:07 --- join: Mellowlink joined #forth 22:59:14 --- join: dave0 joined #forth 23:06:34 --- join: gravicappa joined #forth 23:42:25 --- quit: _whitelogger (Remote host closed the connection) 23:45:28 --- join: _whitelogger joined #forth 23:59:59 --- log: ended forth/20.03.19