mikroPascal 6.03 beta is released

Discuss about beta versions of mikroPascal compiler.
Author
Message
User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

mikroPascal 6.03 beta is released

#1 Post by zristic » 15 Jun 2007 13:11

v.6.0.0.3 beta (2007-06-15)
----------------------
- Option to control interrupt context saving
Just call DisableContextSaving from the main program

- Added interrupt priority control (p18 only)
procedure Interrupt; // <- this is high priority interrupt
procedure Interrupt_low; // <- this is low priority interrupt

- Added org directive for constant arrays
For example: Code:

const MyConst : array[3] of byte = (1,2,3); org 0x200;




- Added time stamp information in messages window
After you build a project you will know the time.

- Added option to set address of library routines
For example: Code:

begin
...
SetOrg(Usart_Write, 0x1234); // this will make Usart_Write be at the address 0x1234
..
end.




- Fixed predefined flag (chip name) for compiler directives

- Fixed initialization for multidimensional array of float for P16

- Introduced Disassembly debugger
Our favorite.
Start simulator or mikroICD, then switch to "Disassembly view (ALT+D)" and you can go through assembly while debugging.

You can get the version here mikroPascal 6.03 beta 2 (9.2MB) (9.2MB)

We expect suggestions and bug reports.

Thanks.
mE Team.
Last edited by zristic on 19 Jun 2007 13:30, edited 2 times in total.

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

#2 Post by jpc » 15 Jun 2007 13:22

first minor detail, seems Used RAM is not reported correctly.

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

Re: mikroPascal 6.03 beta is released

#3 Post by yo2lio » 15 Jun 2007 18:54

zristic wrote: - Fixed initialization for multidimensional array of float for P16
MCU is PIC16F877A

Code: Select all

program test_individual_access_bits;

const multidim : array[1..3] of array[1..3] of real =
      ((0.1,0.2,0.3),
      (0.4,0.5,0.6),
      (0.7,0.8,0.9));

var test : real;

begin
  test := multidim[3][3]; // must be 0.9 !!!!!!!!!!
end.
Not work !

When I compile I got this :

Code: Select all

0:0 S-100 Success (Release build) - Timestamp: 8:41:23 PM 
0:0 W-101 Used ROM: 8  (1%) Used RAM: 0  (1%)
0:0 W-102 Free ROM: 8183  (99%) Free RAM: 368  (99%)
At second compilations I got this :

Code: Select all

0:0 S-100 Success (Release build) - Timestamp: 8:45:55 PM 
0:0 W-101 Used ROM: 165  (2%) Used RAM: 0  (1%)
0:0 W-102 Free ROM: 8026  (98%) Free RAM: 368  (99%)
Same for this code :

Code: Select all

program test_individual_access_bits;

const multidim : array[1..3] of array[1..3] of longint =
      (($000000FF,$0000FF00,$0000FFFF),
      ($00FF0000,$00FF00FF,$00FFFF00),
      ($00FFFFFF,$FF000000,$FF0000FF));

var test : longint;

begin
  test := multidim[3][3]; // must be $FF0000FF !!!!!!!!!!
end.

Code: Select all

11:24 W-9 Warning: Implicit typecast performed from real to longint test_multidim_array.ppas
0:0 S-100 Success (Release build) - Timestamp: 8:49:28 PM 
0:0 W-101 Used ROM: 170  (2%) Used RAM: 0  (1%)
0:0 W-102 Free ROM: 8021  (98%) Free RAM: 368  (99%)
11:24 W-9 Warning: Implicit typecast performed from real to longint test_multidim_array.ppas I use only longint variable and longint constants !!

MCU is PIC18F452 !!!!! Not work , same bug !

Best regards, Florin Medrea.

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#4 Post by yo2lio » 15 Jun 2007 19:07

Directive SetOrg not work !

Code: Select all

begin
  SetOrg(Usart_Write, 0x1234); // this will make Usart_Write be at the address 0x1234
end.
I got this :

11:7 E-3 Identifier 'SetOrg' was not declared test.ppas

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#5 Post by yo2lio » 15 Jun 2007 19:28

This code work OK on P18 MCU, fail on P16 :

Code: Select all

program test_individual_access_bits;

const multidim : array[1..3] of array[1..3] of longint =
      (($000000FF,$0000FF00,$0000FFFF),
      ($00FF0000,$00FF00FF,$00FFFF00),
      ($00FFFFFF,$FF000000,$FF0000FF)); org 0x400;

var test1 : longint;
    m,t : byte;
    
begin
  for m := 1 to 3 do
    begin
      for t := 1 to 3 do
        begin
          test1 := multidim[m][t];
        end;
    end;
end.
This Crash : test1 := multidim[3][3]; not work , result is zero !

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#6 Post by yo2lio » 15 Jun 2007 19:51

STACK_xx is not saved when i use only High Interrupt.

When I use only Low, or High and Low Interrupt , context is saved ok.
DisableContextSaving work ok !! :D

Code: Select all

program test_interrupt;

const multidim : array[1..3] of array[1..3] of longint =
      (($000000FF,$0000FF00,$0000FFFF),
      ($00FF0000,$00FF00FF,$00FFFF00),
      ($00FFFFFF,$FF000000,$FF0000FF)); org 0x400;

var test,test1,test2 : longint;
    m,t : byte;

procedure Interrupt;
var o,p : byte;
begin
  if PIR1.TMR2IF = 1 then
    begin
      PIR1.TMR2IF := 0;
      //...
      //...
      for o := 1 to 3 do
        begin
          for p := 1 to 3 do
            begin
              test2 := multidim[o][p];
            end;
        end;
    end;
end;
    
{procedure Interrupt_low;
var i,j : byte;
begin
  if PIR1.TMR1IF = 1 then
    begin
      PIR1.TMR1IF := 0;
      //...
      //...
      for i := 1 to 3 do
        begin
          for j := 1 to 3 do
            begin
              test := multidim[i][j];
            end;
        end;
    end;
end; } // not used in this test !!!!!

begin
// ... initializations...
  for m := 1 to 3 do
    begin
      for t := 1 to 3 do
        begin
          test1 := multidim[m][t];
        end;
    end;
end.
STACK_0, STACK_1, ... is not saved and is used in MAIN and INTERRUPT routine.

Regards !

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

#7 Post by jpc » 15 Jun 2007 22:26

view statistics results in access violation error, nothing usefull there right now
About reports ver 6.0.0.2

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

#8 Post by jpc » 17 Jun 2007 14:56

what should be the format of the predefined flag (chip name) for compiler directives ? cannot get it to work yet

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#9 Post by zristic » 18 Jun 2007 15:14

Ok, we are working on the fixes, the updated version will be available tomorrow.
Keep on testing...

@jpc: It should be like this:

Code: Select all

{$IFDEF P18F452}
  ...
  {$ENDIF}
But it seems not to listen everytime... We work on fixes.

bruno
Posts: 767
Joined: 10 Sep 2005 02:10
Location: Lyon, France
Contact:

#10 Post by bruno » 18 Jun 2007 16:23

Hello,

just tell me if I'm asking too much :

:arrow: is it possible to have the flags scheme name as predefined flag ?
for example if I build with myflagsschemename flags scheme :

Code: Select all

{$IFDEF _FLAGS_SCHEME_myflasgsschemename} 
  ... do this do that
{$ENDIF}
:arrow: is it possible to have (as advanced option) the flag scheme name included in .HEX output file name ?
for example if I build project prj with myflagsschemename client's flags scheme, the .HEX would be named :
prj_myflagsschemename.hex

to avoid confusion between different builds of the same project.

would be nice with mB & mC too :mrgreen:

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

#11 Post by zristic » 19 Jun 2007 10:39

Bruno,
Can't you use {$I} directive?
I use it all the time in Delphi, it helps me to switch between mikroPascal and mikroBasic source. For example, when I want to make a switch to mB, I just comment out {$I mp.inc} nad uncomment the line {$I mb.inc}. In this way I compile different codes from the same IDE.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: mikroPascal 6.03 beta is released

#12 Post by zristic » 19 Jun 2007 13:30

All right folks, here is the updated version: mikroPascal 6.03 beta 2 (9.2MB)

The problem with predefined flags still exists, sorry jpc, we are giving our best to solve this issue.

jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

#13 Post by jpc » 19 Jun 2007 15:50

looks already a lot better ! Debugging assembly indeed is great , so far ,everything that worked on previous version seems to work ok , now will go for prioritized interrupts.

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#14 Post by yo2lio » 19 Jun 2007 17:42

CONGRATULATIONS ME TEAM, in my opinion ALL IT'S OK !

If it's possible to include in this version :
- FLASH MEM LIBRARY : http://www.mikroe.com/forum/viewtopic.php?t=9092
- PIC18F97J60 FAMILY definitions files : http://www.mikroe.com/forum/viewtopic.php?t=8966
- PIC18F97J60 examples
- TestBit Extended function : http://www.mikroe.com/forum/viewtopic.php?t=9135
it would be great.

Please take a look at this post : http://www.mikroe.com/forum/viewtopic.php?t=9964

Best regards, Florin Medrea.
:D

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#15 Post by janni » 19 Jun 2007 18:33

The assembly view is great. Pity the breakpoints do not work there.
Sometimes more than one instruction gets executed, though, like

Code: Select all

label:
   decfsz _x,F
   bra label
being executed all in one go (the same happens now in normal view within asm ... end statement).

Hey, CLRWDT doesn't stop the simulator anymore and RESET command works :D !

Other things I've noticed so far:

- Cursor in editing window vanishes when going to Tools/Preferences and back.

- One line asm commands (like asm movlw 10 end;) get jumped over by simulator.

- You still haven't made the arrow buttons scrolling through units' tabs bigger :( .

- I still get a lot of warnings about unused variables if they are defined in one unit and used in others, but not in the one with definitions.

- It's not a big deal, but procedures sizes and locations diagrams in Statistics are still unintelligible if there is a lot of routines.

- Different variables localized at the same address are now all listed in Statistics/RAM, but would it be possible to place comments next to identically named ones like in the Watch window where the source routine is listed as well?

- I see that floating-point math is still the same :( . There is also the same compiler error with real constants definition - some negative values loose the sign.

Post Reply

Return to “mikroPascal Beta testing”