TWR-K70F120M + TWR-LCD-RGB using CodeWarrior + eGUI code example

cancel
Showing results for 
Search instead for 
Did you mean: 

TWR-K70F120M + TWR-LCD-RGB using CodeWarrior + eGUI code example

3,706 Views
apanecatl
Senior Contributor II

A significant number of customers have been asking for a code example made in CW to enable K70's LCDC using TWR-LCD-RGB and eGUI,a s most of you know there are two code examples for AN4588, one was created using eGUI + IAR 6.3 and the other one was created using PEG+ + CodeWarrior, however those customer who already purchased the CW license were trying to figure out why we don't have a code example using our own software, well; we do have that code example, I'm posting it here for all of those interested in the K70 LCD graphic controller capabilities.

Original Attachment has been moved to: TWR-K70FN120M-CW-eGUI_3.0.zip

Labels (1)
49 Replies

245 Views
towerer
Contributor III

Thanks very much for this example.

Is there any update on this? I am new to MQX and eGUI and am trying to compile it under Code Warrior 10.6 with MQX 4.1

I recompiled MQX 4.1 with the given user_config.h and updated all paths under the projects settings (to "D:\Freescale\Freescale_MQX_4_1" and to "lib\twrk70f120m.cw10gcc".

I tried to get it to work but i cant get it to compile, It seems there need to be some changes made to port the example to 4.1

Has anyone done that? I need help with this.

Thank you very much in advance,

Manuel

0 Kudos

245 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

Basically, the issue is that the original code uses Codewarrior FSL Kinetis compiler and MQX 4.1 only includes support for Codewarrior GCC compiler.

You could build  MQX 4.0.2 (Codewarrior FSL Kinetis compiler) and the project with CW 10.6, but for MQX 4.1 support a new eGUI project needs to be created and add the eGUI sources.

Luis

0 Kudos

244 Views
towerer
Contributor III

Thank you very much for your fast reply.

I will try that, allthough it it would have been very cool if you would provide an updated example ;-)

Manuel

0 Kudos

244 Views
LuisCasado
NXP Employee
NXP Employee

Hi,

Here you go..

Regards,

Luis

0 Kudos

244 Views
irishjohn
Contributor I

I have compiled the libraries with the provided user_config.h file without error.

I am using MQX 4.1.1 K70 with CW10.6.

I import the eGUI_CW_10_6_MQX_4_1 project and make sure the copy projects into workspace is unchecked.

When I build the project I get 25 errors, most of them are similar to :

undefined reference to `D4D_CheckBoxGetValue'

Any idea what my problem could be?

Regards

0 Kudos

244 Views
elisamejia
Contributor III

Hi all,

I've been having the same problem. Using CW 10.6 with MQX 4.1 and K70 I get exactly 25 errors:

DescriptionResourcePathLocationType
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 545C/C++ Problem
undefined reference to `D4D_CheckBoxGetValue'demo_screen.c/eGUI_twrk70f120/Sourcesline 535C/C++ Problem
mingw32-make: *** [eGUI_twrk70f120.elf] Error 1eGUI_twrk70f120C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 537C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 518C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 526C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 507C/C++ Problem
undefined reference to `D4D_CheckBoxGetValue'demo_screen.c/eGUI_twrk70f120/Sourcesline 516C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 499C/C++ Problem
undefined reference to `D4D_Poll'main.c/eGUI_twrk70f120/Sourcesline 147C/C++ Problem
undefined reference to `D4D_CheckBoxGetValue'demo_screen.c/eGUI_twrk70f120/Sourcesline 497C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 487C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 479C/C++ Problem
undefined reference to `D4D_CheckTouchScreen'main.c/eGUI_twrk70f120/Sourcesline 110C/C++ Problem
undefined reference to `D4D_CheckBoxGetValue'demo_screen.c/eGUI_twrk70f120/Sourcesline 477C/C++ Problem
undefined reference to `D4D_Init'main.c/eGUI_twrk70f120/Sourcesline 134C/C++ Problem
undefined reference to `D4D_SldrSetValue'demo_screen.c/eGUI_twrk70f120/Sourcesline 443C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 432C/C++ Problem
undefined reference to `D4D_SetOrientation'main.c/eGUI_twrk70f120/Sourcesline 141C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 431C/C++ Problem
undefined reference to `D4D_CheckTouchScreen'main.c/eGUI_twrk70f120/Sourcesline 143C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 429C/C++ Problem
undefined reference to `D4D_IconSetIndex'demo_screen.c/eGUI_twrk70f120/Sourcesline 428C/C++ Problem
undefined reference to `D4D_SldrSetLimits'demo_screen.c/eGUI_twrk70f120/Sourcesline 301C/C++ Problem
undefined reference to `D4D_TimeTickPut'main.c/eGUI_twrk70f120/Sourcesline 101C/C++ Problem

I have built the psp and bsp files after configuring the user_config.h file. Can any of you help me?

Thanks!

Elisa

0 Kudos

244 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

Frankly speaking, I don't know. It works for me and other people. Try to unzip in a folder without a long path and without spaces in the path, something like c:\test

Regards,

Luis

0 Kudos

244 Views
draganstanic
Contributor I

Luis,

I tried it with , where file edited is c:\Freescale\Freescale_MQX_4_1\config\twrk70f120m\user_config.h

and on importing...

pastedImage_0.png

i got warning...

"

Description    Resource    Path    Location    Type

Invalid project path: Include path not found (C:\eGUI_CW_10_6_MQX_4_1\_Official_Demos\EGUI_D4D_Demo\TWR_K70N120\MQX\D4D).    eGUI_twrk70f120        pathentry    Path Entry Problem

"

I see you previously advised to continue with build, so i did it and  it gives me 25 errors:

pastedImage_0.png

How this could be addressed?

Thanks

0 Kudos

244 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

I have just downloaded my project from this threat (just in case). Unziped in a folder. I have build the new MQX 4.1.1 K70 libraries with the attached user_config.h. Then imported the project into CW 10.6 , build and debug without problems. So I have verified the project and that is working with the latest MQX 4.1.1.

With your errors, I am not sure why you get them. Try to use a new and fresh workspace in CW 10.6. And be sure you don't have problems unzipping the project.

Best Regards,

Luis

0 Kudos

244 Views
towerer
Contributor III

Hi,

at least it compiles.

I can't get it to run, though; D4D fails to initialize.

I single-stepped through it and found where it fails; it fails while

initializing the Touchscreen, exactly at:

d4dtch_cr_touch.c, line 135:

if(D4D_LLD_TCH_HW_CRTOUCH.D4DTCHHWCRTOUCH_MultiReadBytes(CRTCH_STATUS2,

&status2, 1) != D4D_LLD_TCH_HW_CRTOUCH.COMM_OK)

What am I doing wrong?/What ist wrong?

All i have assembled is the TWR-LCD-RGB,the TWR-K70F120M and a TWR-PROTO (with nothing on it, for now just to make the tower physically more stable).

EDIT: I read something in some threads about some TWR-LCD-RGB Revisions that have problems with their crtouch-Chip. Could that be the cause? I have a REV E-Board.

(Source: Re: Touchscreen not working on Vybrid tower demo)...

The Demos for K70+LCD-RGB aren't working either (HVAC for example), they get stuck at calibrating the touchscreen (Display works, touch does not). Hardware fault?

Greetings,

Manuel

0 Kudos

244 Views
LuisCasado
NXP Employee
NXP Employee

I have verified in my PC and in a colleague PC.

Rebuild the MQX libraries with the user_config.h I posted with the project. Most probably you are missing

#define MQX_ROM_VECTORS              0

Luis

0 Kudos

244 Views
towerer
Contributor III

UPDATE2:

I had the crazy idea to change the I2C-Address to 0x4B, (the other one which can be set with a pin of the crtouch-chip). And...

...it worked. Allthough it should not, as the LCD-RGB should have the address 0x49...

replacement is on the way, lets see if it has 0x4B, also.

I had a look on the LCD-RGB schematic, and the ADDRSEL-Pin is not connected.. is that a bug? I could not find anything in the CRTouch-Chip-datasheet about an internal pullup or something.

UPDATE:

Okay, it is definitely a hardware fault. I scoped the I2C at the two Testpoints TP17 and TP18 (i think, next to the Pins 26 and 27 of the CRTouch-chip). The device gets correctly adressed with address 0x49, but does not acknowledge.

I hope the replacement LCD is working, so i can finally get this running...

Hi, thanks for the answer.

I already recompiled MQX with your user_config.h, and MQX_ROm_VECTORS is 0.

As the binary demos fail too, i think it is a hardware fault, and we will replace the LCD-RGB. In the meantime i'll have a look with the scope at the i2c-bus.

Greetings,

Manuel

0 Kudos

244 Views
towerer
Contributor III

Okay, the replacement (REV E, too) has the same behavior. I had some issues to get the LCD working after power-off, too, the cause was simple: th USB-cable was too long (5m), a shorter one worked. Anyway.

The CRTOUCH-Chip is on adress 0x4B, which is not a problem for me, but none of the binary demos work. It would be nice to have an answer from freescale why it is that way (and why the crtouch-Chip has an open ADDRSEL-Input)...i hope this helps the ones who cant get their LCD to work.

0 Kudos

244 Views
towerer
Contributor III

Thank you very, very much!

I will try it out.

Greetings,

Manuel

Am 21.05.2014 13:25, schrieb Luis Casado:

>

Freescale Community <https://community.freescale.com/>

<https://community.freescale.com/>

>

Re: TWR-K70F120M + TWR-LCD-RGB using CodeWarrior + eGUI code example

reply from Luis Casado

<https://community.freescale.com/people/LuisCasado?et=watches.email.thread>

in /Kinetis Microcontrollers/ - View the full discussion

<https://community.freescale.com/message/404967?et=watches.email.thread#404967>

>

0 Kudos

245 Views
randybulloch
Contributor III

Hi Luis,

Thanks for your quick reply.

I unzipped & then imported the eGUI example without copying to the workspace. Then I copied example user_config.h to BSP.  Then I cleaned and built the BSP without errors.

When I build the eGUI example I get 95 errors.  One of the significant errors is shown below.

>the file 'bsp.h' cannot be opened

>(included from:

>       E:\Freescale\eGUI 3.0_v1\eGUI


I assume that the example error should be fixed by adding the location of the bsp.h file to the compiler "Include User Search Paths". Is this the correct approach?

0 Kudos

245 Views
LuisCasado
NXP Employee
NXP Employee

Where is installed oyur MQX in your machine?

I am using default path : C:\Freescale\Freescale_MQX_4_0

If you are using different, change the  MQX_ROOT_DIR

Luis

0 Kudos

245 Views
randybulloch
Contributor III

Hi Luis,

I have been debugging the eGUI application.  It fails the D4D_Init(&screen_Demo) call which returns a D4D_FALSE.  The D4D_Init() eventually calls mem_alloc_internal() procedure which fails with an error code = 4.

Is there additional modification tho the demo application I should be doing ?

0 Kudos

245 Views
LuisCasado
NXP Employee
NXP Employee

Hello,

No. Are you using the twrk70f120m_Int_Flash_DDRData_Debug configuration? I verified the project running on target. I included the user_config.h I used to build the libraries. No other configuration.

Luis

0 Kudos

245 Views
randybulloch
Contributor III

Changed the make to add include directories for twrk70120m_Int_Flash_SramData_Debug configuration.  Application makes OK.

However, when attempting to initiate debugging, the DDR_Data_Debug_PnE U-MulitLink fails to connect to the target.  A dialog box with a "Title" of "SEGGAR J-LINK V4.74" and a message of "No emulators connected via USB" appears.  The SramData configuration continues to download OK.

0 Kudos

245 Views
LuisCasado
NXP Employee
NXP Employee

If you're using Pemicro, just change the connection to Pemicro in Debug configurations.

Luis

245 Views
randybulloch
Contributor III

Luis,

This worked.  Application runs without problems.

Many thanks.  You saved me days of tedious work.

Randy

0 Kudos