00:00:00 --- log: started forth/20.05.10 00:39:04 --- quit: iyzsong (Ping timeout: 260 seconds) 00:41:16 --- join: iyzsong joined #forth 00:49:44 --- quit: dys (Ping timeout: 246 seconds) 01:15:35 --- join: dddddd joined #forth 01:26:31 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 01:28:55 --- join: iyzsong joined #forth 01:49:49 --- join: rdrop-exit joined #forth 02:50:26 --- quit: rdrop-exit (Ping timeout: 256 seconds) 04:01:50 --- quit: cantstanya (Remote host closed the connection) 04:04:14 --- join: cantstanya joined #forth 04:55:05 --- quit: iyzsong (Read error: Connection reset by peer) 04:56:10 --- join: iyzsong joined #forth 06:12:04 --- join: TCZ joined #forth 06:13:11 --- quit: dddddd (Ping timeout: 264 seconds) 06:28:04 --- quit: iyzsong (Read error: Connection reset by peer) 06:30:44 --- quit: TCZ (Quit: Leaving) 06:55:12 --- quit: dave0 (Quit: dave's not here) 07:20:09 --- join: john_cephalopoda joined #forth 07:20:18 Hey 07:21:48 hey john 07:26:00 tabemann: do you have a machine readable spec somewhere? 08:41:10 --- quit: Zarutian_HTC| (Ping timeout: 272 seconds) 08:41:13 --- join: X-Scale joined #forth 09:04:56 --- join: dddddd joined #forth 09:15:42 --- join: Zarutian_HTC joined #forth 09:56:10 svd2forth mixes gsed and sed 10:01:26 tp: is svd2forth-v3-stm32_2019-06-29_123825_f1d08eb60b the latest release? 10:01:48 does your latest bluepill image use an unreleased version of svd2forth? 10:11:27 and where is "b32loop." defined? 11:32:48 --- join: jsoft joined #forth 11:57:10 --- quit: jsoft (Ping timeout: 258 seconds) 12:14:38 --- join: xek joined #forth 12:40:57 --- quit: karswell (Ping timeout: 246 seconds) 12:45:06 --- quit: john_cephalopoda (Quit: Leaving) 13:49:29 --- quit: gravicappa (Ping timeout: 260 seconds) 13:59:56 --- join: TCZ joined #forth 14:04:16 --- quit: xek (Ping timeout: 256 seconds) 14:26:52 --- join: jsoft joined #forth 15:42:18 --- quit: Zarutian_HTC (Quit: Bye) 15:42:34 --- join: Zarutian_HTC joined #forth 15:42:36 --- join: dave0 joined #forth 16:08:42 --- quit: tp (Remote host closed the connection) 16:23:08 --- quit: TCZ (Quit: Leaving) 16:37:47 --- quit: jsoft (Ping timeout: 264 seconds) 17:01:04 --- join: tp joined #forth 17:01:06 --- quit: tp (Changing host) 17:01:06 --- join: tp joined #forth 17:02:18 crest, probably not, probably,1b.fs 17:02:35 tp: nope 17:03:52 crest, http://dpaste.com/20VWTQZ <--1b.fs 17:03:52 the code in 1b.fs just attempts to call b32loop. 17:04:43 crest, I think you have a very old one 17:05:01 i used svd2forth-v3-stm32_2019-06-29_123825_f1d08eb60b 17:05:01 that was a bug quite a while ago 17:05:16 then thats the one with the bug 17:05:30 which one should i use? 17:05:38 use the one in http://dpaste.com/20VWTQZ 17:06:00 thats the latest 17:06:13 so there is no newer svd2forth release without the bug? 17:07:14 or did i pick the wrong release? 17:07:32 no, Ive been doing so much work on svd2forth it hasnt been stable enough to release for a while 17:08:04 all you need is http://dpaste.com/20VWTQZ to make what you have work 17:08:48 ok 17:11:51 that little bug haunted me for ages 17:12:01 the bug that wouldnt go away! 18:06:10 --- quit: Zarutian_HTC (Ping timeout: 256 seconds) 18:10:40 --- join: boru` joined #forth 18:10:43 --- quit: boru (Disconnected by services) 18:10:46 --- nick: boru` -> boru 18:12:51 --- join: jsoft joined #forth 18:22:40 --- quit: dddddd (Ping timeout: 256 seconds) 18:39:33 --- join: Zarutian_HTC joined #forth 18:52:13 --- join: rdrop-exit joined #forth 18:53:06 hello Forthwrights c[] 18:53:35 damn it is there something special about GPIO port b pins 3 and 4 on a stm32f103 18:56:14 g'day rdrop-exit s[] 18:56:55 hi tp c[] 18:57:39 nice cup 18:58:04 crest, not that I'm aware off, you need to check the alternate function mode for those pins 18:58:30 but wouldn't that be part of CRL/CRH? 18:58:30 rdrop-exit, it's a ghostly cup 19:01:31 $33333333 dup GPIOB 2! 19:01:46 -1 GPIOB ODR+ ! 19:02:05 turns on 5 out of 7 leds 19:03:56 no thats controlled by the AFIO 19:06:12 is there a better search strategy than just full text search for AFIO? 19:09:19 looks like i found some of the jtag pins 19:09:21 https://easyeda.com/r3bers/STM32F103C8T6-Test-Board 19:09:31 JTDO JTRST 19:13:48 --- quit: dave0 (Quit: dave's not here) 19:22:46 who needs a jtag debugger 19:24:14 everyone using jtag to debug ? 19:31:44 tethering can be via jtag 19:33:57 true, the tethered forth https://mecrisp-across-folkdoc.sourceforge.io/ uses JTAG tethering 19:34:41 the host is a stm32F4 running mecrisp-stellaris which cross compiles for the MSP430 19:36:18 nothing beats jtag for total interactive control 19:38:31 Forth is the debugger (and so much more) 19:40:20 tp: i can keep 2 wire debugging connector working 19:41:15 crest, by default SWD is always ready 19:41:52 yes but pins PB3 and PB4 are also configured for use by jtag as well 19:42:07 crest, even if one (ahem) reprograms the default SWD pins it's still available directly during reset 19:42:54 crest, yes, both jtag and swd are available 19:42:54 good to know that it's not too easy to brick your chips 19:43:17 crest, it's *impossible* to brick a stm32 19:43:41 of course one may die while flashing etc 19:44:02 is there no write disable fuse? 19:44:03 Ive had a couple of dead stm32's while flashing 19:44:28 or is there just read protection 19:44:43 I dont actually know, Ive not used either so far 19:44:54 it's well documented in the tech manual 19:46:56 tp: https://pastebin.com/raw/xTaD31vy 19:48:07 example use for CR! : MODE-OUT-50MHz OUT-PP or 3 GPIOB CR! 19:48:57 to configure GPIO port B pin 3 as 50MHz push-pull output 19:49:34 even worse: 19:49:34 : GPIO>APB2ENR ( GPIOx -- mask ) GPIOA - 1024 / 2 + 1 swap lshift 1-foldable inline ; 19:49:34 : GPIO-enable ( GPIOx -- ) GPIO>APB2ENR RCC_APB2ENR bis! ; 19:49:57 heh 19:50:05 abusing the fact that gpio ports are 1024 bytes appart in the memory map 19:50:11 youre retreading a well worn path 19:50:31 premature optimization 19:50:34 the last programmer before you that I know off was jeelabs 19:51:22 the question is if its worth it to be this "clever" 19:51:41 he spent about a year building up a site and doing his best to make Forth like C, in the end he gave it all up and left his many readers with a dead site 19:51:55 i don't want to turn forth into c 19:52:29 apparently he needed some major internal changes within Mecrisp-Stellaris to reach his goal and Matthias refused 19:52:49 is that discussion publicly archived somewhere? 19:52:53 you have more chance of moving heaven and hell than changing Matthias mind 19:52:58 no 19:53:22 maybe i can get him drunk at a ccc event 19:53:30 goof luck :) 19:53:39 hes already drunk on life I think 19:53:56 you can ask him all about it next time you see him 19:54:09 but sofar i see no reason to change something fundamental about mecrisp stellaris 19:54:34 once jeelabs announced easy programming and libraries, his site became very popular 19:54:53 even if local variables would have made the code more readable 19:55:06 but local variables would make the compiler's life harder 19:55:49 personaly, and I this is only my own opinion, I think jeelabs seeing the massive monetisation of arduino on stm32f103, decided to see if he could make the same kind of system with forth instead 19:56:13 was it a license discussion? 19:56:28 I've told you all I know 19:56:33 I was never privy to more 19:57:06 but Forth can be like a wolverine if you try and change it's nature 19:57:28 i wanted a word to configure a gpio pin 19:57:46 that worked for all gpio ports, pins, and modes 19:57:55 I wanted, a million bucks, true love and happiness, oh and a donkey 19:58:28 you shouldn't act on your passion for your donkey :-P 19:58:29 i never even got the donkey 19:58:32 haha 19:58:41 in the end I found out I was the donkey 19:59:32 and it took me about an hour to fight mecrisp into submission 19:59:47 now cr! works 19:59:53 what a lot of programmers dont realise about embedded is that the gpios are just a few bitfields among about 4000 in the case of the STM32F103 20:00:06 and gpios arent special 20:00:14 theyre just bitfields 20:00:22 but you have port a-g 20:00:37 yes, and about 4000 other bitfields 20:01:05 the ports send data too and from peripherals 20:01:11 and there are 20:01:15 if you define a word for every bitfield 128kB flash aren't much 20:01:38 53 peripherals in the mcu 20:01:53 its hard to resist refactoring that 20:01:56 lol, youd need well over a MB 20:02:02 I wonder why the jeelabs guy didn't just write his own Forth instead 20:02:30 absolutely hard to resist refactoring for legendary Forth programmers 20:02:31 rdrop-exit: its hard to write a forth like mecrisp st with an optimizing compiler 20:02:43 it's 20:02:54 crest, ask tabemann hes done most of it 20:03:07 hey guys 20:03:30 crest, his Forth is available right now, all you have to do is bend over before the God of Git 20:04:03 het tabemann, legendary programmer and creator of Zeptoforth 20:04:11 the optimizing compiler could have come later, especially if his target market was Arduino users 20:04:18 the main difference between mecrisp-stellaris and my forth his matthias's does all kinds of magical optimization whereas zeptoforth, well, it inlines and doesn't do much else 20:04:32 hi tabemann 20:04:47 tabemann, matthias took a few years to produce the RA variant 20:04:48 it would probably be easier to get arduino users hooked on micropython on an even bigger core 20:04:59 crest, absolutely 20:05:06 just throw more hardware at the problem 20:05:13 maybe even a dual core arm 20:05:26 vroom vroom 20:05:26 and put low latency helper code in c or asm on one core 20:05:27 that's called a raspberry pi 20:05:44 tabemann, and I think matthias was inspired after attending one of the chaos conferences and had a big session on optimisation 20:05:56 tabemann: take a look at the nanopi neo(2) 20:05:58 and 900 MHz! 20:06:22 crest, but forget that for chip/noard Forth 20:06:32 crest, but forget that for chip/board for Forth 20:07:03 a quad 1.5ghz cortex a53 20:07:09 the Nanopi at 600 Mhz is of course incredibly fast 20:07:28 * tabemann owns a raspberry pi - he hasn't taken it out of the packaging 20:07:31 hmm I may have got the board name wrong 20:07:38 https://www.friendlyarm.com/index.php?route=product/product&product_id=180 20:07:49 nanopi neo2 20:08:19 a pi could be interesting as a host rather than a target 20:08:29 I heard someone complaining that the rpi takes way too much power and generates way too much heat these days 20:09:02 tabemann: they are inefficient compared to other arm boards 20:09:30 the rpi 4b+ really bends over backward to maintain compatibilty to older pis 20:10:00 and they added a cheap but power hungry usb 3.0 chip 20:10:50 I'm sticking with Cortex-M4 boards 20:11:29 * tabemann just realized he chose instructions in such a manner as to completely break compatibility with Cortex-M0 without doing a major refactoring of his code 20:12:07 like my code is littered with instances of TST rX, #Y - which turns out to be a Thumb-2 instruction 20:12:14 tp: how do you deal with all the bitfields? 20:12:27 do you just autogenerate them all and copy and paste them as needed? 20:13:08 Teensy Arduino does 600 Mhz even 1000MHz just dont forget that heat sink 20:13:25 crest autogenerate them all and copy and paste them as needed 20:14:25 there are even amd ryzen quad core boards with an atmega added to the mini itx mainboard to appease the arduino crowed 20:14:27 tabemann, I wouldnt worry about it, the mo is a totally different mcu anyway 20:14:31 *crowd 20:15:41 crest, my editor searches all open files to copy and paste lines, and my project manager opens the bitfields file after it generates it 20:16:09 the arduino people... I don't even know what to say about them 20:16:14 crest, so for me, 10's of thousands of bitfields can be instantly pasted into my code 20:16:29 tabemann, yeah, I'm the same re arduino 20:18:16 crest, this is a possible tile for a future rant "Why do programmers feel the need to turn "GPIOC_BSRR_BR15" into "15 port-c gpio-unset-pin" ? 20:19:11 because they want to expose the problem's structure 20:19:41 and just duplicating the code is boring 20:22:34 it's a good question 20:22:45 and of course only programmers know the answer 20:23:06 that's what came to mind 20:23:12 mhh, my rant biorythms are peaking this month 20:23:37 most good programmers take pride in their work 20:23:50 I think I'll do 'The five stages of embedded C programmer grief" 20:24:00 crest, absolutely 20:24:18 and duplicating code just feels like delivering shoddy work 20:24:20 --- quit: jsoft (Ping timeout: 246 seconds) 20:24:25 crest, and what comes before a 'fall' ? ;-) 20:24:49 .oO( hubris comes before the fall ) 20:25:01 crest, could it also be the NIH problem ? 20:25:10 touche' 20:25:46 but programmers are often hurt by bad apis 20:25:48 i think that Forth will save all programmers in the end as long as they stay the course 20:25:59 and want to create the "perfect" api 20:26:05 crest, I have no trouble believing that 20:26:23 stuff like what happend to me this night 20:26:36 why don't won't these two pins obey me 20:27:05 I think thats a excellent point 20:27:10 the datasheet doesn't reference afio configuration 20:27:29 a short warning would have saved me a lot of time 20:27:29 they do 20:27:47 but there are a 'few' datasheets one needs 20:27:54 about 5 as a minimum 20:28:02 it says alternate function i/o in the cnf and mode bitfiels 20:28:15 the alternate functions are always described in the 'electrical' datacheet 20:28:38 crest, it does, but thats only a part of it 20:28:45 it is reasonable to assume that if you pick gpio instead of alternate function i/o you get access to the pin 20:29:04 good documentation is linked in *both* directions 20:29:10 whatever the tech sheet says is what you will get 20:29:21 never assume with this stuff 20:29:36 i don't 20:29:54 instead i assumed that either something is special about those pins 20:29:57 also, Im no F103 expert as I dont use it except in 2 projects 20:30:05 or damaged two pins 20:30:43 and you were right, swd or jtag or oscillator, or reset or a few others 20:31:02 those MCUs are virtually indestructable 20:31:20 they are the opposite of 'fragile' 20:31:49 I've subjected them to all kinds of horrors 20:32:13 and so far have failed to kill one other than during a boring flash operation 20:32:27 let me get my 240V mains power, a bridge rectifier and 400V capacitors 20:32:42 virtually indestructable 20:33:36 that kinda stuff blows up the worlds most highly developed switching semis every day 20:34:24 know what happens if you connect a led forectly to a gpio pin and 0v with no resistor on a PSU with lots of grunt ? 20:34:36 the MCU gets very hot 20:34:46 90C 20:34:49 the magic smoke escapes? 20:34:52 no 20:35:00 the mcu survives 20:35:22 they are incredibly robust 20:35:38 crest, and you bring up a excellent point re embedded 20:35:54 i do? 20:36:11 I think the BEST thing a programmer can do when getting into embedded is hook up the hardware asap AND BUILD A BLINKY 20:36:58 ultimately one can have all the theories in the world, but when that blinky wont work, reality must be confronted 20:37:20 and the blinking of the light shall lead ye to the truth! 20:37:53 the next step is let the leds turn into nice blinken lights 20:38:14 maybe fade a bit from left to right and back again 20:38:17 now it's true in the embedded world that a blinky is the equivalent of 'hello world' in a programmers world 20:38:35 without wasting a significant amount of of the cpu cycles on it 20:38:49 and when you guys think how easy 'hello world' is, you may wonder so whats the equivalent of a FFT ? 20:39:11 ? 20:39:17 crest, thats a MASSIVE jump from a on off blinky 20:39:23 fading 20:40:16 will you do it in software, systick or interrupt and timer 20:40:22 i don't want (software) pwm 20:40:29 good 20:40:39 thats childs play for a programemr 20:40:39 just shift a bitfield in odr once per second 20:40:51 with systick and multitasking 20:40:59 eww 20:41:02 why? 20:41:07 thats perverted 20:41:27 enbedded uses timers for that, which is why the F103 has 7 of them 20:41:41 hardwae timers 20:42:05 maybe because of my unix background i think of timers as something you do in software 20:42:19 by multiplexing one of the few hardware timers you have 20:42:19 sure 20:42:28 but we dont do that in embedded 20:42:33 build a nice datastructure for oneshot and interval timers 20:42:46 why have a dog, and do the barking yourself ? 20:42:57 configure the timer to wake you up when there something to do 20:43:04 woof 20:43:15 the chip has *7* hardware timers, just for you 20:43:24 because there are *just* 7 timers 20:43:49 only on your old chip 20:44:02 time hasnt stood still since 2004 20:44:39 a single timer is enough to animate the leds on a single port 20:45:13 for pulse width control two timers may need to be synced depending 20:45:15 just avoid data dependend control flows in the timer interrupt handler 20:45:34 to rule out jitter 20:45:52 or at least that source of jitter 20:47:38 this design uses a hardware timer to accurately control the windows counting of a temperature sensor https://mecrisp-stellaris-folkdoc.sourceforge.io/project.3temp.sensors.html 20:49:06 back 20:56:06 back 21:05:22 lunch is on the table, catch you later, stay healthy Forthwrights 21:05:26 --- quit: rdrop-exit (Quit: Lost terminal) 21:11:26 hey tp 21:11:57 I got the disassembler down to 20K! 21:12:10 mind you I omitted a lot of instructions 21:12:40 nice 21:13:48 tabemann, same size as the Mecrisp-Stellaris one 21:14:04 which is for a M3 21:14:34 I left out practically all the instructions I knew I wasn't using 21:14:36 tabemann, I'll grab it and have a look later today :) 21:18:42 mind you it still doesn't work yet :P 21:18:51 what ? 21:18:52 hahah 21:19:12 bbl, lunch 22:22:30 --- join: gravicappa joined #forth 23:36:41 --- join: mtsd joined #forth 23:44:53 --- join: dddddd joined #forth 23:59:59 --- log: ended forth/20.05.10