|
Forum Index : Microcontroller and PC projects : WeAct 16 MB PSRAM, 16MB Flash Wifi
| Page 1 of 2 |
|||||
| Author | Message | ||||
| Gerad Regular Member Joined: 10/01/2024 Location: GermanyPosts: 92 |
Does WeAct work with WebMite 7.XX.XX and 16 MB of PSRAM? YES. |
||||
| terekgabor Senior Member Joined: 02/01/2026 Location: HungaryPosts: 153 |
Hello! Which WeAct do you mean? G@bor |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12033 |
A 16 MB part would not work as the code stands. The size is detected and the reserve placed correctly, but the heap's page map is fixed at 6 MB, and the allocator would write past it on the very first allocation. Detection and the reserve scale with the chip. The ID decode in psram.c only knows 2, 4 and 8 MB (AP Memory) and 1, 2, 4 MB (ISSI), but it is followed by a wrap probe that doubles from 1 MB up to the 16 MB QMI window and takes what it measures, so a 16 MB part comes out as 16 MB. PSRAM_RESERVE (2 MB, 2.5 MB on the PC3) is taken off the top of that measured size, in PicoMite.c for the heap and in psram.c for the slot init, and everything inside the reserve sits at fixed offsets: the 384 KB context area, the RAM slots, the stream in the remainder. None of it grows. Only the heap would, to 14 MB. The page map does not scale. Memory.h:76 fixes PSRAMHEAPMAX at 6 MB, so psmap is 1536 words. SBitsSet indexes it by offset divided by 256 and 16 with no bound, and every allocator scans downward from the top of the heap, so on a 16 MB part the first allocation sets bits at word 3583 of a 1536-word array, 8 KB into whatever BSS follows. I will modify the code in the next release so that it is treated as an 8Mb part so that it won't cause memory corruption Edited 2026-10-16 21:48 by matherp |
||||
| Gerad Regular Member Joined: 10/01/2024 Location: GermanyPosts: 92 |
@Peter The Raspberry Pi Pico SDK, starting with version 2.3.0/2.3.1, supports the RP2350B and external PSRAM of up to 16 MB. Just one question: Do you plan to make the memory fully available for “Webmite”? Regards |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12033 |
Probably not, needs quite a big change and these chips are super expensive for no obvious benefit for most users. |
||||
| Gerad Regular Member Joined: 10/01/2024 Location: GermanyPosts: 92 |
@Peter I THINK YOU CAN NEVER HAVE ENOUGH “RAM.” And paying 5€ more for 16MB isn't “super expensive”—it's okay. What do you think of the 16MB fix? The fix was created by “Claude” PicoMite / WebMite 7.00.00RC2 - fixes for the RP2350 PSRAM builds ================================================================= Files 7.00.00RC2-Retime.patch PSRAM timing after a run-time clock change (CPU SPEED, RESOLUTION) 7.00.00RC2-Heap.patch ERASE etc. never freed a block on a heap's first page 7.00.00RC2-16MB.patch optional: 16 MB PSRAM for WEBRP2350 and HDMIWEB CLOCKTEST.bas test for the retime fix (CPU SPEED through 126..320 MHz) HEAPLEAK.bas test for the heap fix (WebMite, 304 KB SRAM heap) 7.00.00RC2-Fixes.zip WEB-7.00.00RX-16MB DEMO.zip Regards Gerad |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12033 |
The change is trivial and wastes 8K of precious real memory for every build that doesn't have a 16Mb PSRAM chip which is precisely why I won't do it. To do it properly the psram map has itself to be in psram which changes the 6MB and again affects everyone |
||||
| Gerad Regular Member Joined: 10/01/2024 Location: GermanyPosts: 92 |
That may be true for many “Webmite” users. But anyone who also uses the RP2350B with C++ knows exactly how valuable 16 MB is. And I'm sure it won't be long before 8 MB of PSRAM isn't enough RAM for Picomite/Webmite either. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9220 |
16MB of PSRAM may well be useful but you can't get it on a Raspberry Pi module, which is the baseline platform for MMBasic. :) Mind you, they don't do a MCU module that brings out all the pins of the RP2350B either. PSRAM isn't RAM. RAM is precious and can't be expanded. I bet you aren't running the editor, assembler, linker and compiler on the Pico when programming in C++. MMBasic has to run *all* that's needed for programming and runtime including program space and display RAM area. Mick Zilog Inside! nascom.info for Nascom & Gemini |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 12033 |
Gerad You are free to do your own build with your modification which should work but there are no commercial boards with 16Mb PSRAM chips and I won't be supporting them in the main build. Everyone should be aware that it is easy to get an AI to suggest ways of solving their particular requirement in MMBasic but the AI doesn't have an overview of the reasons decisions in the code were made and never looks at the side effects of the change. This is why I have spent many 10s of hours coaching Claude in how to add or modify functionality while keeping the overall code workable for users with different requirements and H/W platforms and this discussion is a good example. How many bytes of precious internal ram do I use to support PSRAM when possibly 90% of users don't even have any psram (standard Pico2)? I made the decision that 6K bytes is OK. 16Mb ram chips need another 8K of ram and given that they aren't available on any commercially available board my decision is that 14K is not acceptable as it now takes all of that away from non-PSRAM users and 8K away from every user with the standard 8Mb PSRAM |
||||
| Wölfi Newbie Joined: 14/10/2026 Location: GermanyPosts: 20 |
Hi Guys, To better understand how much additional storage would actually be needed, could you please give some examples of MMBASIC projects that would require that much, given that 520 KB of SRAM and 16 MB of flash are already built in? I still think for myself and generally all other average users this is far more than enough. So from my point of view I have no idea yet how to actually reach this limit at all. P.S. I also have some 8 MB PSRAM chips and have saved all the information about hacking the WeAct board to address it here from the forum, but I’m not sure I’ll ever actually need to install it. So I really have no idea. Edited 2026-10-17 21:04 by Wölfi |
||||
| Gerad Regular Member Joined: 10/01/2024 Location: GermanyPosts: 92 |
Peter, Mick I understand your point. Most users are probably only familiar with Pico, PicoW, and Pico2 W—and maybe Pimoroni as well. Companies like WeAct or Waveshare, which take the potentially higher memory requirements into account and offer a solder pad for PSRAM, are—as far as I can tell—hardly considered. I think good firmware like Picomite/Webmite should take this into account and be as flexible as possible. With the pins for the CYW43439, it worked out in the end despite initial resistance. Or is it really that difficult to switch between 8MB and 16MB via an option? This discussion reminds me of my old Mac 512k and the objections back then to a 1MB upgrade. Regards Gerad |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9220 |
The only sensible use for the additional 8MB on a Webmite, that I can envision at the moment anyway, is for html page storage. That can be handled better on SD card as editing can be more easily done externally on a PC. Remember that PSRAM is slow compared to RAM and it's uses are somewhat limited. I appreciate that you consider that MMBasic should be flexible enough to work with 16MB PSRAM chips (because thy are available), but the cost to non-expandable system resources has to be considered too. Some serious shoehorning has gone on to fit the current system into the Pico already. First find an application that will fill 8MB of PSRAM and can't be done using SD card and/or USB stick storage *then* consider 16MB and what you were trying to do wrongly. :) Mick Zilog Inside! nascom.info for Nascom & Gemini |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2097 |
We have an MCU with outstanding and extraordinary capabilities but it is still an MCU (the best ever ) |
||||
| Wölfi Newbie Joined: 14/10/2026 Location: GermanyPosts: 20 |
Thanks! |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2097 |
For got my point (senior moment). Link TWO PicoMites together. Pete already gave us this. I would do the 4bit bidirectional thing. |
||||
| Wölfi Newbie Joined: 14/10/2026 Location: GermanyPosts: 20 |
I missed that. Sounds great! Where can I find this to read up on? But generally: What about clustering a few PicoMites to outperform the CMM2, since PicoMites are more readily available? Is this possible and useful? |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 2097 |
Here you go: Linking Picomite Did this on my phone and I saw "mobile" in the link so you might not get full screen. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9220 |
Someone once clustered the original Pico by making them emulate the transputer. Some of the original transputer support hardware chips were needed for cluster control and IO, IIRC. It was capable of running some of the small cluster software slowly. Although it was interesting from a technological angle it didn't really have a use as such. :) Whether you could get a cluster of Picos to even approach the speed of a CMM2 is questionable. Under one specific task, maybe, but not as a general thing. The Pico has no clustering OS (or any OS for that matter). You would need to write that first. Mick Zilog Inside! nascom.info for Nascom & Gemini |
||||
| Gerad Regular Member Joined: 10/01/2024 Location: GermanyPosts: 92 |
Hi, I had to go with this solution as well. Running my controlsoftware on both two paired Pico2Ws and a web server — forget about it And let’s be honest, if I’m going to go to the trouble of soldering these little PSRAM chips, I might as well use the largest ones the RP2350B supports. Even if there are no plans to add support for them in “Picomite/Webmite.” I build and create software patches for myself, not so that Peter will incorporate any of it into “Webmite.” And if it works for me, I’ll share it. Anyone who wants to use it should go ahead—if not, they shouldn’t. |
||||
| Page 1 of 2 |
|||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |