Replies: 6 comments 1 reply
-
Hi, there is also a Circle kernel images can have a maximum size of 2 MBytes (including code and static data) by default. Static arrays must fit into this. If you want more, you can edit the Code snippets should be enclosed into ``` on empty lines here. |
Beta Was this translation helpful? Give feedback.
-
Great, thanks rsta2 for approving my code to update the frame buffer. I'm aware of the SetPixel and GetPixel functions but at the moment this code is simply a test run before I add the actual finsished screen update code. The KERNEL_MAX_SIZE define I have read about in the docs but I thought that was for the actual kernel.img file size. I will add the define flag as you suggested and test my code again. Oh, one question about the CBcmFrameBuffer , if you look at my code, I have commented out a line that creates a new CBcmFrameBuffer :
Is it better to create a new Fixed my post snippets now, thanks for that too. Your replies have certainly helped! |
Beta Was this translation helpful? Give feedback.
-
Ok, that explains things enough for me for now. Thanks again. |
Beta Was this translation helpful? Give feedback.
-
While I still have this discussion open there is another issue that I'm not sure about and that is to do with threads. I had noticed that the Circle SDK included the CScheduler and CTask classes for multitasking but I have not looked any further into these classes and if they would offer any improvement or stability to my code. |
Beta Was this translation helpful? Give feedback.
-
The pthread support in addon/linux is very limited and has only be implemented in Circle to be able to port the accelerated graphics support. You have to include The native cooperative task support in Circle is described here. Have a look at the sample/19-tasks. |
Beta Was this translation helpful? Give feedback.
-
Brilliant! I really appreciate your help. I've got 80% of this working now and I will post a link to the finished project of XT Emulator for RPi built with the Circle SDK. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
Dabbling with the SDK and quite impressed with what can be achieved using the circle SDK.
I'm part way through porting some emulator code to interface with the circle SDK. I've wrritten this small test program to update the framebuffer pixels but not quite sure my method is the correct and fastest way to do this. Below is my not so impressive code which is for testing purposes:
Also, what is the largest static array that can be created ?
I've had some issues with the kernel freezing when declaring global static arrays for example:
uint32_t vgaframebuffer[1024][1024];
uint32_t memorybuffer[8192];
I know creating large dynamic arrays is always preferred using malloc but I have no idea what is the largest static array that can be created using circle kernel for say the Raspberry 1 or 2, whithout exhausting the global heap?
Thanks for reading and any advice much appreciated. Sorry about the code above not formatting correctly but I did quote in code symbols.
Beta Was this translation helpful? Give feedback.
All reactions