AN204388 Getting Started For FM4 S6E2DH (GAT-D) Associated Part Family: S6E2DH Series The purpose of this guide is to provide a brief introduction of the graphics resolution of S6E2DH designated by Cypress. Contents 1 Preface .....................................................................1 1.1 About This Guide .............................................1 2 Overview ..................................................................1 3 Utilization of GAT-D Tool Step by Step ....................2 3.1 Create a New Project .......................................3 3.2 Import Images ..................................................4 3.3 Page Creation ..................................................6 3.4 Flow Design Table Creation........................... 17 3.5 Source Generation......................................... 21 3.6 Add Generated Source to IAR project ........... 22 3.7 Download and Run after Build ....................... 24 4 Application of GAT-D .............................................. 26 4.1 Event Management ........................................ 26 4.2 User’s Source Code ....................................... 27 4.3 Display Simulation ......................................... 29 1 Preface 1.1 About This Guide 5 6 7 8 4.4 Sprite Special Effect ...................................... 30 4.5 Touch Panel Resolution................................. 31 4.6 Source Generate Option ................................ 32 GAT-D API ............................................................. 34 5.1 Interface Description ...................................... 35 5.2 Join with Source ............................................ 37 Program.................................................................. 38 6.1 Debugging Mode ........................................... 38 6.2 Product Mode ................................................ 39 Sample Project Instruction...................................... 39 7.1 Construction .................................................. 39 7.2 Function Overview ......................................... 41 Document History ................................................... 42 The purpose of this guide is to provide a brief introduction of the graphics resolution of S6E2DH designated by Cypress. This guide explains: 1. How to work with Graphics Authoring Tool for S6E2DH (GAT-D). 2. Advanced application of GAT-D. 3. How to integrate the generated source and Graphics Driver to embedded software. 4. Program to internal Flash and external Flash. 5. Construction of sample. Note: This guide is described with example while using EWARM of IAR Systems AB. For other IDE please refer it properly. 2 Overview Follow figure shows the exact relationship of each component. www.cypress.com Document No. 002-04388 Rev. *A 1 Getting Started for FM4 S6E2DH (GAT-D) Figure 1. Overview PC environment GAT-D Toolcreation Project Images .Bmp .Jpeg .Png .Gif .etc. Image convert Display configuration I Display simulation m a Source generation g e s Embedded device Program Flash image (.Mhx) External flash IAR EW IDE Generated source GAT-D API.a .a GAT-D API . B Library m Graphics p . Driver J Build/Program basic_graphics.a util.a S6E2DH internal flash p Other function source eUser g edited . P n GAT-D Tool and GAT-D gAPI Library could be found in S6E2DH-Graphics resolution-Ver1.0.zip. . GAT-D Tool: S6E2DH-Graphics resolution-Ver1.0\01. GAT-D Tool\01. Installer\GAT-D_xxx.exe G i GAT-D API Library: S6E2DH-Graphics resolution-Ver1.0\02. GAT-D API Library\01. IAR\01. bin\GAT-D API.a f Graphics Driver: In the package of S6E2D-2DGraphicsDriver-v1.00.798-IAR.zip . e S6E2D-2DGraphicsDriver-v1.00.798-IAR \01_bin\arm_none_iar\release\basic_graphics.a t c S6E2D-2DGraphicsDriver-v1.00.798-IAR \01_bin\arm_none_iar\release\util.a . 3 Utilization of GAT-D Tool Step by Step The follow steps explain how to use GAT-D Tool to arrange a video (a series of frame) to display on S6E2DH Series based LCD device. 1. Create a new project 2. Import images 3. Page creation 4. Flow Design Table creation 5. Source generation 6. Add generated source to IAR project 7. Download and run after build Also assumed conditions: 1. GAT-D Tool installed 2. IAR Embedded Workbench installed (ver.7.10 or upper) 3. Image material prepared 4. A S6E2DH series based LCD device and ICE (I-Jet recommend) prepared www.cypress.com Document No. 002-04388 Rev.*A 2 Getting Started for FM4 S6E2DH (GAT-D) 3.1 Create a New Project Step1: Open GAT-D Tool, the tool will open as follow. Figure 2. Opened GAT-D Tool Window Step2: Click “Project” menu and click “new” as follows Figure 3. New Project Menu Step3: Input the name and select LCD Size. www.cypress.com Document No. 002-04388 Rev.*A 3 Getting Started for FM4 S6E2DH (GAT-D) Figure 4. New Project Step 1 of 2 Step4: Click “Next” and then click “Finish” a new project will create as follow. Figure 5. New Project 3.2 Import Images Step1: Click “Image Library” www.cypress.com Document No. 002-04388 Rev.*A 4 Getting Started for FM4 S6E2DH (GAT-D) Figure 6. Image Library Tab Step2: Right click “Stencil” in “Image Library”, and Click “Add New Image” in the menu. Figure 7. Add New Image Menu Step3: Go to the path and select images, image will list as follow. Note: Image’s file type support bmp, png, jpeg, gif, psd. Figure 8. Added Image List www.cypress.com Document No. 002-04388 Rev.*A 5 Getting Started for FM4 S6E2DH (GAT-D) 3.3 Page Creation 3.3.1 Create a new Page Step1: Right click “Page” folder, and click “New Page” in the menu. Figure 9. New Page Menu Then a new page is created as follow. Figure 10. Created New Page www.cypress.com Document No. 002-04388 Rev.*A 6 Getting Started for FM4 S6E2DH (GAT-D) 3.3.2 Page Configuration Step1: Right Click “Page1” and click “Properties…” in menu Figure 11. Page Property Menu Step2: Check “Enable”, the background color of page could be changed. Select RGB Color, if there is nothing on the page, LCD will display background color. Figure 12. Page Property Window www.cypress.com Document No. 002-04388 Rev.*A 7 Getting Started for FM4 S6E2DH (GAT-D) 3.3.3 Add Window to Page Step1: Select window from drawn tool bar, left click to work area, window is added as follow. If want to add several window to a layer, you have to set the layer option to multi-window layer, otherwise could only add one window to a layer Figure 13. Add Window Step2: Double click window in work area, window configuration window will displays. Configure them. Figure 14. Window Property www.cypress.com Document No. 002-04388 Rev.*A 8 Getting Started for FM4 S6E2DH (GAT-D) If want add several image to one window, you have to check “Blend Operator” Figure 3-14 shows difference of image in windows that are set to “Blend Operator” or not Figure 15. Blend Operator External Flash Image in window set to “Blend Operator” Image in window not set to “Blend Operator” S6E2DH MCU VRAM GDC Blend Engine GDC Display Engine LC D The setting of “Alpha-blending”, will effects blend result of image on the window with background. Figure 16. Window Alpha Blend Illustrations Illustrations A: www.cypress.com Document No. 002-04388 Rev.*A 9 Getting Started for FM4 S6E2DH (GAT-D) Illustrations B: Illustrations C: Illustrations D: www.cypress.com Document No. 002-04388 Rev.*A 10 Getting Started for FM4 S6E2DH (GAT-D) Illustrations E: Illustrations F: Above illustration are from page1 of sample in S6E2DH-Graphics resolution-Ver1.0\03. Sample\01. GAT-D_Tool\01. Training\Training.zip. 3.3.4 Add Images to Window Step1: Select image from “Image Library”, drag it to a selected window and drop, image is added as follow. Figure 17. Added Image to Window Step2: Double click image, image configuration window will displays. Configure them www.cypress.com Document No. 002-04388 Rev.*A 11 Getting Started for FM4 S6E2DH (GAT-D) Figure 18. Image Property Window For behavior of Alpha Blend configuration, refer to following illustrations. Figure 19. Alpha Blend Illustrations Image used: RGBA : (255, 255, 255, 0) Opaque Illustration A: www.cypress.com Document No. 002-04388 Rev.*A 12 Getting Started for FM4 S6E2DH (GAT-D) Illustration B: Illustration C: www.cypress.com Document No. 002-04388 Rev.*A 13 Getting Started for FM4 S6E2DH (GAT-D) Illustration D: Illustration E: Illustration F: Illustration G: www.cypress.com Document No. 002-04388 Rev.*A 14 Getting Started for FM4 S6E2DH (GAT-D) Illustration H: Illustration I: Illustration J: Illustration K: www.cypress.com Document No. 002-04388 Rev.*A 15 Getting Started for FM4 S6E2DH (GAT-D) Illustration L: Illustration M: Illustration N: Above illustration are from page4 of sample in S6E2DH-Graphics resolution-Ver1.0\03. Sample\01. GAT-D_Tool\01. Training\Training.zip. www.cypress.com Document No. 002-04388 Rev.*A 16 Getting Started for FM4 S6E2DH (GAT-D) Step3: Add needed images and configure them. Note: After configuration of a page, could preview it from “View” -> “Page Preview Window”. Figure 20. Edited Page View 3.3.5 C r e a t e Al l P a g e s Create more pages if needs. Figure 21. Edited All Pages View 3.4 Flow Design Table Creation 3.4.1 Add a Flow Design Step1: Right click “FlowDesignTable” folder, and click “New Flow Design” in the menu. www.cypress.com Document No. 002-04388 Rev.*A 17 Getting Started for FM4 S6E2DH (GAT-D) Figure 22. Add New Flow Design Menu Step2: Double click the new Flow Design, window displays as follow, click “Action Table” directly because don’t use event if display startup only. Figure 23. Flow Design Window Action Table Tab Step3: Click “+” to add actions, and select page for action to display. Note: Action is something like a small video (a series of frame), www.cypress.com Document No. 002-04388 Rev.*A 18 Getting Started for FM4 S6E2DH (GAT-D) Figure 24. Add Action View Step4: Select “Startup Action”, which to decide the action to be displayed after power on. Step5: Click “Object Timeline Editor”, “Timeline Editor” window will display. Figure 25. Timeline Editor Window Step6: Select the frames where want to display the image, double click then select “Frame Insert.” Note: The head number is frames. Figure 26. Frame Insert Menu www.cypress.com Document No. 002-04388 Rev.*A 19 Getting Started for FM4 S6E2DH (GAT-D) Step6: Select the frames where want to display the image, double click then select “Frame Insert…” Note: The head number is frames. Figure 27. Frame Insert Menu Step7: Insert frame for each image. If display each image 5 frames and then next, the time line is as follow. Figure 28. Inserted Frame View Step8: Check “Display is Clear in Final Frame” if display nothing after action play over. Change “Frame Rate” to 60fps because frame rate of S6E2DH series is 60fps. Click “▶” can simulate action in Display window. Figure 29. Display Option www.cypress.com Document No. 002-04388 Rev.*A 20 Getting Started for FM4 S6E2DH (GAT-D) 3.4.2 Add All Flow Design More Flow Design also could be added, but one Flow Design is enough for one program. 3.5 Source Generation Step1: Click “Compile” and then click “Resource…” to open “Operation Code and Data Library Generation” window. Figure 30. Source Generation Menu Step2: Click “Browse” to select path where source generated to. Select Flow Design if there are any. Click “OK” to generate source with other options default. Figure 31. Source Generation Option Window Step3: Follow window means source generation success, and generated source could be found in selected path in step2. www.cypress.com Document No. 002-04388 Rev.*A 21 Getting Started for FM4 S6E2DH (GAT-D) Figure 32. Code Generation Completed Window 3.6 Add Generated Source to IAR project Step1: Get Graphics Driver package S6E2D-2DGraphicsDriver-v1.00.798-IAR.zip, extract it to any path. Find the S6E2DH-Graphics resolution-Ver1.0-IAR\03. Sample\02. IAR\GAT-D Proj.zip and extract it to 04_sample of Graphics Driver’s extracted path. Figure 33. Sample Path Step2: Open IAR project. Figure 34. Sample Project File www.cypress.com Document No. 002-04388 Rev.*A 22 Getting Started for FM4 S6E2DH (GAT-D) Figure 35. Project Remove Menu Step4: Delete all source in path: S6E2D-2DGraphicsDriver-v1.00.798-IAR.zip\04_sample\GAT-D Proj\source\Demeter\GenCode , then copy all new generated source the path. Figure 36. Source Generate Path Step5: Add all new generated sources (*.c files only are OK) from S6E2D-2DGraphicsDriver-v1.00.798-IAR \04_sample\GAT-D Proj\source\Demeter\GenCode to IAR project. Figure 37. New Source Add Menu Note: The minimum call of API is implemented in main.c. www.cypress.com Document No. 002-04388 Rev.*A 23 Getting Started for FM4 S6E2DH (GAT-D) Figure 38. Minimum Call of API 3.7 Download and Run after Build Step1: Right click IAR project group, select “Rebuild All” in the menu to build project. Figure 39. Rebuild Menu Step2: Confirm no errors. Figure 40. Build Result Step3: Click “Download and Debug” button on IAR EW IDE to down program Figure 41. Debug Button www.cypress.com Document No. 002-04388 Rev.*A 24 Getting Started for FM4 S6E2DH (GAT-D) Step4: Click “Go” button to run. Figure 42. Run Button Step5: Confirm display on LCD is the same action selected on “Action Table”. Figure 43. Startup Action View www.cypress.com Document No. 002-04388 Rev.*A 25 Getting Started for FM4 S6E2DH (GAT-D) 4 Application of GAT-D 4.1 Event Management Follow figure described common model of a graphics based embedded software. Figure 44. Embedded Software Model Embedded software model 1 * : Startup/Action1 Page1 Even1/Action2 Event7/Action1 Event2/Action3 Event1/Action2 Page2 Page4 Event1/Action2 Event4/Action5 Event3/ Action4 Event5/Action3 Page3 Use GAT-D, above function can be described in PC side, and generate source automatically, instead of work in embedded side. With this, in embedded side only need to implement event confirmation, if one event is triggered, Call GAT-D API: GhcProject_sendEvent_Ex(eGEN_xxxx) the referenced action will be displayed. xxxx: event name. See 5.1.6 also for details. Follows are the sample. Figure 45. Sample of Action Table www.cypress.com Document No. 002-04388 Rev.*A 26 Getting Started for FM4 S6E2DH (GAT-D) Figure 46. Sample of Event Table Above illustration are from Flow Design of sample in S6E2DH-Graphics resolution-Ver1.0\03. Sample\01. GATD_Tool\01. Training\Training.zip. For event type, there are three kinds: System, Hardware and Object. In PC side there is no difference actually. 4.2 User’s Source Code Beside with event management, GAT-D provides a place for user to input standard C source code. As follows: Figure 47. User’s Code View www.cypress.com Document No. 002-04388 Rev.*A 27 Getting Started for FM4 S6E2DH (GAT-D) Double click “(None)”, an edit window will display. Input any standard C code as follow. Figure 48. User’s Code Edit Window Inputted code will be automatically added with: Figure 49. Edited Code View With the “Sequence” selected “Code > Action”, the code will be implemented before action display. If want to implement after action display, could select “Action > Code” like: www.cypress.com Document No. 002-04388 Rev.*A 28 Getting Started for FM4 S6E2DH (GAT-D) Figure 50. User’s Code Order 4.3 Display Simulation After edited event table and action table, the behavior can be simulated in GAT-D. Click “Simulate” to display “Flow Design Simulator” window. Figure 51. Simulate Button Click “▶” will play “Startup Action”, then select event click “Send”, action will be played according to description of event table. www.cypress.com Document No. 002-04388 Rev.*A 29 Getting Started for FM4 S6E2DH (GAT-D) Figure 52. Simulation Window 4.4 Sprite Special Effect GAT-D V01 support sprite special effect, follow figure show where to set it. Figure 53. Sprite Special Effect 4.4.1 Blink After set special sprite effect mode, the special effect could be set according follow figure. www.cypress.com Document No. 002-04388 Rev.*A 30 Getting Started for FM4 S6E2DH (GAT-D) Figure 54. Sprite Blink For blink effect, it could be accomplished by edit object time line to display and none display repeatedly, but special effect set here could save memory of embedded side and save time to edit object time line, special sprite effect could do blink endlessly. 4.5 Touch Panel Resolution S6E2DH device generally equipped LCD, also mainly equip touch panel. The most common touch panel operation is push button. To decide whether it is pushed on a button, need get the pushed coordinate and the button area. That’s means manage all button area of each page. Usually button designed as a single object, and the object coordinate already managed by GAT-D. So GAT-D could give out the coordinates of a certain button. Besides, GAT-D also could give out the currently displayed page, so function software doesn’t need manage a state transition of display. If a push event happened, get current displayed page firstly, and get coordinate of button on the page then, with the pushed coordinate, whether it is a true button push could be cleared. If the push event is a display referenced, call GAT-D API: GhcProject_sendEvent_Ex() could display the actual action. See 4.1. 4.5.1 Button Name To support LCD device which equipped touch panel, GAT-D API in embedded side supply an API GhcFunc_getButtonAreaByIndex() for user. Coordinate of button area can be got by calling the API. If an image or an object is a button and want to get its coordinate area by calling the API, in PC side need to check “Button” and input the “Button name”. The “Button name” must apply to standard C expression which is used in calling API. See 5.1.7 also for details. www.cypress.com Document No. 002-04388 Rev.*A 31 Getting Started for FM4 S6E2DH (GAT-D) Figure 55. Button Option 4.5.2 Page Name GAT-D API supply an API of GhcFunc_getCurrentPage () to user for getting current displayed page in embedded side. The page will return with define of page name, so name of page must apply to standard C expression. See 5.1.9 also for details. Figure 56. Page Name 4.6 Source Generate Option S6E2DH series supply “USB Direct Programmer” to program flash image to internal flash and external flash, with this can program GAT-D’s image data to external flash directly. GAT-D can generate image data to flash image file which apply to “USB Direct Programmer”. Check “Convert into BinaryFile”, GAT-D will generate all image data to .mhx file. www.cypress.com Document No. 002-04388 Rev.*A 32 Getting Started for FM4 S6E2DH (GAT-D) Figure 57. Source Generation Option “Image Data Offset (Hex)” is the start address of external flash. Value is set to 0xC0000000 by default which is the start address of external flash used by Graphics Driver. The start address must same with setting of “USB Direct Programmer” while download. Figure 58. Setting View of Programme r www.cypress.com Document No. 002-04388 Rev.*A 33 Getting Started for FM4 S6E2DH (GAT-D) 5 GAT-D API Follow figure explains where the interface is, and overview software. Figure 59. Position of API Embedded device Other function source Graphics application Other application Interfac 2* GAT-D API e Generate 1* Source Library Graphics Driver Hardware (S6E2DH) Other lib Other Driver 1* and 2*: User function source also could access Hardware or Graphics Driver, but not recommended Follow table explains interface of GAT-D API Library and Generate source give out: No. Prototype Note 1 TGhcBool GhcProject_load(TGhcU32 a_mcuMemorySize, TGhcU32 a_displayListSize) Refer to 4.1.1 2 TGhcBool GhcIrisInitialize(void) Refer to 4.1.2 3 TGhcBool GhcProject_setStartupAction() Refer to 4.1.3 4 TGhcBool GhcProject_RunAction() Refer to 4.1.4 5 TGhcBool GhcProject_StopRuningAction(void) Refer to 4.1.5 6 void GhcProject_sendEvent_Ex(EGhcEventName eEventName) Refer to 4.1.6 7 TGhcInteger GhcFunc_getButtonAreaByIndex(TGhcInteger a_Index, TGhcS32* a_pBtnTpLft_X, TGhcS32* a_pBtnTpLft_Y, TGhcS32* a_pBtnBtmRt_X, TGhcS32* a_pBtnBtmRt_Y) Refer to 4.1.7 8 TGhcInteger GhcFunc_getPageOfButtonByIndex(TGhcInteger a_Index, TGhcU32* a_pPageId) Refer to 4.1.8 9 TGhcInteger GhcFunc_getCurrentPage(TGhcU32* a_pCurrentPageId) Refer to 4.1.9 www.cypress.com Document No. 002-04388 Rev.*A 34 Getting Started for FM4 S6E2DH (GAT-D) 5.1 Interface Description 5.1.1 GhcProject_load Function Parameter Return Load GAT-D project data in generated source Type Name Description TGhcU32 1* a_mcuMemorySize Not used , set to 0 TGhcU32 a_displayListSize Not used , set to 0 TGhcBool 2* True: success; False: fail 1*: TGhcU32 is typedef of unsigned int Note 5.1.2 2*: TGhcBool is typedef of bool GhcIrisInitialize Function Parameter Return Graphics driver initialization Type Name Description Void - - TGhcBool True: success; False: fail Note 5.1.3 GhcProject_setStartupAction Function Parameter Return Set action which will be played at startup Type Name Description Void - - TGhcBool True: success; False: fail The action to set is selected in GAT-D Tool. Note Refer to user’s manual of GAT-D for details. Call GhcProject_RunAction () to display. 5.1.4 GhcProject_RunAction Function Parameter Return Note 5.1.5 Play the startup action Type Name Description Void - - TGhcBool True: success; False: fail Should be called after calling of GhcProject_setStartupAction () G h c P r o j e c t _ S t o p R u n i n g Ac t i o n Function Parameter Return Note www.cypress.com If there is an action playing, stop the playing. Type Name Description Void - - TGhcBool True: success; False: fail This calling should be arranged in another routine different with action is playing in. Document No. 002-04388 Rev.*A 35 Getting Started for FM4 S6E2DH (GAT-D) 5.1.6 G h c P r o j e c t _ s e n d E ve n t _ E x Function Parameter Return Note Play the action which is referred to given event Type Name Description EGhcEventName eEventName Given event name 1* Void - The reference between action and event is set in Event Table of GAT-D Tool. See 4.1 Event also for details 1*: “eGEN_” should be added before event name. 5.1.7 G h c F u n c _ g e t B u t t o n A r e a B yI n d e x Function Parameter Return Get the area of button by given button name Type Name Description TGhcInteger a_Index Given button name 2* TGhcS32* 1* a_pBtnTpLft_X Address to save x coordinate of top left corner TGhcS32* a_pBtnTpLft_Y Address to save y coordinate of top left corner TGhcS32* a_pBtnBtmRt_X Address to save x coordinate of bottom right corner TGhcS32* a_pBtnBtmRt_Y Address to save y coordinate of bottom right corner TGhcBool True: success; False: fail 1*: TGhcS32 is typedef of signed int. Note 5.1.8 2*: Same with inputted name while set object’s button option G h c F u n c _ g e t P a g e O f B u t t o n B yI n d e x Function Parameter Return Note 5.1.9 Get the page id which button on by given button name Type Name Description TGhcInteger a_Index Given button name 1* TGhcU32 a_pPageId Address to save id of page 2* TGhcBool True: success; False: fail 1*: Same with inputted name while set object’s button option 2*: The id is defined of page name in GAT-D Tool. GhcFunc_getCurrentPage Function Parameter Return Note www.cypress.com Get the current page id displayed on LCD Type Name Description TGhcU32 a_pCurrentPageId Address to save id of page 1* TGhcBool True: success; False: fail 1*: The id is defined of page name in GAT-D Tool. Document No. 002-04388 Rev.*A 36 Getting Started for FM4 S6E2DH (GAT-D) 5.2 Join with Source Follow figure explains how to use interface to join with user’s source. Figure 60. How to Join with User’s Source Embedded Graphics software 3* Main routine 3* Other routine Startu p Calling GhcProject_load Calling GhcIrisInitialize Calling GhcProject_setStartupA ction Start 2* GhcProject_RunActi on GhcFunc_getCurrentPa ge Calling Loop buttons GhcFunc_getButtonArea ByIndex Calling Calling 1* Event ? No Yes Calling 1* GhcProject_sendEv ent_Ex No Push? Yes GhcProject_StopRuning Action Calling Throw Event 1*: The calling will not return until action playing complete or never return if its endless loop action, in this case, the only method is calling Ghcproject_StopRuningAction () in an interrupt routine. 2*: Assume it is operation in touch panel detection routine. 3*: These sources are implemented by GAT-D user. www.cypress.com Document No. 002-04388 Rev.*A 37 Getting Started for FM4 S6E2DH (GAT-D) 6 Program 6.1 Debugging Mode While debugging, there are two methods to program internal and external flash if used Hyper Bus based external flash. If use HSSPI base external flash that would be Method A. Method A: Figure 6-1 Program Method A of Debug Embedded device PC environment Program GAT-D Tool Flash image (.mhx) External flash Use S6E2DH PC programmer IAR EW IDE Generated source Build/Program S6E2DH internal flash Others Use debugger Method B: Figure 6-2 Program Method B of Debug Embedded device PC environment Flash image (.mhx) GAT-D Tool External flash IAR EW IDE Generated source Build/Program S6E2DH internal flash Others Use debugger Note: Images generate to C source, also be programed to external flash. GAT-D Tool to generate bin file or not could be selected in tool. Refer to user’s manual of GAT-D for details. www.cypress.com Document No. 002-04388 Rev.*A 38 Getting Started for FM4 S6E2DH (GAT-D) 6.2 Product Mode Follow figure shows how to program product after development. Figure 3. Program of Product Embedded device PC environment Program GAT-D Tool Flash image (.mhx) External flash Use S6E2DH PC programmer IAR EW IDE Generated source Build/Program Others S6E2DH internal flash Use S6E2DH PC programmer S6E2DH “USB Direct Programmer” support both internal and external (HSSPI and Hyper Bus) flash. Please refer to user’s manual of “USB Direct Programmer” for details. Programmer of Hyper Bus based flash: USBDIRECT_V01L16c03_for_STK. Could 00_s6e2dh_demeter_sw_framework\progtool of S6E2D-2DGraphicsDriver-v1.00.798-IAR.zip 7 Sample Project Instruction 7.1 Construction find it in Sample project is at: 03. Sample\02. IAR\ 02. S6E2DH_Demo_Washmachine\S6E2DH_Demo_Washmachine Project.zip, but the compiling will not success unless put it to 04_sample of S6E2D-2DGraphicsDriver-v1.00.798-IAR.zip ‘s extract path. Follow figure shows construction of sample project: www.cypress.com Document No. 002-04388 Rev.*A 39 Getting Started for FM4 S6E2DH (GAT-D) Figure 4. Sample Project Construction PC environment IAR EW IDE Sample Compile GAT-D Tool project Link Generated source (1*) source.a User edited Other function source GAT-D API.a .a GAT-D API Library Graphics Driver basic_graphics.a util.a 1*: Include or not include image to external flash is OK www.cypress.com Document No. 002-04388 Rev.*A 40 Getting Started for FM4 S6E2DH (GAT-D) 7.2 Function Overview In path: 03. Sample\01. GAT-D Tool is a sample used GAT-D and S6E2DH_Demo_Washmachine Project.zip in path: 03. Sample\02. IAR\02. S6E2DH_Demo_Washmachine is an embedded software sample use generated source which generated by tool sample. Note: The debugging method is using Method A. (Checked Convert into BinaryFile while source generation) The summary function of these samples is as follows. Figure 5. Sample Function S6E2DH Wash machine Startup/Action1 1 * : Spansion logo Action1 final frame Next/Action2 Next/Action1 Back/Action1 Setting Action2 final frame Washing Action 4 repetition Back/Action2 Next/ Action3 Selection Next/Action4 Action3 final frame 2 * : Startup/Action1: Event/LCD Display Action 1 * :2 Selection * Action3 final frame : State LCD display Spansion logo: Next event is Touch Spansion logo Setting: Back event is press “Back” button on LCD Next event is press “Next” button on LCD Selection: Back event is press “Back” button on LCD Next event is press “Next” button on LCD Washing: Next event is press “Stop” button on LCD www.cypress.com Document No. 002-04388 Rev.*A 41 Getting Started for FM4 S6E2DH (GAT-D) 8 Document History Document Title: AN204388 - Getting Started for FM4 S6E2DH (GAT-D) Document Number: 002-04388 Revision ECN Orig. of Change Submission Date Description of Change ** TOAO 07/01/2015 Initial release *A 5028487 TOAO 12/04/2015 Migrated Spansion Application Note “S6E2DH_AN709-00024” to Cypress format www.cypress.com Document No. 002-04388 Rev.*A 42 Getting Started for FM4 S6E2DH (GAT-D) Worldwide Sales and Design Support Cypress maintains a worldwide network of offices, solution centers, manufacturer’s representatives, and distributors. To find the office closest to you, visit us at Cypress Locations. PSoC® Solutions Products Automotive cypress.com/go/automotive psoc.cypress.com/solutions Clocks & Buffers cypress.com/go/clocks PSoC 1 | PSoC 3 | PSoC 4 | PSoC 5LP Interface cypress.com/go/interface Cypress Developer Community Lighting & Power Control cypress.com/go/powerpsoc Memory cypress.com/go/memory PSoC cypress.com/go/psoc Touch Sensing cypress.com/go/touch USB Controllers cypress.com/go/usb Wireless/RF cypress.com/go/wireless Spansion Products spansion.com/products Community | Forums | Blogs | Video | Training Technical Support cypress.com/go/support All other trademarks or registered trademarks referenced herein are the property of their respective owners. Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone Fax Website : 408-943-2600 : 408-943-4730 : www.cypress.com © Cypress Semiconductor Corporation, 2015. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. This Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as specified above is prohibited without the express written permission of Cypress. Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. Use may be limited by and subject to the applicable Cypress software license agreement. www.cypress.com Document No. 002-04388 Rev.*A 43