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
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,
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.
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 ;-)
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?
I've been having the same problem. Using CW 10.6 with MQX 4.1 and K70 I get exactly 25 errors:
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 545||C/C++ Problem|
|undefined reference to `D4D_CheckBoxGetValue'||demo_screen.c||/eGUI_twrk70f120/Sources||line 535||C/C++ Problem|
|mingw32-make: *** [eGUI_twrk70f120.elf] Error 1||eGUI_twrk70f120||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 537||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 518||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 526||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 507||C/C++ Problem|
|undefined reference to `D4D_CheckBoxGetValue'||demo_screen.c||/eGUI_twrk70f120/Sources||line 516||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 499||C/C++ Problem|
|undefined reference to `D4D_Poll'||main.c||/eGUI_twrk70f120/Sources||line 147||C/C++ Problem|
|undefined reference to `D4D_CheckBoxGetValue'||demo_screen.c||/eGUI_twrk70f120/Sources||line 497||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 487||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 479||C/C++ Problem|
|undefined reference to `D4D_CheckTouchScreen'||main.c||/eGUI_twrk70f120/Sources||line 110||C/C++ Problem|
|undefined reference to `D4D_CheckBoxGetValue'||demo_screen.c||/eGUI_twrk70f120/Sources||line 477||C/C++ Problem|
|undefined reference to `D4D_Init'||main.c||/eGUI_twrk70f120/Sources||line 134||C/C++ Problem|
|undefined reference to `D4D_SldrSetValue'||demo_screen.c||/eGUI_twrk70f120/Sources||line 443||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 432||C/C++ Problem|
|undefined reference to `D4D_SetOrientation'||main.c||/eGUI_twrk70f120/Sources||line 141||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 431||C/C++ Problem|
|undefined reference to `D4D_CheckTouchScreen'||main.c||/eGUI_twrk70f120/Sources||line 143||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 429||C/C++ Problem|
|undefined reference to `D4D_IconSetIndex'||demo_screen.c||/eGUI_twrk70f120/Sources||line 428||C/C++ Problem|
|undefined reference to `D4D_SldrSetLimits'||demo_screen.c||/eGUI_twrk70f120/Sources||line 301||C/C++ Problem|
|undefined reference to `D4D_TimeTickPut'||main.c||/eGUI_twrk70f120/Sources||line 101||C/C++ Problem|
I have built the psp and bsp files after configuring the user_config.h file. Can any of you help me?
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
I tried it with , where file edited is c:\Freescale\Freescale_MQX_4_1\config\twrk70f120m\user_config.h
and on importing...
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:
How this could be addressed?
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.
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:
&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?
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
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.
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.
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.
Thank you very, very much!
I will try it out.
Am 21.05.2014 13:25, schrieb Luis Casado:
Freescale Community <https://community.freescale.com/>
Re: TWR-K70F120M + TWR-LCD-RGB using CodeWarrior + eGUI code example
reply from Luis Casado
in /Kinetis Microcontrollers/ - View the full discussion
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
> 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?
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
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 ?
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.
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.
If you're using Pemicro, just change the connection to Pemicro in Debug configurations.
This worked. Application runs without problems.
Many thanks. You saved me days of tedious work.