![]() |
Forum Index : Microcontroller and PC projects : Micromite MMBasic Ver 5.04.10 Beta
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
I have figured out what is going wrong here (thanks for the demo code - it made it so much easier to track down the problem). The first is the bug reported by disco4now which caused an out of memory error when a string was repeatedly passed to a SUB or FUNCTION. This was caused by a memory leak introduced when I was optimising the performance of MMBasic for V5.04.09. I plan to put out a new beta version soon and the fix will be in that. This just goes to show that every change to the core MMBasic code also runs the real risk of introducing new bugs. This is most annoying because after years of chasing bugs MMBasic is quite solid if left alone. The second bug also reported by disco4now caused a CPU exception when a string was repeatedly passed to a CSUB or CFUNCTION. This is more complicated so bear with me while I explain it: When using the Long String Library the memory for each long string was supposed to be declared as an array of floats and this array was passed to the CSUBs to be manipulated as a long string. Unfortunately this caused an exception in V5.04.09 because of a bug in the code for passing an array of floats. This is something I will also fix this in the next beta. However, using an array of floats for a long string has its own issue. The Micromite Plus now uses double precision so each float is eight bytes whereas the standard Micromite still uses single precision floats of four bytes each. This means that a program written for the Micromite will allocate double the memory on the Micromite Plus. Rather than requiring programmers to write different code for each version I have modified the Long Strings documentation to state that the memory for a long string should be declared as an array of integers (which is a consistent eight bytes per integer). This is the new doco for Long Strings: 2018-10-26_143801_Long_Strings.pdf Because the bug that affected disco4now code was related to passing arrays of floats this new version of the Long Strings Library (using integers) also works as a workaround for the bug reported by disco4now above. Geoff Geoff Graham - http://geoffg.net |
||||
Azure![]() Guru ![]() Joined: 09/11/2017 Location: AustraliaPosts: 446 |
Hi Geoff, That is a very clear description of what was going wrong, thanks for that, it helps us novice users increase our understanding of MMBasic. There is a minor typo in the document, the description of SLCase, it is written as "SULase str". |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
Brilliant work Geoff! You can say that again. Paul in NY |
||||
jman![]() Guru ![]() Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Hi Geoff I assume the out of memory error from the code below is due to the issue reported above. (No long strings) Do Test "2.54" Memory Loop Sub Test(E$) Pause 25 End Sub RAM: 0K ( 0%) 0 Variables 14K (27%) General 36K (73%) Free [2] Test "2.54" Error: Not enough memory Regards Jman |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Hi John, yes it is. I have just checked your test code on my current in house beta and it runs fine. I will be turning this into a public beta for people to download in a few days. Geoff Geoff Graham - http://geoffg.net |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
I have a new version of the Micromite beta firmware V5.04.10 (Beta 10) and it can downloaded from: http://geoffg.net/micromite.html Look for "Micromite Firmware V5.04.10 Beta Test Version" at the bottom of the page. This version (Beta 10) mostly adds bug fixes and covers everything that has been reported to date. Especially important is a fix for the "Out of memory" errors that kept cropping up in V5.04.09 and later beta versions. The file Change Log.pdf in the zip file contains the details. I will give this a couple of weeks and if nothing serious has turned up I will make it into a final release. If you do find any issues or bugs in this beta please report them in this thread and I will try to fix them ASAP. Thanks to everyone for the past bug reports, Geoff Geoff Graham - http://geoffg.net |
||||
Paul_L Guru ![]() Joined: 03/03/2016 Location: United StatesPosts: 769 |
Geoffg, Thanks again from all of us for working so assiduously on this major project! Will you be turning V5.04.10 into a DOS version anytime soon? Paul in NY |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Yes, the download referred to above contains the DOS version of V5.04.10 (Beta 10). Geoff Graham - http://geoffg.net |
||||
jman![]() Guru ![]() Joined: 12/06/2011 Location: New ZealandPosts: 711 |
Thanks Geoff The memory error is confirmed sorted ![]() Regards John |
||||
Zonker![]() Guru ![]() Joined: 18/08/2012 Location: United StatesPosts: 767 |
Morning Gents.. Just downloaded the new version for testing with the EIS hardware. It is running with a 470 chip and has an ILI9341 based 2.2" SPI display. In preparation for the testing, I have upgraded the PC to win10 to avoid the older win7 USB driver issue. After programing the PIC, everything seemed ok with USB comms. So, I went through the option settings for the LCD display, (ILI9341,RL,28,31,27), and after restarting the PIC, once again the USB port is not recognized by windows... I tried the whole process over again the be sure. The hardware I am using works fine on older versions of the firmware. I was wanting to see if anyone else with the SPI displays could check if this new version works for them... Thanks Geoff for all your hard work and everyone here for your help with this..!! ![]() |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 1003 |
I am running ILI9341 on MX170 OK with new version however I am not using the USB console so not across any possible driver issue. Latest F4 Latest H7 FotS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Geoff Backlight seems to be off after reboot on SSD1963 (64pin MM+). I need to use BACKLIGHT command to get anything on the display. Display is configured with RD pin OPTION LCDPANEL SSD1963_5,RL,,30 |
||||
circuit Senior Member ![]() Joined: 10/01/2016 Location: United KingdomPosts: 277 |
Yes, same here. I reported this issue previously (https://www.thebackshed.com/forum/forum_posts.asp?TID=10844&PN=1&TPN=1) and received several replies that indicated others experienced the same. Seems it is not yet resolved. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Thanks for the bug reports. I have uploaded Beta 12 for the MM+ which fixes both issues: • Fixed the bug that disabled the onboard USB interface when an LCD panel using an SPI interface was configured. • On the first time MMBasic is run the default SSD1963 LCD brightness will now be set to 100. You can download it from the usual place: http://geoffg.net/micromite.html Both the standard Micromite and the Windows/DOS versions have not changed so I have left them as beta 10. Hopefully there will be no more bugs lurking in the wings but please let me know if you do find one. Geoff EDIT: Don't forget to clear your browser's cache. Geoff Graham - http://geoffg.net |
||||
Zonker![]() Guru ![]() Joined: 18/08/2012 Location: United StatesPosts: 767 |
Update... Just downloaded and shot Beta 12 and tried testing it... It's weird.. Now the Teraterm program hangs up and says it not responding to the USB comm port the MM is connected to... ![]() Anyone else seeing this..?? |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
I did a lot of testing with the MM+ USB and Teraterm and nothing like that happened. Are you saying that you plug the MM+ in, get the correct sound from Win10, then start Teraterm and at that point Teraterm hangs? Geoff Graham - http://geoffg.net |
||||
Zonker![]() Guru ![]() Joined: 18/08/2012 Location: United StatesPosts: 767 |
Sorry for the delay Geoff... Just got home from work... Yes, as you said.. After I plug in the MM+ I do get the correct sound, then startup Teraterm and it hangs... (not responding).... So, I will try it again from scratch... Will report back soon... ![]() EDIT: - Ok, just got done doing the whole sequence over again... Same answer.. Info: - Using PicKit3 with IPE v3.61 programming MM+ v5.04.10 Beta 12 Did full MPU core erase before flashing the firmware image followed by a verify sequence to double check... EDIT: - Also tried it on another PC (wife machine) - Same results... EDIT: - Also tried programming an Explore 64 PCB - Same results Also tried switching USB cables (just in case)... No difference Will try to keep testing different things... Be back after dinner... |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Strange, I just tried it now and it worked fine on my main PC but not my Surface Pro (both Win10). I will investigate further. Geoff Graham - http://geoffg.net |
||||
Zonker![]() Guru ![]() Joined: 18/08/2012 Location: United StatesPosts: 767 |
Thanks Geoff for all your time and hard work on this..!! ![]() Using the new GUI Gauge controls is going to be awesome..!! |
||||
Malibu Senior Member ![]() Joined: 07/07/2018 Location: AustraliaPosts: 260 |
Thanks for the continual updates Geoff! ![]() Ok, I just upgraded to Beta 12 from Beta 10 (I think it was B10) using PicKit 3 on an MME+64 All went as it should and reported verification as good after the transfer. I shut down the PicKit, plugged in the MM and with the correct ports (Com15) selected in MMEdit, I had a freeze on MMEdit (Not Responding) when I opened MM Chat window. I reflashed with the B10 backup and it was all good again. Firmware running and MMEdit with no problems. Just to be sure, I did it all again with the same results and I'm now back to B10 which works as it did. With B12, Windows 7 reports the Com port correctly, registers the device is attached and does everything that it should. The only problem is the freeze in MMEdit (I guess the same situation reported with TeraTerm - which I don't use) Got a few things on at the moment, so I'll need to get back to the problem later on. Just a quick feedback report for the info ![]() John |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |