Simulator V5.20 "Reset"

General discussion on mikroPascal PRO for AVR.
Post Reply
Author
Message
spinnumber
Posts: 60
Joined: 22 Dec 2005 12:16
Location: France (33)

Simulator V5.20 "Reset"

#1 Post by spinnumber » 17 Dec 2011 16:22

Hello
Return a call for a procedure, reset the program under test.(PC=0x000000)

Code: Select all

;  LST file generated by mikroListExporter - v.2.0 
; Date/Time: 17/12/2011 16:06:39
;----------------------------------------------

;Address Opcode 	ASM
0x0000	0xC074    	RJMP       116
0x0002	0xC000    	RJMP       0
0x0004	0xC000    	RJMP       0
0x0006	0xC000    	RJMP       0
0x0008	0xC000    	RJMP       0
0x000A	0xC000    	RJMP       0
0x000C	0xC042    	RJMP       66
0x000E	0xC000    	RJMP       0
0x0010	0xC000    	RJMP       0
0x0012	0xC000    	RJMP       0
0x0014	0xC000    	RJMP       0
0x0016	0xC000    	RJMP       0
0x0018	0xC000    	RJMP       0
0x001A	0xC000    	RJMP       0
0x001C	0xC000    	RJMP       0
0x001E	0xC000    	RJMP       0
0x0020	0xC000    	RJMP       0
0x0022	0xC000    	RJMP       0
0x0024	0xC000    	RJMP       0
_main:
0x00E8	0xEDBF    	LDI        R27, 223
0x00EA	0xBFBD    	OUT        SPL+0, R27
0x00EC	0xE0B0    	LDI        R27, 0
0x00EE	0xBFBE    	OUT        SPL+1, R27
;AlimPwm.mpas,178 :: 		(* ============================= Main ==================================== *)
;AlimPwm.mpas,180 :: 		//PortAInit;            //DDRA := $FC; //1111 1100 Le PA7..PA2 en Sortie  PA1/PA0 en entree analogique
0x00F0	0x922F    	PUSH       R2
0x00F2	0xDFBE    	RCALL      AlimPwm_PortBInit+0
;AlimPwm.mpas,181 :: 		PortBInit;            //DDRB := $FF;          // 1111 1111 Le portB en sortie
0x00F4	0xDFC2    	RCALL      _ADCInit+0
;AlimPwm.mpas,182 :: 		ADCInit;              // ADC Parametrage
0x00F6	0xB1B7    	IN         R27, ADMUX+0
0x00F8	0x62B0    	SBR        R27, 32
Claude

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Simulator V5.20 "Reset"

#2 Post by janko.kaljevic » 19 Dec 2011 16:35

Hello,

Please can you explain in more details the problem that you are facing.
Also please post here minimal project that describes this issue so we can inspect it.

Best regards.

TurboProgger
Posts: 66
Joined: 04 Oct 2008 18:39
Location: Germany

Re: Simulator V5.20 "Reset"

#3 Post by TurboProgger » 19 Dec 2011 17:13

Hi Janko,

at least i observed the same error as Claude.
Write a minimal program, just with one procedure or function,
compile and debug.
After leaving the procedure/function, the blue debug bar moves
back to the first begin of the main, instead to next instruction.
That is, why the program always resets.

IMPORTANT:
This error only occurs, if you select an ATtiny25!
With other µC it works correct.
Regards

spinnumber
Posts: 60
Joined: 22 Dec 2005 12:16
Location: France (33)

Re: Simulator V5.20 "Reset"

#4 Post by spinnumber » 19 Dec 2011 18:02

Hello
The most important thing for me is that it is necessary that the code works in the micro.
To date, all code compiled with the version 5.20 (for attiny25) does not work.
I join in the attached piece of source code.
Thank you for your interest.
Attachments
SondeScopeTiny25V500.zip
(4.57 KiB) Downloaded 188 times
Claude

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Simulator V5.20 "Reset"

#5 Post by janko.kaljevic » 22 Dec 2011 13:49

Hello,

Thanks for reporting this. i have forwarded it to our developers and we will fix it very soon.

Best regards.

TurboProgger
Posts: 66
Joined: 04 Oct 2008 18:39
Location: Germany

Re: Simulator V5.20 "Reset"

#6 Post by TurboProgger » 28 Dec 2011 10:14

Hi Janko,

Today I found a new release of mikropascal for AVR, Version 5.40.
After installing I tried out this small program for an ATtiny25:

Code: Select all

program DIFF;

var
  a,b,c,d: byte;
  m,n: word;
var
  temp,
  i: byte;

Function Add(a,b: byte): word;
begin
  temp := 255;
  i := temp.6;
  Add := a + b;
end;

begin
  m := Add(12,16);
  n := m;
end.
Sorry, but the error still exists only for ATtiny25.
Line "n:=m;" will never be reached...
With an ATtiny45 for example, the debugger shows no error.

Please try out for yourself to debug this little piece of code within the debugger with an ATtiny25 as well with an ATtiny45.

Regards and a happy new year

spinnumber
Posts: 60
Joined: 22 Dec 2005 12:16
Location: France (33)

Re: Simulator V5.20 "Reset"

#7 Post by spinnumber » 28 Dec 2011 11:32

Version 5.40 is the same error.
I think that was There is no new version of the compiler and it is the same as in version 5.20.
Happy new Year
Claude

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Simulator V5.20 "Reset"

#8 Post by janko.kaljevic » 29 Dec 2011 14:51

Hello,

I apologize for inconvenience, but it was not possible to implement this fix in this latest version, and most probably it will be implemented in next version.

Best regards.

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Simulator V5.20 "Reset"

#9 Post by janko.kaljevic » 31 Jan 2012 09:04

Hello,

This will be fixed in next release of the compiler.
At the moment you can use previous version of compiler (v5.00) and it will work fine.

Thanks for your patience and understanding.

Best regards.

TurboProgger
Posts: 66
Joined: 04 Oct 2008 18:39
Location: Germany

Re: Simulator V5.20 "Reset"

#10 Post by TurboProgger » 17 Feb 2012 22:28

All versions of MikroPascal for AVR above 5.00 are buggy.
So where to download (old) V5.00 for those guys, who want to produce correct code?
Please provide a new link for downloading version 5.00.
Thank you.

Best regards

pykedgew
Posts: 164
Joined: 10 Dec 2005 02:22
Location: Brisbane Australia

Re: Simulator V5.20 "Reset"

#11 Post by pykedgew » 19 Feb 2012 02:01

Hi TurboProgger

If you can wait in 2 day time, I can email you a copy of
mikropascal_pro_avr_2011_v500_setup.zip (18Mb)

Just send PM to me privately in the background if you want to.

Ken

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Simulator V5.20 "Reset"

#12 Post by janko.kaljevic » 20 Feb 2012 16:46

Hello,

Please download version v5.00 from here:
http://www.mikroe.com/download/eng/soft ... _setup.zip

Best regards.

spinnumber
Posts: 60
Joined: 22 Dec 2005 12:16
Location: France (33)

Re: Simulator V5.20 "Reset"

#13 Post by spinnumber » 10 Apr 2012 16:23

Hello MikroElektronika AVR Pascal Team,
When do you update the compiler for the ATtiny?
It's been over 3 months since the bug was reported.
Claude
Claude

Post Reply

Return to “mikroPascal PRO for AVR General”