You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Short description: How should a sketch do memory allocations?
For example: Suppose I have an SPI display, currently using an ILI9341 which is 320 by 240 with RGB565. But might go to larger
display like ST7796 or ILI9488 which are 480 by 320. And I wish to allocate at least one full buffer for the display, maybe two.
For example, maybe I wish to have one image being read in from an SD drive and the other buffer being used to display an already
loaded buffer (and then swap)...
Currently trying stuff out on GIGA.
Note: my .conf file is already modified to allow some larger sketches to be loaded:
including:
Simply define it as part of the sketch:
Even with this, when I define the buffer in a sketch, like: uint16_t frame_buffer[320 * 240] __attribute__((aligned(16)));
The sketch fails to run and the debug output:
uart:~$ sketch
[00:00:20.212,000] <err> llext: Failed to copy regions, ret -12
Malloc:
malloc of this size appears to work:
SDRAM.malloc()
Is not in implemented in the current stuff: @mjs513 hacked up a version that appears to run: ea_malloc.zip
Which includes ea_malloc library and a hacked up SDRAM library with hard coded address to start of SDRAM.
I was also trying to generate a version of SDRam, that was trying to use the kernel k_heap code like:
But this code fails to load. Not sure about which segment ... to use. But this fails to load, again
with the failed to load region.
Device tree:
I noticed that you have a couple of branches in the Zephyr project where you have experimented with a few different devices, (GIGA Shield, and Camera) where it looks like you were allocating buffers in other areas by defining them into the device tree and overlays.
Is this the preferred way?
Would this then require us each time we change to a different display driver to update the device tree, do the build.sh, burn the bootloader and then load the sketch?
Thanks
Kurt
The text was updated successfully, but these errors were encountered:
Just to be complete the overlay file we are using includes the changes in the open PR with the &fmc changes from the branches that @KurtE already mentioned:
Describe the bug
Short description: How should a sketch do memory allocations?
For example: Suppose I have an SPI display, currently using an ILI9341 which is 320 by 240 with RGB565. But might go to larger
display like ST7796 or ILI9488 which are 480 by 320. And I wish to allocate at least one full buffer for the display, maybe two.
For example, maybe I wish to have one image being read in from an SD drive and the other buffer being used to display an already
loaded buffer (and then swap)...
Currently trying stuff out on GIGA.
Note: my .conf file is already modified to allow some larger sketches to be loaded:
including:
Simply define it as part of the sketch:
Even with this, when I define the buffer in a sketch, like:
uint16_t frame_buffer[320 * 240] __attribute__((aligned(16)));
The sketch fails to run and the debug output:
Malloc:
malloc of this size appears to work:
SDRAM.malloc()
Is not in implemented in the current stuff:
@mjs513 hacked up a version that appears to run:
ea_malloc.zip
Which includes ea_malloc library and a hacked up SDRAM library with hard coded address to start of SDRAM.
I was also trying to generate a version of SDRam, that was trying to use the kernel k_heap code like:
But this code fails to load. Not sure about which segment ... to use. But this fails to load, again
with the failed to load region.
Device tree:
I noticed that you have a couple of branches in the Zephyr project where you have experimented with a few different devices, (GIGA Shield, and Camera) where it looks like you were allocating buffers in other areas by defining them into the device tree and overlays.
Is this the preferred way?
Would this then require us each time we change to a different display driver to update the device tree, do the build.sh, burn the bootloader and then load the sketch?
Thanks
Kurt
The text was updated successfully, but these errors were encountered: