1 2 Previous Next 15 Replies Latest reply on Dec 30, 2019 5:05 AM by DheerajK_81

    copy project don't work


      I have a working project using PSOC5LP, EmWin, and a TFT display.  When I copy and paste the working project in the same workspace, the newly copied project compiles without errors but the TFT does not work when the program runs.

      I use the same "Project/Build Settings, compiler and linker" for both projects pointing to the Emwin graphics library.

      As another option, I moved the working folder away from "c:\users\myname\project" to c:\sync\PSOC to ensure the path is shorter.

      I also tried the "Archive bundle" and restore it as a new project in the same folder and workspace with the same results.

      I have no idea where to find the issue, any assistance will be appreciated.

      Update - Running the debugger the code get stuck in the GUI_Init(); function

      Code getting stuck here - Increasing the Heap size does not solve the problem.




          * We must not get here. If we do, a serious problem occurs, so go into

          * an infinite loop.




          #if defined(__GNUC__)

              if (errno == ENOMEM)








                      /* Out Of Heap Space

                       * This can be increased in the System tab of the Design Wide Resources.



















        • 1. Re: copy project don't work

          Hello Anva_2903386,


          Can you confirm that your original project is still working? Please share your project so that we can debug and provide you with a solution.


          Thanks and Regards,

          Rakshith M B

          • 2. Re: copy project don't work

            Hi Rakshith



            Thank you for your reply, Yes the original project is working, the TFT

            operate as intended.   Copy_01 is not working, the program compile

            without error but the TFT is not working.  I use the same hardware for

            both projects









            • 3. Re: copy project don't work



              Check to make sure the pin assignments match between the original and the copy.  I've found on many occasions that the pin outs assigned in my original are not always reassigned to the same pins in the copy.



              • 4. Re: copy project don't work

                Hi Len


                I checked and the pins are the same for both projects





                • 5. Re: copy project don't work

                  Hello Andre,


                  Can you remove and add the path to the source directories and additional libraries again for the copy_01 project?


                  Basically remove the existing configurations you used to integrate emWin and follow the steps mentioned in the section "Integrating the Library into PSoC Creator" of this document again for the copy_01 project.


                  Let me know if it works.




                  • 6. Re: copy project don't work

                    Hi Dheeraj



                    I removed and add the path to the sources, I tried both relative paths

                    and absolute paths, the results are still the same.  The original

                    program work Copy_01 doesn't work.



                    I decided to start a new project using the latest version of Emwin and

                    the same hardware PSOC5LP.


                    I followed the PSOC Creator document (SEGGER emWin Graphic Library

                    (emWinGraphics)5.46) to the letter.



                    I see that the code get stuck in GUI_Init(); routine



                    When I debug I see I get a hardfault.



                    The code runs up to 0x00002A02 blx    r3


                    then jumps to


                    90: CY_ISR(IntDefaultHandler)






                    0x000029DE str    r0,

                    0x000029E0 cbnz    r0, 29f2

                    0x000029E6 ldr    r3,     ; (2a54 <LCD_Init+0x88>)

                    0x000029E8 ldr    r2,

                    0x000029EA ldr    r3,     ; (2a58 <LCD_Init+0x8c>)

                    0x000029EC cmp    r2, r3

                    0x000029EE bne.n    2a0a <LCD_Init+0x3e>

                    0x000029F0 b.n    2a48 <LCD_Init+0x7c>

                    0x000029F2 ldr    r3,

                    0x000029F4 movs    r1, #c

                    0x000029F6 ldr    r3,     ; 0x24

                    0x000029F8 add    r0, sp, #4

                    0x000029FA blx    r3

                    0x000029FC mov    r3, r0

                    0x000029FE cbz    r0, 2a4c <LCD_Init+0x80>

                    0x00002A00 ldr    r0,

                    0x00002A02 blx    r3

                    0x00002A04 cmp    r0, #0

                    0x00002A06 beq.n    29e2

                    0x00002A10 str    r0,

                    0x00002A12 cbz    r0, 2a48

                    0x00000466 ldr    r3,

                    0x00000468 cmp    r3, #c

                    0x0000046A bne.n    46e <IntDefaultHandler+0xe>

                    0x0000046C b.n    46c <IntDefaultHandler+0xc>

                    0x0000046E b.n    46e <IntDefaultHandler+0xe>



                    I added the project to the same DropBox folder








                    • 7. Re: copy project don't work



                      When a project copy occurs, does the heap and stack size also get copied.


                      I sometimes receive a "CY_ISR(IntDefaultHandler)" if my stack is too small for the libraries being run.



                      • 8. Re: copy project don't work

                        Hi Dheeraj



                        I also changed the heap and stack size from the default values 0x80 and

                        0x0800 incremental all the way up to 0x800 and 0x8000 with the same results.






                        • 9. Re: copy project don't work



                          I've downloaded your projects from the dropbox.  I've built both projects.  All warnings.  No Errors.


                          You know your project.  I don't have the peripherals required.  Is it possible for me to run this on a PSoC5 without the peripherals?  Would I run into the "CY_ISR(IntDefaultHandler)" very early in execution?


                          I noticed there were some significant differences in the two projects.   One of them has more files at the project root including a "CortexM0p".  Was this project originally targeted for a PSoC6?



                          • 10. Re: copy project don't work

                            Hi Len



                            Thank you for your prompt response.  I will build a new project with no

                            peripherals and minimum code, will send back asap



                            The project that is working is about Two years old, I had less

                            experience then and added many files (maybe unnecessary) to get it to

                            work.  What I don't understand, if I copy the project in the same

                            workspace in PSOC Creator the copy don't work.






                            • 11. Re: copy project don't work



                              I'll give the minimized projects a try when you have it available.


                              One thing to note if you were not aware of it:  In debug mode, there is a "Call Stack" window

                              Once you enter the "CY_ISR(IntDefaultHandler)", you might be able to trace from the Call Stack what was executed before.  This is not a guarantee since the IntDefaultHandler may have come from an attempt to call a "real" interrupt.  The IntDefaultHandler is also called when program faults occur such as DivideByZero math, some stack overflows and other conditions.



                              • 12. Re: copy project don't work

                                Thanks Len I will check this

                                • 13. Re: copy project don't work

                                  Hi Len



                                  Below the Call stack -



                                  I am still working on a new project with minimal peripherals



                                  From below does this mean the last call was -*2 GUI_F6x8_TL8859_1()

                                  ?????? ?????? 0x000057B2 (All) *






                                  • 14. Re: copy project don't work



                                    I suspect since you are using emWin lib calls, this is a call to a function in that library.  The "??????" in the File and Line columns of the "GUI_" stack levels are due to not having File and Line references in the library.



                                    1 2 Previous Next