Announcement

Collapse
No announcement yet.

file_Exec() and program size

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • file_Exec() and program size

    Hi,

    I am currently working on a rather larger project on a Gen4-uLCD-50DTC-CLB.
    The program is rather advanced, and therefore pretty big (~38000 bytes, and has to run from FLASH)

    I implemented the call of an external function with file_Exec(), and everything worked fine.
    I then increased (a lot) the size of some arrays, and the file_Exec() is now not working all the time.

    If I reduce the size of my arrays, I can get it to work.

    I tried increasing the STACK up to 4000, with no success.


    Basically, the external function a keyboard, allowing the end-user to label some memories.
    When the user is done typing, the function returns a string.

    I can call the function once, and all is fine.
    When I call it again, it does not launch. My main program does not crash, but I am unable to get my keyboard.


    Is there any parameter that I need to take care of when callling an external function ?
    I already optimized my program a lot to reduce RAM usage, but I can not make it any better for now (unless there is a way to for the type of variables to boolean, using just 1 bit ?)

    Thanks.

  • #2
    Hello Vincent,

    If you want you can zip your project to me at john dot asuncion at 4dsystems dot com dot au
    so I can further analyze your problem.

    Best Regards,
    Kevin

    Comment


    • #3
      Originally posted by John Kevin View Post
      Hello Vincent,

      If you want you can zip your project to me at john dot asuncion at 4dsystems dot com dot au
      so I can further analyze your problem.

      Best Regards,
      Kevin
      Done.
      Thanks.

      Comment


      • #4
        For futur questions, here was the issue :

        The function I was calling with the file_Exec() was not freeing memory before returning. Therefore, after 1 or several call, there would be a memory space issue.
        The solution was to add, in the external function, a mem_Free(hndl); just before the return instruction.

        Comment

        Working...
        X