GPIO Methods not working using eGUI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO Methods not working using eGUI

Jump to solution
1,276 Views
elisamejia
Contributor III

Hello,

I've been working in a program using TWR-LCD-RGB (with eGUI) and TWR-K70 development kit. I need to change some objects in the user interface whenever a button is pushed. However, when I try to use the GPIO components available in Processor Expert (BitIO and Init_GPIO as shown in Tutorial: Bits and Pins with Kinetis and the FRDM-KL25Z Board | MCU on Eclipse )  several errors are reported, all of them regarding the definition of the methods of these GPIO components, as GetVal() or NegVal(). The exact error indicates, for example, that in the Component SW1 (BitIO) the method SW1_GetVal() in undefined. These error, nevertheless, are not present when the exact same code is used without the eGUI.

I'm not sure why this is happening but it happens in several projects that I have done using eGUI.

Can anyone explain this problem to me, and hopefully help me to solve it?

Regards,

Elisa

0 Kudos
1 Solution
955 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Elisa,

I downloaded the project you mentioned, added a BitIO component to the project and tried to compile the project but got these errors:

pastedImage_0.png

I fixed these errors by including the corresponding header files on the demo_screen.c file.

#include "LD_BLUE.h"

#include "LD_GREEN.h"

#include "LD_ORANGE.h"

#include "LD_YELLOW.h"

#include "SW_1.h"

#include "SW_2.h"

Are these the errors you get? Could you post a screenshot of your errors?

Best Regards!

Carlos Mendoza

Technical Support Engineer

View solution in original post

0 Kudos
8 Replies
955 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Elisa,

Are you using KDS? Please make sure that you set the GetVal and NegVal methods to "generate code":

pastedImage_0.png

And that the code is present on the generated files after clicking on the "Generate Processor Expert Code" button:

pastedImage_7.png

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 Kudos
955 Views
elisamejia
Contributor III

Hi Carlos,

I'm using Codewarrior 10.6, and I'm sure that they are set to generate code and they are generating it indeed.

Still, it doesn't work.

Regards,

Elisa

0 Kudos
955 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Elisa,

Are you including the corresponding header file in your eGUI *.c files? for example "Bit1.h"?

Hope it helps!

Best Regards,

Carlos Mendoza

Technical Support Engineer

0 Kudos
955 Views
elisamejia
Contributor III

Hi Carlos,

I'm sure I've included them, and it was working and suddenly stopped working.

0 Kudos
955 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Elisa,

Could you post a sample project were we can reproduce this problem?

Best Regards!

Carlos Mendoza

Technical Support Engineer

0 Kudos
955 Views
elisamejia
Contributor III

Hi Calos,

Sorry for the delay. I created a project with this problem just by adding eGUI to a project and creating a BitLDD component in Processor Expert. However, it is happening as well in the example project that Luis Casado provided in this thread: Re: Re: Sample code request eGui + TWR-K70 + TWR-LCD-RGB + MQX + CW . Originally, this example code was working on my PC and suddenly it gave me the errors, even if I did not modify the code.

Regards,

Elisa

0 Kudos
956 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Elisa,

I downloaded the project you mentioned, added a BitIO component to the project and tried to compile the project but got these errors:

pastedImage_0.png

I fixed these errors by including the corresponding header files on the demo_screen.c file.

#include "LD_BLUE.h"

#include "LD_GREEN.h"

#include "LD_ORANGE.h"

#include "LD_YELLOW.h"

#include "SW_1.h"

#include "SW_2.h"

Are these the errors you get? Could you post a screenshot of your errors?

Best Regards!

Carlos Mendoza

Technical Support Engineer

0 Kudos
955 Views
elisamejia
Contributor III

Hi Carlos,

Those are the exact errors I get. However, I don't know why they started appearing, because as I told you, the project was working and didn't throw this kind of errors.

Anyway, thank you for your help!

Regards,

Elisa

0 Kudos