AMcTools Forum 
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
VMLab crash, while creating new micro files (3.15) (Read 4677 times)
Eddy-B
YaBB Newbies
*
Offline

0100010101100100
0110010001111001

Posts: 20
Netherlands
Gender: male
VMLab crash, while creating new micro files (3.15)
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;
[b]but[/b] when you forget this for [i]the very first register[/i] 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 ::)
Back to top
 
 

[b][size=16][url=http://www.eddy-b.com]www.Eddy-B.com[/url][/size][/b]
WWW   IP Logged
moderator
YaBB Administrator
*****
Offline

I love forums, don't
you?

Posts: 308
AMcTools (Spain)
Gender: male
Re: VMLab crash, while creating new micro files (3.15)
Reply #1 - 03/29/12 at 18:39:08
 
Can you be a bit more specific?

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

thanks
Back to top
 
 
WWW   IP Logged
Eddy-B
YaBB Newbies
*
Offline

0100010101100100
0110010001111001

Posts: 20
Netherlands
Gender: male
Re: VMLab crash, while creating new micro files (3.15)
Reply #2 - 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"
[/code]

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
[/code]

If you forget to declare the [b]USICR[/b] 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).
Back to top
 
 

[b][size=16][url=http://www.eddy-b.com]www.Eddy-B.com[/url][/size][/b]
WWW   IP Logged
Pages: 1
Send Topic Print