2023-07-28 00:47:41 I suspect it may be a good bit of work to initialize either one of these little boards to the point where the USB serial connection is working. I might be better off starting with a USB/serial converter and going into one of the board's serial ports. 2023-07-28 00:47:52 Then work on USB / Bluetooth with a working Forth system. 2023-07-28 03:53:55 KipIngram: Have you read the USB controller's manual much (assuming it has a USB controller) 2023-07-28 03:54:47 I'll have a look after work if I remember 2023-07-28 03:55:10 At my company we've written USB stacks so we 'know' how much work it is, not something I've done personally but I'll ask around 2023-07-28 04:05:55 And I've personally written a few bootloaders in assembly :| 2023-07-28 04:06:32 And by bootloader I mean bare metal, not on a BIOS system 2023-07-28 05:18:25 Ah right there's no USB on the chip 2023-07-28 05:23:01 You probably just need to get the serial working, and maybe map some memory, which is quite achievable 2023-07-28 06:00:49 Manual suggests SRAM is available immediately 2023-07-28 06:03:19 GCR_PCLKDIS0 to enable UART0 clock 2023-07-28 06:05:37 I think I would try without DMA first and then get DMA working 2023-07-28 06:05:47 I think you need to choose which clock source the UART has as well as enabling it 2023-07-28 06:06:18 DMA is absolutely worth it for performance, but probably just more complicated to 'get working' 2023-07-28 09:01:25 I've only skimmed through that manual - it's extremely large and detailed. 2023-07-28 09:02:24 Yes, the parts I paid the closest attention to on that first perusal were the ones related to the power situation and the oscillator situation. 2023-07-28 09:02:54 There's a whole suite of clock sources to choose from. 2023-07-28 09:03:19 None of it looked anything other than "fairly straightforward." 2023-07-28 09:03:27 Just poke the registers to get the setup you want. 2023-07-28 09:04:02 There's a lot of detail there, but it looks fairly "clean." 2023-07-28 09:04:44 Also, I looked over the manuals for both the SAMD51 and the Maxim part, so at the moment I'd probably conflate the two if I try to talk too much detail from memory. 2023-07-28 09:06:09 SmithForth time! 2023-07-28 09:07:22 There are actually two processors in the Maxim part. The Cortex M4 and a RISC-V processor. 2023-07-28 09:07:46 They talk about how the RISC-V can offload critical timing stuff for the Bluetooth from the CM4. 2023-07-28 09:07:57 xelxebar: cool, i'll start by download src/docs today 🤠 2023-07-28 09:08:22 next4th: :D https://dacvs.neocities.org/SF/ 2023-07-28 09:08:35 thx, saved me search.. 2023-07-28 09:12:04 For the SAMD51 that "CircuitPython" seems to be open source, so hopefully I'll be able to study that to learn my way around "bring up." 2023-07-28 09:28:11 KipIngram: Ah right, I hadn't realised both processors were present, I thought it was an option or something, although that makes more sense with the memory maps 2023-07-28 09:28:46 I can't imagine why you'd need a separate processor for something like that but I'm sure they know what they're doing ;) 2023-07-28 09:29:04 I think it's possible they just wanted to play with RISC-V and didn't have a better excuse 2023-07-28 09:29:21 resume enhancing hardware 2023-07-28 09:30:23 I don't understand that one 2023-07-28 09:33:20 some folks buy or do things to enhance their resume, maybe so they can get a better job somewhere else 2023-07-28 09:39:36 Oh right it's not called a 'resume' here :) 2023-07-28 09:40:00 Confusing because it's spelt the same as a different word that is actually used here 2023-07-28 09:48:16 next4th: BTW, this is what I'm using to learn the opcodes: http://ref.x86asm.net/geek64.html. The Intel manuals are also indespensible: https://www.intel.com/content/dam/www/public/us/en/documents/manuals/ 2023-07-28 09:48:47 I suppose it was to allow real-time stuff to be offloaded from the main processor. 2023-07-28 09:49:07 Which would mean you'd have more OS options and so on on the CM4. 2023-07-28 09:49:24 But wanting to play - that's certainly possible too. 2023-07-28 09:50:20 thrig: We used to have a "main IT guy" at the office who was eternally imposing some new system or tool on us. It always felt like it wound up hampering my productivity. Then a year or two ago he just up and left and became the IT director for some company. 2023-07-28 09:50:30 And it turned out half hte stuff he'd done he hadn't trained anyone on. 2023-07-28 09:50:35 So things were a mess for a few weeks there. 2023-07-28 09:50:49 That's quite common in IT, sadly 2023-07-28 09:50:50 I absolutely think he was just strategically enhancing his resume. 2023-07-28 09:50:57 And I guess it paid off for him in the end. 2023-07-28 09:51:02 Yeah exactly that is common in IT 2023-07-28 09:51:13 It's something poorly understood by employers, so you get antics like that 2023-07-28 09:51:29 veltas: Yes, I we use resume in that other way too. 2023-07-28 09:52:05 He was the most unhelpful guy I've ever worked with. He had no interest in helping people with their own issues. 2023-07-28 09:52:20 I mean issues that involved the stuff he'd set up. 2023-07-28 09:53:48 Anyway, I'm going to at least try to go straight for thE USB serial on the SAMD51 - it just occurred to me that there were o ther possibilities. 2023-07-28 09:54:57 They intend that "drag and drop" facility to be your way of running your Python code - just write the program and drop it on the drive. But my main interest in it is as an easy way to flash the thing. 2023-07-28 11:34:51 KipIngram: Have You seen https://github.com/jsnyder/stm32loader ? 2023-07-28 11:40:18 No, looks interesting, though. 2023-07-28 11:40:54 I actually have two of the little ItsyBitsy boards. One isn't working properly - it won't do the drag and drop thing. 2023-07-28 11:41:11 I'm picking at installing more serious dev tools on my system to see if I can reflash it via JTAG. 2023-07-28 11:41:35 The other one works great - I upgraded it to the most current bootloader and CircuitPython yesterday. 2023-07-28 11:54:38 Looks like that just write a plain binary image file to some specified address in the flash? Nothing fancy? 2023-07-28 12:01:17 KipIngram: Exactly! 2023-07-28 12:02:12 I like simple. 2023-07-28 12:02:32 That UF2 format is simple enough, though - looks like generating those files would be fairly simple. 2023-07-28 12:02:58 I'm half tempted to write Python to generate my stuff - just output it in UF2. 2023-07-28 12:03:14 I guess I'll poke a little at "real" toolchains, though. 2023-07-28 12:03:51 The problem with those is that so often they're either "Windows only" or "Windows mostly" (i.e., they claim Linux support but haven't put much energy into it). 2023-07-28 12:04:05 And even if there is a Linux variant, it might be Ubuntu-specific or something like that. 2023-07-28 12:04:38 I don't know for sure, but the "feel" I have is that Ubuntu kind of dominates the Linux space. 2023-07-28 12:05:26 You can try to build stuff from source, but all too often it will wind up requiring an earlier version of some library than the one present on your system. 2023-07-28 12:05:55 I can stumble around the Linux space FAIRLY well, but there are plenty of subtle issues that I just don't know how to resolve. 2023-07-28 12:06:33 Like the toolchain for JTAGging that broken SAMD51 - I don't know if I'll get that to run or not. 2023-07-28 12:07:04 From time to time I consider biting the bullet and buying a cheap Windows 10 notebook, but... that's painful to even think about. 2023-07-28 12:08:53 they'll probably skip linux and go to an electron or cloud workflow 2023-07-28 12:09:01 Ugh. 2023-07-28 12:09:27 And in the beginning this was the "personal" computer revolution. 2023-07-28 12:09:35 We had mainframes, where we had to timeshare. 2023-07-28 12:10:07 Then we had the transition toward personal machines. And then the web and the cloud came along and they're trying to haul us all back into a shared space all over again. 2023-07-28 12:10:24 Embedded 'real time' devices are basically just timesharing systems 2023-07-28 12:10:44 You go to the Apple Store or the Android Store and look for something simple - like say just a note taking app our an outliner or something. 2023-07-28 12:10:48 Under the hood you need to share time between different protocols etc, some driven by a human, some not 2023-07-28 12:10:56 More often than not what you find involves keeping your content on "their server." 2023-07-28 12:11:07 You need an account, etc. 2023-07-28 12:11:08 Yeah this service stuff is bad for consumer 2023-07-28 12:11:23 I'm surprised people like Richard Stallman don't have an issue with that (or didn't previously) 2023-07-28 12:12:05 Your PC should be enough for anyone, never forget 2023-07-28 12:12:21 True open source computing is personal computing 2023-07-28 12:19:30 KipIngram: Seen http://www.winestockwebdesign.com/Essays/Eternal_Mainframe.html ? (IMHO) Android Device is the new Terminal, and HTML5 is the new ANSI Escape Sequence!! 2023-07-28 12:23:16 I felt like a hipster when I learned from an old engineer that UART stop bit exists to allow the Mainframe to process the very protocol. 2023-07-28 12:32:36 Interesting looking essay. 2023-07-28 12:32:44 And yes - it gets right at what I'm talking about. 2023-07-28 12:33:53 I also think part of the problem with working with these little micros using anything except the "favored" system (Windows) is the endless desire to package everything in one application. The "IDE." It does it all. But if you can't run that IDE, you can't do any of it. 2023-07-28 12:34:13 I think separate tools for separate parts of the process, that we put together ourselves, would be better. 2023-07-28 12:34:33 Assembly an assembly file doesn't need to be bundled with the code that flashes your micro. 2023-07-28 12:34:59 This is what operating systems are FOR: to let us take utilities and weave them together into a workflow. 2023-07-28 12:35:34 So I LIKE this drag and drop approach to flashing. It puts a cut across the flow. I don't need ANY software to flash the part. 2023-07-28 12:35:45 I just need to generate the file that I want to flash. 2023-07-28 12:36:22 Which in theory I could do in many many ways. 2023-07-28 12:36:37 An assembler/linker, or Python, or, for that matter, with hexedit. 2023-07-28 12:40:57 I want to JTAG program this broken SAMD51. Can I get a command line utility to do that? No, not that I've found yet. I need the manufacturers development toolchain. 2023-07-28 12:41:05 Ooops. Windows only. 2023-07-28 12:41:28 Fortunately there seems to be an alternative, which I'm looking into, but the point is that an entire SDK is way, way more than I need. 2023-07-28 12:41:35 I've GOT the bootloader image. 2023-07-28 12:41:42 I need ONLY a tool to shove it over JTAG. 2023-07-28 12:43:38 [ dfn ( Forth! Data Factor < > ) ( Data ( Factor < ) > ) ] ? IMHO Operating System is a bogus term. Object System: http://metamodular.com/closos.pdf ? 2023-07-28 12:45:56 I thought every Cortex, from M to A Class, has BOOTROM. 2023-07-28 12:46:41 Oh, that's cute. /buffer #guix 2023-07-28 12:47:05 Uh... That was totally intentional. Yeah. 2023-07-28 12:50:30 DKordic: They may - I didn't realize I was claiming otherwise. 2023-07-28 12:50:55 Anyway, I googled what to do for an ItsyBitsy that doesn't mount, and it directed me toward instructions for recovering via JTAG. 2023-07-28 12:51:13 May not be the issue - may just have had a hardware failure. 2023-07-28 12:51:15 xelxebar: Why do You deserve to be punished with anythnig GNU? I mean to say that anything GNU is at best a pale copy!! 2023-07-28 12:51:26 Maybe it got static zapped or something. 2023-07-28 12:52:14 I find it ironic that the GNU guys talk such a show about things being "free" but then turn right around and try to impose their own will on you. 2023-07-28 12:52:17 That's not "free." 2023-07-28 12:54:30 Yeah, I'm torn. Nix/Guix are really quite nice and Guix is much better designed, IMHO, but in general I prefer a philosophy more like suckless, plan9, and forth. 2023-07-28 12:59:26 I've read about plan9 and it seemed fine. Never tried it out, though. 2023-07-28 12:59:32 Of course, I'm 100% sold on Forth. 2023-07-28 13:00:15 Anyway, I ordered a JTAG programmer for that task - we'll see if I can make it fly. 2023-07-28 13:00:43 AFAIU BOOTROM is the most direct way to write Flash. 2023-07-28 13:01:34 You're just referring to a specific bootloader option, aren't you? 2023-07-28 13:01:55 That is, you don't mean "boot" "rom" as a phrase - it's the name of something? 2023-07-28 13:05:56 Sounds to me like you're just talking about a non-removeable, non-modifiable boot loader. 2023-07-28 13:06:29 That might use the state of some input pins to decide exactly what to do. 2023-07-28 13:07:02 Yes. BOOTROM is Mask ROM specified by MCU vendor, like ST. What is to You the most obvious way to write Flash? 2023-07-28 13:08:19 For example Atmel AVR is like a SPI Flash where SPI.CS is AVR.Reset. 2023-07-28 13:09:42 Well, JTAG is even a layer below that, because it doesn't require that the processing core do anything. You can get at everything through the JTAG chain, so I guess I think it's the most fundamental way of getting at the hardware. 2023-07-28 13:10:19 It seems like the most "universal" method. 2023-07-28 13:29:56 Yeah the manual implied JTAG was used for programming, debug etc 2023-07-28 13:30:04 Pretty normal state of affairs 2023-07-28 13:31:45 DKordic: I was saying that on here ages ago 2023-07-28 13:32:13 That web is a successor to VT100 2023-07-28 13:32:35 And ethernet is the new serial etc 2023-07-28 13:36:55 Well, groovy. I seem to be able to run Eclipse and select the 32655 as the target device and the debugger I ordered as the debug configuration. 2023-07-28 13:37:06 That's promising - it actually seems to run. 2023-07-28 13:37:10 veltas: Noted. Glad to hear that. Brings me some hope. 2023-07-28 13:45:00 36655 board came. Seems to work - it mounts right up wheN I plug it in. They refer to the mode it's ready to interact in as "DAPLink." 2023-07-28 14:29:01 Ok, I also seem to have pyocd running on my system. 2023-07-28 14:57:01 Oh, hmmm. 2023-07-28 14:58:46 A block diagram in this MAX32655 datasheet shows that the USB port is actually connected to a separate Cortex M4 chip - a MAX32625, and that connects to the 32655 via UART and SWD connections. So, I may not have to do anything to set up USB. I'm guessing the 32625 handles that along with its other bootloader duties. 2023-07-28 14:59:07 I bet I just have to set the UART up right and things will be ready to roll. 2023-07-28 14:59:49 Bluetooth will still no doubt take a ton of work, but a "first console connection" may not be too hard to come by. 2023-07-28 16:37:52 Looks like there are four UARTs in the 32655. 2023-07-28 16:38:50 It'll be interesting to see whether or not i can just set the right one up and start sending data - nothing else in the test - and see if that shows up on the console when I connect up to the thing. 2023-07-28 18:26:59 KipIngram: good luck 2023-07-28 19:53:35 So, who knows about udev? 2023-07-28 19:53:52 How to work with rules. 2023-07-28 19:55:38 When I try to run pyocd against this little board with verbos output it's reporting permission errors - says it can "likely be fixed with a udev rule." 2023-07-28 19:55:44 Not entirely helpful... 2023-07-28 19:57:31 The github for pyocd has a list of udev rules, and the one that looks right for my setup has vencor and product ids that match what I see in dmesg when I mount the board. 2023-07-28 19:57:35 So that's promising. 2023-07-28 19:57:55 But when I followed the commands I found online for adding a udev rule and "refreshing" them, it didn't change anything. 2023-07-28 19:58:00 Still got permission problems. 2023-07-28 19:58:06 This is the pertinent udev rule: 2023-07-28 19:58:22 # 0d28:0204 DAPLink 2023-07-28 19:58:24 SUBSYSTEM=="usb", ATTR{idVendor}=="0d28", ATTR{idProduct}=="0204", MODE:="666" 2023-07-28 19:58:45 Which I assume is telling the system to mount that vencor/product item as permissions 666 for everyone. 2023-07-28 19:58:59 There's the problem though - it's SATANIC. ;-) 2023-07-28 19:59:30 sudo udevadm --refresh ; sudo udevadm trigger 2023-07-28 19:59:38 ^ what I found for updating my udev situation. 2023-07-28 20:04:06 If I run udevadm monitor and insert the gadget, I get all of this: 2023-07-28 20:04:11 https://pastebin.com/xVLmfSPf 2023-07-28 20:04:24 I can't see that that's telling me anything about permissions, though. 2023-07-28 20:06:04 But the new devices that are usb-related are showing permissions 700. 2023-07-28 20:06:12 So I don't think my rule is doing anything. 2023-07-28 21:15:02 Ok, looks like the 32625 is connected to the UART0 pins of the 32655. 2023-07-28 21:15:44 There is no response on that serial connection when I bring the thing up. The SAMD51 has Python responding there, but apparently there's no default function for the port on the 32655. 2023-07-28 21:15:55 Out of the box, I mean. 2023-07-28 21:17:59 But just setting up a UART - that doesn't seem to hard, looking over the docs. It's actually a pretty good document. Nice detail level. Goes beyond just describing pin/bit functionality and actually walks through procedures for doing various things. 2023-07-28 21:18:14 Like how to get an oscillator turned on, etc. 2023-07-28 21:19:39 Geez, I've been opening tabs like mad the last couple of days - I need to do a big purge. 2023-07-28 21:59:50 Aha. 2023-07-28 22:00:17 It looks like it's "udevadm control --reload-rules" rather than just "reload." 2023-07-28 22:00:21 Picky picky... 2023-07-28 22:01:16 --pretty-please 2023-07-28 23:04:44 Well, that development system for the Maxim chip builds the hello world program and creates an elf file. 2023-07-28 23:05:00 The drag and drop programming capability will work with elfs. 2023-07-28 23:05:20 So now I just need to get up the nerve to drop it on there and see what happens. 2023-07-28 23:05:41 When I inspected it I had the impression it printed "hello world" like a hundred times or something. 2023-07-28 23:05:48 So that might just come spewing across the serial port. 2023-07-28 23:15:10 Oh ho ho - jackpot. 2023-07-28 23:15:13 https://www.keil.arm.com/boards/maxim-max32655-evkit-rev-a-16d1145/projects/?page=1 2023-07-28 23:15:26 There's a slew of example applications there. 2023-07-28 23:15:47 Not for the SDK I've got, but no doubt they'll still be educational. 2023-07-28 23:34:16 next4th: Looks like Virgil fixed bios13! 2023-07-28 23:44:22 okay, though i failed to find what wrong with int13h (it can read more than 32 sectors...) 2023-07-28 23:48:22 next thing i want is a file manager / editor in duskos... well i'd first review those kde patches for guix lol