FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  


Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support

New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: Unable to allocate dynamic memory  (Read 916 times)


  • Newbie
  • *
  • Posts: 3
    • View Profile
Unable to allocate dynamic memory
« on: July 27, 2018, 08:10:02 PM »

  I am having no luck in allocating any memory on a Vinculum-II device.  My code so far is very small, simply sets up a couple of test tasks, UART and then outputs strings via the UART. 

  When I attempted to use calloc to allocate some RAM (structure in question is 9 bytes), it returns a NULL.  I have tried with malloc also, same response even for a smaller value of 4.  I am linking in the stdlib.a library along with stdio.a ioctl.a errno.a uart.a and kernel.a

  I have also tried the call vos_malloc(4), which also returns a NULL.

A call to vos_heap_space gives me results of around 10KB for both free and maximum, so it seems like there is a heap configured and available.

Am I missing some crucial configuration command or option?  I assume that I should be able to allocate memory within a task?  I have also tried increasing the size of the task's stack (just in case :) ) and that has had no joy either.

Hope someone can point me in the right direction, thanks.

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 339
    • View Profile
Re: Unable to allocate dynamic memory
« Reply #1 on: August 02, 2018, 09:25:29 AM »


Please check AN_157 Vinculum II Memory Management for all available information on memory management.

The Thread Manager can also be useful. See the Help menu with in the IDE:

Have you considered our latest MCUs?
A more recent solution is to use the FT90x which allows more customisation than the Vinculum products.

There are significant benefits of FT90x:

-Eclipse based IDE
-Source code for API drivers is provided
-Significant performance improvement
-Actively in development by R&D
-Improved documentation and software examples

Best Regards,
FTDI Community