Hello Mikroe !
It is not possible that simple problems will not be solved more quickly.
We see posts from a few years and several new versions have already been released and the problem persists.
Compiler bug - PIC32MX250F128B - unsigned integer problem
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
Hi,
@ mtuliomarco,
Could you please attach the minimal project that demonstrates this issue ?
Regards,
Filip.
@ mtuliomarco,
Could you please attach the minimal project that demonstrates this issue ?
Regards,
Filip.
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
Hi @Filip, Thanks for your reply ! Sorry for my english....
For being a product design, I can't put the whole program. But I'll explain. if I happen to be missing some of it { or } here is why I took only one piece of program code.
I have the same program being used by a DSPIC33ep512MU810 and works perfectly the code. I am trying to migrate from microcontroller because they are pin compatible and easier to find where I live, but I had this problem there.
I have two files as below.
First File.:
unsigned int StartOK=0, UsoOK=0;
...
...
while(!UsoOK)// to be aborted when the timer counts using the StartOK variable and it reaches 59999
{
latd14_bit = 1;
if(StartOK < 60000)
{
StartOK++;
delay_us(90);
}
if(USB_Func !=1) ChecaTouch();
if(USB_Liga !=0)
{
if(HID_Read() !=0) // !HID_Read
{
StartUSB();
if(Flag !=1)
{
ErrorUSB();
for(contx=8; contx<64; contx++) writebuff[contx] = ' ';
while(!HID_Write(&writebuff,64));
}
if(Flag==1)
{
USB_Func = 1;
endgrava = 0x000001;
TelaInic = 0;
lermemo(endgrava, 0, 0, 0, 0x026160, 0); //0x026160
delay_ms(1000);
writebuff[0] = 'O';
writebuff[1] = 'K';
for(contx=2; contx<64; contx++) writebuff[contx] = ' ';
while(!HID_Write(&writebuff,64));
CarregaDadosUSB();
while(!HID_Write(&writebuff,64));
}
}
}
}
Second file.:
extern unsigned int StartOK, UsoOK;
...
...
void Timer1Interrupt() iv IVT_TIMER_1 ilevel 7 ics ICS_SRS
{
if(StartOK >= 59998 && StartOK < 60000) // test all the possible options here -> StartOK > 59998 && StartOK < 60000 or StartOK >= 59998 && StartOK <= 60000
{
UsoOK = 1;
StartOK = 60000;
}
}
For being a product design, I can't put the whole program. But I'll explain. if I happen to be missing some of it { or } here is why I took only one piece of program code.
I have the same program being used by a DSPIC33ep512MU810 and works perfectly the code. I am trying to migrate from microcontroller because they are pin compatible and easier to find where I live, but I had this problem there.
I have two files as below.
First File.:
unsigned int StartOK=0, UsoOK=0;
...
...
while(!UsoOK)// to be aborted when the timer counts using the StartOK variable and it reaches 59999
{
latd14_bit = 1;
if(StartOK < 60000)
{
StartOK++;
delay_us(90);
}
if(USB_Func !=1) ChecaTouch();
if(USB_Liga !=0)
{
if(HID_Read() !=0) // !HID_Read
{
StartUSB();
if(Flag !=1)
{
ErrorUSB();
for(contx=8; contx<64; contx++) writebuff[contx] = ' ';
while(!HID_Write(&writebuff,64));
}
if(Flag==1)
{
USB_Func = 1;
endgrava = 0x000001;
TelaInic = 0;
lermemo(endgrava, 0, 0, 0, 0x026160, 0); //0x026160
delay_ms(1000);
writebuff[0] = 'O';
writebuff[1] = 'K';
for(contx=2; contx<64; contx++) writebuff[contx] = ' ';
while(!HID_Write(&writebuff,64));
CarregaDadosUSB();
while(!HID_Write(&writebuff,64));
}
}
}
}
Second file.:
extern unsigned int StartOK, UsoOK;
...
...
void Timer1Interrupt() iv IVT_TIMER_1 ilevel 7 ics ICS_SRS
{
if(StartOK >= 59998 && StartOK < 60000) // test all the possible options here -> StartOK > 59998 && StartOK < 60000 or StartOK >= 59998 && StartOK <= 60000
{
UsoOK = 1;
StartOK = 60000;
}
}
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
filip wrote:Hi,
@ mtuliomarco,
Could you please attach the minimal project that demonstrates this issue ?
Regards,
Filip.
waiting.....
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
Hi,
Can you please attach the project that can be compiled ?
I don't have definition of all variables/functions that you use in your code, which might be essential.
Regards,
Filip.
Can you please attach the project that can be compiled ?
I don't have definition of all variables/functions that you use in your code, which might be essential.
Regards,
Filip.
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
filip wrote:Hi,
Can you please attach the project that can be compiled ?
I don't have definition of all variables/functions that you use in your code, which might be essential.
Regards,
Filip.
Hi,
I sent a private message with the whole project. It can be compiled without problems, but will present the problem I described.
Regards,
Marco Gonzaga
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
filip wrote:Hi,
Can you please attach the project that can be compiled ?
I don't have definition of all variables/functions that you use in your code, which might be essential.
Regards,
Filip.
Hi Filip,
I think the pictures were not sent in the private message and so I'm sending them to you here.
regards
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
Hi @ Filip,
Waiting......
regards,
Waiting......
regards,
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
Hi,
Is it possible to run this without the TFT and Serial Flash ?
Regards,
Filip.
Is it possible to run this without the TFT and Serial Flash ?
Regards,
Filip.
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
Hi Filip,filip wrote:Hi,
Is it possible to run this without the TFT and Serial Flash ?
Regards,
Filip.
I do not understand why you asked. This program works perfectly on a dspic33ep without any problem. If I just do a check this way (StartOK > 59998) the program works too. But when I use more than one argument (StartOK > 59998 && StartOK < 60000), it does not work here for PIC32 because the DSPIC33 works without problems.
It is not the routines that are in trouble, it is a compiler problem, otherwise the same program would not work in DSPIC.
regards,
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
filip wrote:Hi,
Is it possible to run this without the TFT and Serial Flash ?
Regards,
Filip.
Did you get tested? I need to use this very much and I am still waiting for the solution of voices.
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
as always, they put the user to work around the bugs ! i think they don't even have or own the source code of their compilers !
they never fix bugs, what ever.
most of this problems is in the optimization of this **** compilers.
they even destroyed visual-tft . i cont work with it any moor. it is so stooped to have only tft screen or code ! how am i suppose to write the code for the screen ? f12 f12 f12 ... .
the only solution for this bugs are to turn off or on the "dynamic link ..." in the output setting of the compiler.
sometimes it works when it is on and add one line and you should turn it off for program to work !!
that is how i get it to work, poorly and burly.
they never fix bugs, what ever.
most of this problems is in the optimization of this **** compilers.
they even destroyed visual-tft . i cont work with it any moor. it is so stooped to have only tft screen or code ! how am i suppose to write the code for the screen ? f12 f12 f12 ... .
the only solution for this bugs are to turn off or on the "dynamic link ..." in the output setting of the compiler.
sometimes it works when it is on and add one line and you should turn it off for program to work !!
that is how i get it to work, poorly and burly.
-
- Posts: 14
- Joined: 30 Nov 2012 21:22
Re: Compiler bug - PIC32MX250F128B - unsigned integer proble
josef2600 wrote:as always, they put the user to work around the bugs ! i think they don't even have or own the source code of their compilers !
they never fix bugs, what ever.
most of this problems is in the optimization of this **** compilers.
they even destroyed visual-tft . i cont work with it any moor. it is so stooped to have only tft screen or code ! how am i suppose to write the code for the screen ? f12 f12 f12 ... .
the only solution for this bugs are to turn off or on the "dynamic link ..." in the output setting of the compiler.
sometimes it works when it is on and add one line and you should turn it off for program to work !!
that is how i get it to work, poorly and burly.
Thanks for your comment. My dynamic link is off, I'll be calling and making new tests to see if it solves the problem.