![]() |
Forum Index : Microcontroller and PC projects : CPU exception #6 on Explore-64
Author | Message | ||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
I have a 777-line program which, while initializing, dies with a CPU exception #6 error. This is on an Explore-64 with what I think is the latest firmware. CPU exception #6 (bus error on ifetch) at address 0x3C203B70 Processor restarted > print mm.ver 5.0409 > print mm.device$ Micromite Plus It appears to be dying on a PRINT statement. If I comment out that PRINT statement, it dies on the next one. Small programs run without issue. Here is the program, if anyone can take a look. This previously ran successfully on an E-28 and I've just begun to convert it to the E-64. Some pin numbers could be wrong, but I think it's dying before it gets to their definition or use. 2018-10-14_120622_gh.zip PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 1003 |
I have duplicated your error with MMBasic 5.04.09 CPU exception #6 (bus error on ifetch) at address 0x3C203B70 Processor restarted It seems to initialise OK with MMbasic 5.04.08 so more invesigation required. Gerry Latest F4 Latest H7 FotS |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
When you have CPU exception errors, you have to get sneaky to catch the culprit I added a few PRINT and PAUSE statements to the readHTMLTemplate SUB OK, I started elsewhere, but that's where I ended up. The pauses are needed to give the print buffers time to empty before the crash. The crash occurs on the 4th call to SAddStr. I know nothing about the CSUB so that's as far as I got. > RUN ~458 14-10-2018 15:20:15 Flash: 31K (30%) Program (802 lines) 1K ( 0%) 6 Embedded C Routines 68K (70%) Free RAM: 32K (32%) 118 Variables 0K ( 0%) General 65K (68%) Free DOW: 6 -- *** DATE: 14-10-2018 TIME: 15:20:15 DS3231 temperature: 999 readHTMLTemplate start readHTMLTemplate startx readHTMLTemplate stage 1 readHTMLTemplate stage 2 readHTMLTemplate stage 3 CPU exception #6 (bus error on ifetch) at address 0x3C203B70 Processor restarted There are a few extra prints in there but the last few tell us where the problem is. I don't know if its a memory problem or something else. Jim VK7JH MMedit |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 1003 |
I got down to the same area. Looks like a problem with using the longstring CFunctions after 5.04.08 Once the long string builds up to a length of 881 seems to crash despite its nominal dimension. Gerry Latest F4 Latest H7 FotS |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Congratulations, lizby - it appears you have found a bug. ![]() I have a 1500 line program running on 5.04.09 now, and no problems at all. I am not printing anything other then simple strings though, so the bug must be in the long string handling. Smoke makes things work. When the smoke gets out, it stops! |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
Wow. I hadn't expected this kind of response to an obscure problem with a longish program with some lingering chip-shifting issues. I went to bed wondering if it might be a problem with the CFunctions (and not even knowing if it was ok to move them from an MM chip to an MM+--E-28 to E-64). Thanks, Jim, for the idea of PAUSE statements allowing the PRINT buffers to clear--that had confounded my notion of where the error was occurring--I'll keep that in mind. Thanks to everyone for investigating. I'll await developments. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
Thanks to disco4now's hint in the 5.04.10 Beta thread ("Here is another code snippet that runs OK under 5.04.08 but fails under 5.04.09 and 5.04.10 beta 9"), I flashed 5.04.08 and have successfully gotten past the exception. So plowing ahead with the conversion from E-28 to E-64, with some changes. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3292 |
I have tracked down this bug and reported the solution in this thread: https://www.thebackshed.com/forum/forum_posts.asp?TID=10720&PN=1&get=last#126794 Geoff Graham - http://geoffg.net |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
Thank you, Geoff. Long string CFunctions using integers rather than floats tested successfully on the E-64 with V5.04.08. I'll await the next 5.04.10 release rather than re-flashing 5.04.09. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |