TCL987 Posted August 7, 2015 Report Posted August 7, 2015 (edited) 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 August 7, 2015 by Guest
Joel Bodenmann Posted August 7, 2015 Report Posted August 7, 2015 Hello TCL987 and welcome to the community!It is indeed to possible to run RAW32 without dynamic memory. You can specify the size of your "static heap" in the configuration file. See here: http://wiki.ugfx.org/index.php?title=Ba ... ManagementLet us know should you have any other questions.~ Tectu
TCL987 Posted August 7, 2015 Author Report Posted August 7, 2015 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.
Joel Bodenmann Posted August 9, 2015 Report Posted August 9, 2015 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
TCL987 Posted August 10, 2015 Author Report Posted August 10, 2015 Thank you for the reply. For whatever reason it appears that Broadcom has not included a standard implementation of setjmp and longjmp with their toolchain. I've tried to compile it myself but have had no success.
Joel Bodenmann Posted August 10, 2015 Report Posted August 10, 2015 In that case I would suggest you trying to implement the platform dependent scheduler code as described in my previous post.We are happy to help where we can.~ Tectu
Joel Bodenmann Posted August 11, 2015 Report Posted August 11, 2015 Glad to hear that you got it working!Can you please contribute your changes back so we can add it to the official repository? Just attach the modified file(s) and/or provide a diff/patch.~ Tectu
Joel Bodenmann Posted August 16, 2015 Report Posted August 16, 2015 This might be very relevant to you: viewtopic.php?f=9&t=261~ Tectu
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now