2025-05-29 00:00:13 tpbsd: Yeah? 2025-05-29 00:00:41 but China hasn't been feudal for a surprisingly long time. Qin Shi Huang really worked hard to destroy feudalism as a threat to his dynasty 2025-05-29 00:00:49 tvfm (t3xforth) from https://t3x.org it's very fun to use 2025-05-29 00:00:49 he didn't realize his son was an even bigger threat 2025-05-29 00:01:07 veltas, it transposes CMSIS-SVD register labels in the Forth source for absolute addresses on it's upload to the MCU, the source isnt changed 2025-05-29 00:01:50 veltas, It does this with only a SVD file for the mcu model 2025-05-29 00:02:25 this on multitasking makes POSIX and semaphores and such a bit of a hell https://www.bradrodriguez.com/papers/mtasking.html 2025-05-29 00:03:00 xentrac, which is why I dont use Chinese clones, they never have SVD files, but I embrace their development and think theyre a good thing 2025-05-29 00:03:23 dumb simple compared to C89 (or maybe C99) and advanced programming under Unix Environment 2025-05-29 00:04:20 anthk_, simple is always best imho 2025-05-29 00:04:43 tpbsd: what do the Chinese developers use instead? 2025-05-29 00:05:06 xentrac, nothing, they just have lots of doc 2025-05-29 00:05:32 I guess SVD is probably proprietary, tho it's just XML 2025-05-29 00:05:49 I thought the swd2rl.pl would be Perl, based on the extension 2025-05-29 00:06:13 I simply cannot develop anything without a SVD, as cortex-m peripherals are far too complex 2025-05-29 00:06:22 prolog? 2025-05-29 00:06:30 Python 2025-05-29 00:06:57 veltas, it is a Perl wrapper around a C program written by Jan Bramkamp named swd2 2025-05-29 00:07:11 oops 2025-05-29 00:07:17 ignore that 2025-05-29 00:07:40 anthk_: you might like einkornix 2025-05-29 00:10:53 veltas, it made a mistake, you found it! it's actually swd2rl.py a python program, it's now deleted and fixed 2025-05-29 00:11:08 Well no harm done because of the shebang 2025-05-29 00:11:36 yeah, just me being old and doing too many things at once 2025-05-29 00:12:42 it is a Python wrapper around a C program written by Jan Bramkamp named swd2 which adds readline command history and command completion 2025-05-29 00:13:04 it works perfectly under the neovim :terminal 2025-05-29 00:13:30 anthk_: http://canonical.org/~kragen/sw/dev3/einkornix.S "simple cooperative task switching operating system for ARM EABI" 2025-05-29 00:13:39 (apart from a possible flowcontrol issue but that only affects uploads) 2025-05-29 00:14:11 anthk_: example code in http://canonical.org/~kragen/sw/dev3/einkornix-test.c, interface in http://canonical.org/~kragen/sw/dev3/einkornix.h 2025-05-29 00:14:18 I guess I should have linked the interface first 2025-05-29 00:14:27 Only the cool kids use .S files 2025-05-29 00:14:42 it's a 34-instruction operating system 2025-05-29 00:16:00 Reminds me of Lua's coroutines 2025-05-29 00:16:19 yeah, exactly, except that it maintains the list of tasks for you 2025-05-29 00:16:43 It's basically how I would implement threads in Forth if I had to 2025-05-29 00:16:50 I also wrote a smaller version which is basically just 5 instructions, but it doesn't have APIs to create and exit processes: http://canonical.org/~kragen/sw/dev3/monokokko.S 2025-05-29 00:16:57 And similar to what I've seen on polyforth 2025-05-29 00:17:00 and it doesn't comply with the EABI so you can't use it from C 2025-05-29 00:18:28 in μονοκοκκο you have to create your circular linked list of tasks by hand, maybe at assembly time 2025-05-29 00:19:08 whereas einkornix lets you create and destroy them dynamically, though reclaiming the storage they used is up to you 2025-05-29 00:22:14 I often use linked lists in embedded code to rely on static pre-allocation of things that needs to be in a list 2025-05-29 00:22:20 veltas, this was the start of my Plang development https://mecrisp-stellaris-folkdoc.sourceforge.io/plang-v2-stm32f051.html#plang 2025-05-29 00:23:04 veltas: yes, exactly 2025-05-29 00:23:26 it's awesome to see the embedded skillset here :) this chan used to be mainly Forth on PC stuff 2025-05-29 00:23:50 I don't know if I have an embedded skillset just because I like writing ARM assembly 2025-05-29 00:24:01 forth it's a better form of assembly 2025-05-29 00:24:29 this breadboard here is looking at me with puppy dog eyes asking when I'm going to power it back up 2025-05-29 00:25:00 I feel like Forth is closer to a scripting layer for assembly than a replacement for it 2025-05-29 00:25:17 like, Tcl 2025-05-29 00:25:20 only, embedded 2025-05-29 00:26:56 the advantage of Forth is the ease of embedded development. the negatives are image size and it's slower than assembly when running 2025-05-29 00:27:33 unless you use ... tada https://mecrisp-across-folkdoc.sourceforge.io/index.html 2025-05-29 00:27:42 thats another of my doc sites 2025-05-29 00:27:56 Mecrisp-Across is what you get if Forth and C had a baby 2025-05-29 00:28:41 all the advantages of Forth interactive development, all the advantages of compact assembly on the target 2025-05-29 00:29:41 the downside is the speed difference between the development system (emulation) and the actual target standalone 2025-05-29 00:30:54 the dev system is currently 4x slower than the standalone target 2025-05-29 00:30:54 Mecrisp-Across is unique, there is nothing else like it in the world afaik 2025-05-29 03:06:02 tpbsd: well, it's certainly true that the proof of the pudding is in the eating 2025-05-29 03:06:35 yeah, and I think it coes down to fundamental principles here 2025-05-29 03:07:08 for instance we need to measure the power going into a capacitor or coming out ? 2025-05-29 03:07:43 but I don't agree that five and a half orders of magnitude is an insuperable range. delta-sigma converters can handle that kind of thing with panache 2025-05-29 03:08:17 but measuring power coming out using ADC's has a time delay and resolution issue 2025-05-29 03:08:25 panache ? 2025-05-29 03:08:29 ease 2025-05-29 03:08:40 I find them noisy and slow myself 2025-05-29 03:08:45 what the BQ27200, which is not a BMS, does is that it amplifies the voltage drop across an external current-sensing resistor, with an internal capacitor across it, using a delta-sigma converter 2025-05-29 03:09:13 which is a kind of ADC 2025-05-29 03:09:18 sure, thats a fairly typical method, nothing new to me there 2025-05-29 03:09:46 the external current sensing resistor is a problem in itself 2025-05-29 03:10:53 Ive found any small signal processes introdule all kinds of challenges 2025-05-29 03:10:53 they do, yes 2025-05-29 03:11:04 ie noise and instability 2025-05-29 03:11:21 offsets 2025-05-29 03:11:37 even stable offsets can be a problem, I mean 2025-05-29 03:11:39 hence my attraction to counting pulses where one pulse represents a discrete amount of energy 2025-05-29 03:11:45 yeah 2025-05-29 03:13:43 the only weak point in the design is the comparitor that controls 'topping up' the capacitor, but I think I can design that fairly well using proven noise reduction techniques etc 2025-05-29 03:14:04 and use a fact comparitor 2025-05-29 03:14:08 fast 2025-05-29 03:14:40 at least I can test it fairly well with noise and spike injection 2025-05-29 03:15:51 it's going to be a interesting project, but the first part is to build one 'power injector' where I can accurately measure tiny values of power, reliably and accurately 2025-05-29 03:16:11 if I cant do that, I cant build the rest of it and will give up 2025-05-29 03:16:58 so first stake is a calibrated 'nano power' metering psu 2025-05-29 03:17:11 step 2025-05-29 03:20:35 I wonder if you can borrow an SMU to calibrate against 2025-05-29 03:20:47 I mean those are off-the-shelf calibrated nano-power metering PSUs 2025-05-29 03:21:03 and you live in a developed country, so there's probably one in your state 2025-05-29 03:21:16 maybe you can visit a lab and use it 2025-05-29 03:22:22 I think that a static measurement of nA and volts will do well enough 2025-05-29 03:22:37 I can use my in house equipment for that 2025-05-29 03:23:15 you can probably measure a 10MΩ resistor to ±2% with a commonplace multimeter 2025-05-29 03:23:20 if accuracy is a issue, then Id search farther afield, but needing a lab to calibrate it would be a hassle 2025-05-29 03:23:25 that would be 500nA across a 5V supply 2025-05-29 03:23:48 I was thinking you might have a friend who has a friend who has a nice Keysight SMU you can use for an afternoon 2025-05-29 03:24:04 but then there's precision and there's precision 2025-05-29 03:24:41 yeah, well the principle is the important part at this point, will it work or not 2025-05-29 03:24:50 accuracy comes later 2025-05-29 03:25:12 this hardware store multimeter I have here can only measure down to a microamp, and probably has an error of 10μA or so, but it can measure volts to ±0.1% and probably ohms to 2% 2025-05-29 03:25:25 including up to 20MΩ 2025-05-29 03:25:36 some of them only go up to 2MΩ 2025-05-29 03:27:06 anyway you can trust thin-film and thick-film resistors to be damned linear all the way down to zero volts 2025-05-29 03:27:55 yeah 2025-05-29 03:28:29 so generating a few hundred precisely calibrated nanoamps should be pretty easy 2025-05-29 03:28:48 any idea how I can send a ^$ with pkill to a process ? 2025-05-29 03:28:59 a ^$? 2025-05-29 03:29:01 ha, in theory 2025-05-29 03:29:04 yeah 2025-05-29 03:29:18 caret pesos? 2025-05-29 03:29:40 I was talking to Andrew Zonenberg about this the other day and he said, why don't you try charging up a supercap and then measuring how much its voltage has been reduced after a while? 2025-05-29 03:29:57 I'm not sure how much I trust supercaps 2025-05-29 03:30:54 how is andrew ? we used to talk a lot, but havent after freenode went away 2025-05-29 03:31:12 yeah, but I think that's okay if the internal leakage current is low compared to the average power you're trying to measure 2025-05-29 03:31:18 hes one super capable dude, made some awesome gear 2025-05-29 03:31:24 true 2025-05-29 03:31:25 what i mean is I don't know if they have like soakage or hysteresis or things like that 2025-05-29 03:31:34 but it would be useless of nanoamps 2025-05-29 03:31:52 if the leakage current is picoamps then nanoamps would be easy 2025-05-29 03:32:07 if the leakage current is single-digit nanoamps then hundreds of nanoamps would be easy 2025-05-29 03:32:58 I think it's in the milliamps 2025-05-29 03:33:01 I had thought about trying to do this but with a C0G/NP0 capacitor. which would necessarily be much smaller 2025-05-29 03:33:29 I fel it's easier to measure the power going into rather than out of a cap 2025-05-29 03:33:45 milliamps would be millivolts per second, a self-discharge time constant in the minutes. I think supercaps have a self-discharge time constant measured in months or years 2025-05-29 03:34:12 especially as a comparitor is used to tell the psu 'supply power please' 2025-05-29 03:34:44 no, the ones Ive tested discharge in hours 2025-05-29 03:35:00 so microamps, which is still too much 2025-05-29 03:35:05 thanks for the tip! 2025-05-29 03:35:23 the very reason theyre a supercap is responsible for their high internal discharge 2025-05-29 03:35:37 how so? 2025-05-29 03:36:04 the very close 'plates' result in higher leakage 2025-05-29 03:36:43 the opposite of two air gapped plates 1 foot apart, very low internal resistance, very low capacitance 2025-05-29 03:37:26 that makes some sense. but in this case there isn't an actual dielectric 2025-05-29 03:37:39 Ill be using a high quality electrolytic in my design 2025-05-29 03:38:03 something with low internal resistance 2025-05-29 03:38:44 those don't have spectacularly low leakage either, do they? 2025-05-29 03:39:11 no, but as long as it's consistent, it can be calibrated out I guess 2025-05-29 03:39:53 tantalum would be best as they have very low leakage 2025-05-29 03:40:04 (when theyre not exploding) 2025-05-29 03:40:29 that's nice too though 2025-05-29 03:40:33 of course polyester is the lowest leakage, but theyre low capacitance 2025-05-29 03:41:19 I think the trick is to use reliable parts that have minimal drift and just compensate for all that stuff 2025-05-29 03:41:23 I think a high-voltage C0G operated at low voltage has lower leakage than polyester 2025-05-29 03:41:47 and has much less thermal dependency 2025-05-29 03:42:35 Im not a expert there, I never needed much accuracy in my work, reliability was always more important fo me 2025-05-29 03:45:33 I certainly am not either! 2025-05-29 03:46:38 accuracy is overated :) 2025-05-29 03:46:57 I spent years in instrumentation calibrating stuff 2025-05-29 03:47:31 using primary references 2025-05-29 03:48:14 heh, too much objectivity wore you down? 2025-05-29 03:51:10 it's very boring 2025-05-29 03:51:24 I loved industrial control, lots of challenges 2025-05-29 03:52:24 I wrote the software in 1985 for my first industrial controller in machine code with a hex keypad 2025-05-29 03:52:57 that was very tiresome, when I finally got an assembler it was like christmas time! 2025-05-29 03:54:17 yeah, I don't think I've ever hand-assembled anything except for CPU architectures I designed myself 2025-05-29 03:54:58 although I have copied opcodes into a program and calculated jump offsets 2025-05-29 03:55:25 then I figured out how to get gas to do that for me even for CPU architectures it didn't support natively and stopped doing that :) 2025-05-29 03:56:47 because I was really tired of debugging miscalculated jump offsets. I kept screwing it up! 2025-05-29 03:57:20 yeah jumps were the worst as they vary in offset depending on direction 2025-05-29 03:57:20 I was always screwing up there 2025-05-29 03:57:42 it was a dual 8085 bottle filling controller, 2000 bottles a day 2025-05-29 03:57:53 worked perfectly 2025-05-29 03:58:01 nice 2025-05-29 03:58:45 the only machine I ever had with a hex keypad was a Heathkit H-8 2025-05-29 03:58:56 then my next project was a position controller on a 68HC11 using a SWTP 6800 dev system with assembler on 8" floppy, that was a *dream* to use 2025-05-29 03:59:00 it actuallly wasn't really a hex keypad, even though it had 16 keys 2025-05-29 03:59:05 ahh 2025-05-29 03:59:18 it was an octal keypad, which you might have noticed is a lot more pleasant for 8080 code 2025-05-29 03:59:20 the device I used was a 8085 SDK 2025-05-29 03:59:46 I mean it was a decimal keypad but the monitor program in the ROM was an octal monitor 2025-05-29 03:59:51 it also had led 7 seg displays 2025-05-29 03:59:58 same same 2025-05-29 04:00:03 Ive never used octal 2025-05-29 04:00:05 except the H-8 was an 8080 2025-05-29 04:00:17 ahh, a bit older gen 2025-05-29 04:00:18 oh, well, the 8080 instruction set is a *lot* more comprehensible in octal 2025-05-29 04:00:24 ok 2025-05-29 04:00:45 ARM is better in hex because it has 16 registers 2025-05-29 04:00:57 hahah, that SDK8085 was interesting 2025-05-29 04:00:58 and most of the instruction fields are nibble-aligned 2025-05-29 04:01:35 what was great about the HC11 system? having an assembler? 2025-05-29 04:01:44 I just run Mecrisp-Stellaris on them and never mess with the cpu. Peripherals are my interest 2025-05-29 04:02:12 having an assembler for sure, but the 6800 ISA is a dream to work with 2025-05-29 04:02:25 the MSP430 is kind of similar 2025-05-29 04:02:35 bith are very different to ARM 2025-05-29 04:02:42 I've heard it's nice, but my only experience with the 6800 family was on the 6809, and I was doing BASIC rather than asm 2025-05-29 04:02:55 so I couldn't even tell it was 6809 2025-05-29 04:03:08 Ive never programmed for a 6809 tho I hear it was great 2025-05-29 04:03:24 they were too expensive for me and I didnt need the power 2025-05-29 04:03:46 a 6802 did all I needed 2025-05-29 04:04:01 or a 8085 tho I hate all Intel ISA 2025-05-29 04:05:38 haha, Intel chips aren't very nice 2025-05-29 04:05:46 the 80386 got a lot better though 2025-05-29 04:05:47 gahh! finally found my error! 2025-05-29 04:06:15 whats wrong with "pkill -QUIT ./swd2" ? 2025-05-29 04:06:32 2025-05-29 04:06:49 it's the "./" 2025-05-29 04:07:13 oh! 2025-05-29 04:07:43 I didn't understand the ^$ part 2025-05-29 04:07:58 once swd2 has been executed in it's subdir with "./swd2" to send it a signal from anywhere else only needs the process name ! 2025-05-29 04:08:25 Ill wear a dunce hat today! 2025-05-29 04:08:50 I don't think I've used pkill myself 2025-05-29 04:13:05 it's used to send a signal to swd2, telling it to upload a file to the Forth mcu 2025-05-29 04:13:12 right 2025-05-29 04:13:20 crest designed, evilly clever 2025-05-29 04:13:20 I figured it was something like that 2025-05-29 04:13:38 but you could just hit ^\ in the window where swd2 is running? 2025-05-29 04:13:39 xentrac, and the most awesome part of swd2 ? 2025-05-29 04:14:10 xentrac, you know how if you have a Forth mcu, perhaps it's blinking a led at 1000 khz ? 2025-05-29 04:14:31 sure 2025-05-29 04:14:42 but you decide to insert a print statement of the loop variable just to see it in action ? 2025-05-29 04:14:51 or to debug, whatever 2025-05-29 04:15:08 and suddenly it's 1 kHz? 2025-05-29 04:15:13 because it's waiting on the serial port 2025-05-29 04:15:17 and it totally kills the program because of the delays the print proces causes ? 2025-05-29 04:15:26 bingo! 2025-05-29 04:15:42 so what you really want is a nonblocking FIFO of log messages or something 2025-05-29 04:15:59 or ... 2025-05-29 04:16:18 to use the cortex-m DEBUG peripheral via SWD 2025-05-29 04:16:47 Crest added a 512 char buffer to the mcu and the pc term, and theyre in sync 2025-05-29 04:17:13 but now you need to handle flow control ;) 2025-05-29 04:17:22 xentrac, so I can send up to 512 chars to the terminal via a print and there *is no overhead* ! 2025-05-29 04:17:26 because eventually that buffer gets full 2025-05-29 04:17:43 crest took care of all that stuff 2025-05-29 04:18:34 the wierd part is that a full screen of text appears, but it was over in undr micro seconds, long before the terminal printed anything 2025-05-29 04:18:43 sure 2025-05-29 04:18:55 I mean that happens with oscilloscopes too, right? 2025-05-29 04:19:06 yeah I guess 2025-05-29 04:19:08 not so much the analog ones but the digital ones 2025-05-29 04:19:25 our human perception gets confused 2025-05-29 04:20:00 so with swdcom I can have all the prints I want and the program isnt slowed down waiting for a usart 2025-05-29 04:20:11 *debugging nirvana* 2025-05-29 04:20:27 but surely you can print stuff to that buffer faster than you can read it over JTAG? 2025-05-29 04:21:17 I guess but as long as it's under 255 chars thats ok 2025-05-29 04:21:49 and it's SWD which is way faster than jtag in my experience 2025-05-29 04:22:01 tho theyre kind of the same thing 2025-05-29 04:22:28 except SWD doesnt have all the stuff that jtag has (I think) 2025-05-29 04:23:09 Segger do the same with their expensive gear, tho they make a big fuss about it 2025-05-29 04:23:23 but we get it for free with Mecrisp-Stellaris and swdcom 2025-05-29 04:23:41 I guess I'm confused about the relationship between SWD and JTAG 2025-05-29 04:23:52 I thought SWD was like JTAG with less pins 2025-05-29 04:24:00 I think the eyes would pop out of the heads of C GDB users if they saw this in action 2025-05-29 04:25:15 I think the distinction is swd is meant for comms and reading/writing registers, memory but jtag was also meant for testing peripherals using special proprietary stuff 2025-05-29 04:26:42 with SWD being used for development but JTAG used in production testing devices in manufacturing ? 2025-05-29 04:34:01 xentrac, I also found that neovim does do USB flowcontrol ! it works perectly with swd2, the problem comes from the python wrapper 2025-05-29 05:12:25 I think you can use JTAG for a lot of things. usually it's pretty slow 2025-05-29 05:12:45 that's great news! The Python wrapper was what was failing to do the flow control? 2025-05-29 05:33:15 yes, I havent looked into why, but thats the issue for sure 2025-05-29 09:03:39 Anyone else remember the glory days before IT departments ruled over our productivity with an iron fist? 2025-05-29 09:11:05 yeah, but that was before IT existed, back in the 70's :) 2025-05-29 09:11:33 but we had imcompetent directors to make up for it 2025-05-29 09:14:40 At my company we basically had an IT dept that only had time to fix our machines, and configure networks, a number of years ago 2025-05-29 09:16:38 yeah thats how they usually start 2025-05-29 09:17:39 And then we got a lot of corporate security rules that seemed to make more sense for a normal office than a place where we literally make and program computers from scratch 2025-05-29 09:18:35 It's really driven by security standards and regulation, and it's not done much good preventing e.g. our major shops from all getting pwned recently 2025-05-29 09:18:54 But if people are looking for national productivity sinks, there's one 2025-05-29 09:19:50 major shops I mean Marks & Spencers etc, not our 'workshops' 2025-05-29 09:31:37 shame 2025-05-29 09:33:58 xentrac: Argentina mention https://thedailywtf.com/articles/format-identified 2025-05-29 09:34:12 I say as if Argentina is a small village or something 2025-05-29 12:32:48 veltas: I have a file with the CUIT of everybody in Argentina, as if Argentina were a small village or something 2025-05-29 12:33:04 they're a matter of public record; my wife uses the file for her accounting work 2025-05-29 12:44:49 Nice 2025-05-29 13:39:25 Building a simple graph database with a Forth-like interface to not have to google same thing over and over 2025-05-29 13:40:06 https://old.reddit.com/r/PKMS/comments/1kvt7ht/entityattributerelation_local_database_system/ 2025-05-29 13:41:33 today I tried to use emwm with Motif stuff and such, but I don't need them; cwm and some xterm it's more than enough for Forth 2025-05-29 13:43:57 I've said before I consider terminal harder than a GUI if you just want some text and basic interactivity 2025-05-29 13:44:04 Unless you literally want a REPL or something 2025-05-29 14:02:49 olle: heh! 2025-05-29 14:17:23 But I'm cheating a bit, making all word definitions in PHP :P 2025-05-29 15:22:34 xentrac: -> https://labynet.fr/xentrac.mp4 2025-05-29 16:58:11 this guy can't find his keyboard 2025-05-29 16:58:27 also, I think he's French, because he has cigarettes 2025-05-29 17:34:01 haha, I just spent all morning implementing s\" for my calculator forth and just realized it doesnt have a \ key 2025-05-29 18:00:35 haha 2025-05-29 19:49:17 command shift / 2025-05-29 19:50:00 \`òption shift / pardon 2025-05-29 19:51:06 yclept: art thou yclept yclept? 2025-05-29 19:53:22 seems that way, paraventure 2025-05-29 19:54:18 ACTION traverses the dictionary looking for an unsmudged yclept