Good day !
Some days ago I detected the strange behavior of the compiler MikroBasik PIC32. I thought that is accident. But the problem shown more often. Problem is next:
First, the program after compiling for PIC32MX795 worked correct. Then it was need for some changes... For example, it was code:
.....
UART1_WRITE_TEXT ("Press any key")
i=i+1
.....
After addition a code for a view:
.....
UART1_WRITE_TEXT ("Press any key")
UART_WRITE_TEXT ("and work will done !") ' <---- this line
i=i+1
.....
in the working process of program body the strange take place: failure datas, incorrect rinning routines and more-more... This strange is shown also if change places two routines (procedure of functions) just. The compiler not gives error, it's OK, but really the program behaves unpredictably.
Please , need answer abour specific for PIC32 MikroBasik Compiler: is need any requirements for a lenght of routines (procedure, functions).
Thanks
Best regards,
Aleksey
The strange behavior of the compiler MB for PIC32
-
- Posts: 3
- Joined: 14 Oct 2015 05:50
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: The strange behavior of the compiler MB for PIC32
Hello,
since this is the same topic, I had answered you to the other one, so we can continue the conversation there:
http://www.mikroe.com/forum/viewtopic.php?f=168&t=65857
Best regards,
Biljana
since this is the same topic, I had answered you to the other one, so we can continue the conversation there:
http://www.mikroe.com/forum/viewtopic.php?f=168&t=65857
Best regards,
Biljana
-
- Posts: 3
- Joined: 14 Oct 2015 05:50
Re: The strange behavior of the compiler MB for PIC32
Yes, it's the same post. Information was updated so long...
Re: The strange behavior of the compiler MB for PIC32
Hi Aleksey,montana_rus wrote:Good day !
Some days ago I detected the strange behavior of the compiler MikroBasik PIC32. I thought that is accident. But the problem shown more often. Problem is next:
First, the program after compiling for PIC32MX795 worked correct. Then it was need for some changes... For example, it was code:
.....
UART1_WRITE_TEXT ("Press any key")
i=i+1
.....
After addition a code for a view:
.....
UART1_WRITE_TEXT ("Press any key")
UART_WRITE_TEXT ("and work will done !") ' <---- this line
i=i+1
.....
in the working process of program body the strange take place: failure datas, incorrect rinning routines and more-more... This strange is shown also if change places two routines (procedure of functions) just. The compiler not gives error, it's OK, but really the program behaves unpredictably.
Please , need answer abour specific for PIC32 MikroBasik Compiler: is need any requirements for a lenght of routines (procedure, functions).
Thanks
Best regards,
Aleksey
Before using Uart_... (so without number x) one must select the uart to do the action on. This is done with UART_Set_Active. See the compiler help for details.
Remark1: After a Uartx_Init (or Uartx_Init_Advanced) (with the uart number x) a Uart_Set_Active is done implicitely to the Uartx initialised. This means that, if you e.g. only initialise and use Uart1, you do not need to do Uart_Set_Active.
Remark2: when using Uart_... routines will link all uartx routines to your code next to the code of Uart_... you use.
So, perhaps you need to do a Uart_Set_Active ?
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: The strange behavior of the compiler MB for PIC32
Hello Aleksey,
can you explain your project here? Use only one topic please.
There seems to be some issue with the tickets you are sending?
Dany has a good advice in case you didn't use that function. But it would be great if you could attach the whole project just to avoid the assumptions.
Kind regards,
Biljana
can you explain your project here? Use only one topic please.
There seems to be some issue with the tickets you are sending?
Dany has a good advice in case you didn't use that function. But it would be great if you could attach the whole project just to avoid the assumptions.
Kind regards,
Biljana