VMLAB users forum
http://www.amctools.com/cgi-bin/yabb2/YaBB.pl
General discussion boards >> Bug Reports >> VMLab crash, while creating new micro files (3.15)
http://www.amctools.com/cgi-bin/yabb2/YaBB.pl?num=1332253354

Message started by Eddy-B on 03/20/12 at 15:22:34

Title: VMLab crash, while creating new micro files (3.15)
Post by Eddy-B on 03/20/12 at 15:22:34

In trying to create a new micro definition INI/DLL combination, i found the following "bug":

When you normally forget to add a register in the REGISTERS_VIEW section of the micro cpp file, VMLAB will complain about it;
but when you forget this for the very first register in the [Peripheral:xxx] section of the INI, VMLAB will crash without giving a useful error message.

Took me some time (read: 10 mins) to figure out what the problem was, so i hope in the future people won't run into this.
Not really a bug if you don't have an error in your own source to begin with ::)

Title: Re: VMLab crash, while creating new micro files (3.15)
Post by moderator on 03/29/12 at 18:39:08

Can you be a bit more specific?

Crash example:
.....
.....

thanks

Title: Re: VMLab crash, while creating new micro files (3.15)
Post by Eddy-B on 03/30/12 at 07:03:29

Portion of INI-file
Code:
[Peripheral:USI]
DLL_model = TinyUSI        ; DLL-based model defined in "TinyUSI.dll"
Register_map = "USICR=$2D, USISR=$2E, USIDR=$2F"
Port_map = "MISO=PB6, MOSI=PB5, SCK=PB7"
Interrupt_map = "USI_Start=USIS, USI_Overflow=USIOVF"


Portion of CPP-source for TinyUSI.dll
Code:
REGISTERS_VIEW
  DISPLAY(USISR, GADGET1, USISIF, USIOIF, USIPF, USIIDC, USICNT3, USICNT2, USICNT1, USICNT0)
  DISPLAY(USIDR, GADGET2, *, *, *, *, *, *, *, *)
//   DISPLAY(USICR, GADGET4, USISIE, USIOIE, USIWM1, USIWM0, USIICS1, USIICS0, USICLK, USITC)
END_VIEW


If you forget to declare the USICR in the CPP, like in the above code snippit, VMLab will crash. Omitting any of the other registers will result in a nice warning message about the REGISTER_VIEW info missing. But not if it is the first register that you've declared in the INI file.

(using Windows XP).

VMLAB users forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.