![]() |
Forum Index : Microcontroller and PC projects : Micromite Firmware Update V5.04.07
Author | Message | ||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
The last version of MMBasic released a few days ago had some lingering bugs that were not discovered at the time. This version (V5.04.07) should have them all fixed. The bugs are: • Corruption of a string array when it was passed as an argument to a SUB or FUNCTION. • MAX() and MIN() functions could return an incorrect value. • A SUB or FUNCTION at the very start of a program could be ignored. • The function ACOS() could generate an internal error. Thanks to twofingers, piclover and Ken who reported them and even provided the fix or demo code. This new version can be downloaded from http://geoffg.net/micromite.html (scroll to the bottom of the page). Geoff Geoff Graham - http://geoffg.net |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Hey Geoff. ![]() I can't get the latest version to load ANYTHING from the SD-card. I just keep getting an error that it 'Cannot find file or folder.' ![]() Is anyone else seeing this problem? EDIT: 64-pin MM+ chip - I should probably mention that.... EDIT: Windows sees the test file just fine when I put the uSD card in, so the MM+ is writing the file just fine so it would seem, but it won't LOAD anything..... ![]() EDIT: You can OPEN files for read, but you just can't LOAD them: ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
flip Senior Member ![]() Joined: 18/07/2016 Location: AustraliaPosts: 114 |
Hi Geoff, Am still having lots of fun with MMBASIC...still developing a Builder/multitasker, starting with MMBASIC for DOS. Is the latest release using memory differently? I noticed two problems, first is a vague one I need to check further, the second with a specific code example. 1. Previously the same Builder code I had under 5.04.05 beta 7 used only 2% General Ram, this one used 98% General RAM and crashed. I need to look further to isolate it, so I only include output in case anyone else has isolated further DOS MMBasic Ver 5.04.07 Copyright 2011-2017 Geoff Graham Application Text Builder ver 0.1.0(07-11-2017) written by User 'flip' @ TheBackshed.com forum Program started at 23-12-2017 12:00:36 Intro completed Building 'SMT_Test.BAS' using srcfile 'SMT_Test.APP', NumSrcFilesLoaded= 0, Lines loaded= 0 Finished LoadSRC of 'C:\Users\phil\Apps\MMBasic\DEV\MMDB\AppBuilder\APT\SMT_Test.APP' Building 'SimpleMultiTasker' using srcfile 'SimpleMultiTasker.APT', NumSrcFilesLoaded= 1, Lines loaded= 51 [564] Function Rtrim$(sTxt As STRING, sChrs As STRING) Error: Not enough memory > memory Program: 24K ( 4%) used 488K free (730 lines) Variables: 4K (13%) used 27K free (66 variables) General RAM: 503K (98%) used 9K free > 2. The attached built code is a built version of a class-based UI and multi-tasker I'm still working on and also generates an error I can't isolate when I pick out the offending code (worked fine with previous 5.04.05 beta) 2017-12-23_141325_SMT_Test_-_Copy.zip DOS MMBasic Ver 5.04.07 But the code when extracted into the smaller file in attached runs fine.Copyright 2011-2017 Geoff Graham Multi-Tasker Demo ver 0.3.0(07-11-2017) written by User 'flip' @ TheBackshed.com forum Program started at 23-12-2017 15:42:50 Intro completed. Profiling system.... Native Classes all registered [141] Dim dfltdelim$=NUL 'Used by GetField$ Error: dfltdelim$ already declared > Will keep testing... Regards, Phil |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1593 |
Hi Geoff, thank you for the newest version and your efforts. ![]() As far as I can tell right now, the "Passed Array" bug has been fixed. That helps me a lot! A nice Christmas present. Congratulation! Merry Christmas! Michael causality ≠correlation ≠coincidence |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Drat, there is a bug in the LOAD command... thanks Grogs for reporting it and matherp for pointing out where the bug is in the source. Rather than make a whole new release I have simply updated the hex file on my website. So, if you have downloaded the V5.04.07 firmware and are using the Micromite Plus version please go back and download it again (clear your browser's cache first). The only file that has changed is Micromite_Plus_V5.04.07 and it now has the date of 24 Dec 2017. The source on mmbasic.com has also been updated. Geoff Geoff Graham - http://geoffg.net |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
I’m sorry but I have a problem with V5.04.06 and V5.04.07. Having finally built the SuperClock. I programmed the latest firmware version into the PIC32MX170F256B-50I/SP chip, did everything you are supposed to and ran the program (SuperClockV3.bas). The clock display worked and I could change to the other clocks and they all worked! But when I tried to change the time or date or add a new clock and push the SAVE ‘button’ the clock froze and Tera Term showed the ‘>’ MMBasic prompt – no error messages. The same happened if I pressed the OK ‘button’ after entering an invalid time. I reprogrammed the chip with V5.04.04 and then V5.04.05 and the clock worked perfectly. I hope this helps. The cause is beyond me. Bill Keep safe. Live long and prosper. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Welcome to the forum. The problem is the same one that Grogster found. EXIT DO is exiting to one line further down than it should. This in turn means that a lot of END SUB's were being missed in the super clock program. Here is a version that should work with V5.4.7 as well as earlier versions. I added a dummy line dl = dl after every LOOP that had an EXIT DO in it. I hope I found them all. I have included the font file as well to keep them together. 2017-12-24_165438_Super_Clock_BASIC_ProgramV3b.zip Jim VK7JH MMedit |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Thanks TassieJim that did work But.. I configured a new Clock for ADELAIDE and got a 'not enough memory' error. I ran the program again and found the clock was configured so I started to set another for DARWIN and got another 'not enough memory' error. The following is a copy and paste from Tera Term. > option lcdpanel ili9341,l,2,23,6 > option touch Error: Argument count > option touch 7,15 > gui calibrate Done. No errors > run [978] m = GetSec(yr, mth, 1, hr, 0, 0) Error: Not enough memory > run [727] Local String SCap(47) LENGTH 4 = ("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3","4" ,"5","6","7","8","9","0",",",".","?","-",":",";","(",")","@","#","$","&") Error: Not enough memory I have no idea if it is related to the known bug or another one? Bill Keep safe. Live long and prosper. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
I don't have a RTC or GPS connected so my results will be different. I can add new locations without errors. My mod added a few lines of code so if things are tight, it might have been enough to cause grief. You could try deleting all comments and blank lines etc before loading the code. That will save quite a bit of memory space. In MMEdit the command is Program/Crunch for the full squeeze. Jim VK7JH MMedit |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Thanks again TassyJim, did that MMEdit crunch added ADELAIDE OK added DARWIN and got the 'not enough memory' error again. re-ran the program and started to add BRISBANE and got another one. I'm using an RTC by the way. below is a cut and paste from MMEdit. > run [815] Local Integer bc, fc Error: Not enough memory > > run [815] Local Integer bc, fc Error: Not enough memory > Cheers, Bill Edit: I thought I added ADELAIDE and DARWIN but they were not there when I re-ran the program to check. 2nd Edit: With an uncrunched program and no RTC or GPS, after setting the time and date for one clock and then trying to add another I got this again: run [815] Local Integer bc, fc Error: Not enough memory > Keep safe. Live long and prosper. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
@Turbo64 - Your memory error could be caused by not loading the files correctly for the Super Clock. You should load the fonts first, save them to the library then load the main code. My web page describes this: http://geoffg.net/SuperClock.html. Note that there is a more recent version of the firmware here Geoff Geoff Graham - http://geoffg.net |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
@Geoff - I did do the LIBRARY SAVE but I may have been guilty of not doing a LIBRARY DELETE at some point although downloading new firmware must delete the library? Anyway just to be sure, with V5.04.07 installed, I loaded the library, saved it, loaded the TassieJim version of the superclock program and ran it. I was able to set up two new clocks but while doing the third I got another 'not enough memory error'. [727] Local String SCap(47) LENGTH 4 = ("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3","4" ,"5","6","7","8","9","0",",",".","?","-",":",";","(",")","@","#","$","&") Error: Not enough memory > memory Flash: 40K (66%) Program (1159 lines) 1K ( 1%) 1 Embedded C Routine 1K ( 1%) 9 Saved Variables (1005 bytes) 17K (29%) Library 1K ( 3%) Free RAM: 23K (45%) 81 Variables 16K (31%) General 11K (24%) Free > Anyway I will try the latest version soon. Keep safe. Live long and prosper. |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
Yes, I think that it would be best to try V5.04.08. Before I copied up to my website I specifically tested it with the Super Clock program and it ran fine. Geoff Geoff Graham - http://geoffg.net |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Thanks Geoff, With V5.04.08 running and using the original SuperClockV3.bas program I was able to add Four new clocks with no problems. Just to be sure, to be sure, I reloaded the program and did it again. AOK. Thanks again. Bill Keep safe. Live long and prosper. |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Glad to see it working for you again Bill. I was able to replicate the error here once I fitted an RTC so it wasn't something you were doing. My 'fix' obviously didn't fix things well enough. It is also working well here now I have update the firmware to 5.4.8 Jim VK7JH MMedit |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |