Fail compilation?

General discussion on mikroPascal PRO for AVR.
Post Reply
Author
Message
martgg
Posts: 18
Joined: 07 Jul 2017 15:40

Fail compilation?

#1 Post by martgg » 11 Jun 2018 13:58

MikroPascal PRO for AVR version 6.1.2
ATmega128

Program consists of different subroutines.
Subroutines are called by symbols/

Next 'for' does not work!!!

Code: Select all

procedure Buf_string;
var
  i :byte;
begin
 FileName := '';
              UART2_Write_Text('Buf_string');             // tst
              UART2_Write(13);UART2_Write(10);        // tst
  for i:=8 to rxlen-2 do
      FileName := FileName + chr(RxBuf[i]);
      
                 FileName := '123456789';
                 UART2_Write_Text(FileName);             // tst
                 UART2_Write(13);UART2_Write(10);        // tst
end;
//;************** end Buf_string **************


Main
...

  // 'fg' -  file get date, time
            if ((CMDhi ='f')and(CMDlo ='g')) then    //
              begin
                 if rxlen >10 then   // 
                     Buf_string;    // 
              end;
It was so earlier, but in other places Program.
Did:
SPH := 0x0F; // Set stack pointer to top of RAM
SPL := 0xE0;
and worked.

Now it does not help:
SPH := 0x0F;
SPL := 0xE0;
is written or not.

martgg
Posts: 18
Joined: 07 Jul 2017 15:40

Re: Fail compilation?

#2 Post by martgg » 12 Jun 2018 12:15

There is a limit on the number of 'for'-operators?
Attachments
Statistics_Summary.jpg
Statistics_Summary.jpg (147.55 KiB) Viewed 2863 times
Functions_.jpg
Functions_.jpg (729.33 KiB) Viewed 2863 times
Functions.jpg
Functions.jpg (654.83 KiB) Viewed 2863 times

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Fail compilation?

#3 Post by filip » 13 Jun 2018 15:07

Hi,

Can you please clarify your issue ?

A small project that demonstrates this would be beneficial.

Regards,
Filip.

martgg
Posts: 18
Joined: 07 Jul 2017 15:40

Re: Fail compilation?

#4 Post by martgg » 22 Jun 2018 06:44

Small project - no problem.
Big - sometimes a problem.
The last time the procedure was added and 'for' stopped working. And 'for' in the working part of the program.
Solved the problem like this: added
SPH := 0x0F; // Set stack pointer to top of RAM
SPL := 0xE0;
If again a problem, I clean
SPH := 0x0F; // Set stack pointer to top of RAM
SPL := 0xE0;
and everything works.

Now it did not help: I tried various options for a long time.
How did - did not understand.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: Fail compilation?

#5 Post by filip » 22 Jun 2018 09:02

Hi,

Yes, this is very strange.

If you can share the project that demonstrates this issue, it would be helpful.

Regards,
Filip.

martgg
Posts: 18
Joined: 07 Jul 2017 15:40

Re: Fail compilation?

#6 Post by martgg » 22 Jun 2018 10:15

Hi, Filip.

Now it did not help: I tried various options for a long time.
As again I made the program working - I do not remember.
Yes, here's an example: Line 1822: // for j:=1 to 6 do

Now the program is working.
Here the whole project: rr.rar
Attachments
rr.rar
(364.41 KiB) Downloaded 93 times

martgg
Posts: 18
Joined: 07 Jul 2017 15:40

Re: Fail compilation?

#7 Post by martgg » 06 Jul 2018 16:03

After compilation, the work program became a non-working program.
The stack does not help.
Here the whole project: bi.rar
Attachments
bi.rar
(365.76 KiB) Downloaded 97 times

Post Reply

Return to “mikroPascal PRO for AVR General”