Jump to content

Raw32 without Dynamic Memory Allocation


TCL987

Recommended Posts

I was attempting to implement GDISP on a Broadcom BCM20737S to control a SSD1306 over I2C and I've discovered that the BCM20737 libraries don't implement all of stdlib including the dynamic memory allocation functions malloc, free, etc.

Is there a way to use Raw32 without dynamic memory allocation?

EDIT:

Also is it possible to implement just the graphics drawing code and not GOS (no threading, etc.)

Edited by Guest
Link to comment
Share on other sites

Thank you for your reply, I've tried building my firmware with the GOS memory manager enabled but now I've run into another issue. I'm now getting unresolved references to other stdlib functions setjmp and longjmp.

Edit: ~I'm also running into some odd issues with memset on this microcontroller.

Edit2: Fixed the memset issues, but setjmp and longjmp are still missing/broken.

Link to comment
Share on other sites

uGFX can run on a bare metal system because we provide basic implementations for required things such as the memory manager and threading. Our very minimal scheduler is implemented using setjmp() and longjmp() which are stdlib functions. If you cannot provide the implementation for these functions you will not be able to use our scheduler at all.

Are you sure that the libraries that you are using are not providing these implementations?

You might want to take a look at the Alternate_RAW32_Scheduler branch where we are currently in the process of implementing a new scheduler as we had some platform dependent issues with the current/previous one. However, the default scheduler still uses the setjmp() and longjmp() functions. But along that, it is possible to implement a custom scheduler for a specific platform. When you have no luck with getting setjmp() and longjmp() up and running you might want consider providing such an implementation. There are already implementations for all Cortex-M series so you have a few examples.

Note that I will not be of much help in that task. inmarket is the guy who is working on the scheduler.

~ Tectu

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...