Anobium - 2019-03-26

Warning

I have identified a very serious issue that will impact k42/k83 solutions using the Great Cow BASIC compiler.

Do not use the Great Cow BASIC compiler v0.98.04 and any version of the compiler prior to v0.98.04 with these microcontrollers.

You should only use Great Cow BASIC compiler v0.98.05 as a minimum, when released.

Issue

The issue is random handling of firmware during the interrupt event - this manifests as randomness with respect to microcontroler processing.

We have samples of code where this issue, of random handling, can be easily replicated.

Analysis

The compiler handles the interrupt incorrectly.

When the interrupt source is serviced, the program execution vectors to the resolved interrupt vector addresses, and, as explained in Section 11.2 “Interrupt Vector Table (IVT)”. The vector number is also stored in the WREG register.

So the compiler is backing up and restoring the WREG register, when the WREG longer contains data from the (non-interrupt) code being executed! This is trashing WREG every time an interrupt occurs and therefore WILL cause random errors.

Resolution

The compiler will be updated to correct this error as soon as possible to appropiately handled the WREG register.

Watch the forum of the release of the new compiler - this is our highest priority to resolve.

Evan

 

Last edit: Anobium 2019-03-29