Move JPEG buffer to SRAM3.

This commit is contained in:
iabdalkader 2018-03-27 20:33:22 +02:00
parent ee2aab62be
commit 965e7e1529
2 changed files with 16 additions and 8 deletions

View File

@ -48,6 +48,7 @@
#define OMV_MAIN_MEMORY SRAM1 // data, bss, stack and heap
#define OMV_DMA_MEMORY AXI_SRAM // DMA buffers memory.
#define OMV_FB_MEMORY AXI_SRAM // Framebuffer, fb_alloc
#define OMV_JPEG_MEMORY SRAM3 // JPEG buffer memory.
#define OMV_FB_SIZE (400K) // FB memory: header + VGA/GS image
#define OMV_FB_ALLOC_SIZE (100K) // minimum fb alloc size
@ -76,8 +77,9 @@
#define OMV_AXI_SRAM_ORIGIN 0x24000000
#define OMV_AXI_SRAM_LENGTH 512K
#define OMV_DMA_REGION_BASE OMV_SRAM3_ORIGIN
#define OMV_DMA_REGION_SIZE MPU_REGION_SIZE_32KB
// Use the MPU to set an uncacheable memory region.
//#define OMV_DMA_REGION_BASE OMV_SRAMX_ORIGIN
//#define OMV_DMA_REGION_SIZE MPU_REGION_SIZE_XXKB
/* SCCB/I2C */
#define SCCB_I2C (I2C1)

View File

@ -39,6 +39,10 @@ _ram_end = ORIGIN(OMV_MAIN_MEMORY) + LENGTH(OMV_MAIN_MEMORY);
_ffs_cache = ORIGIN(OMV_FFS_MEMORY);
#endif
#if defined(OMV_JPEG_MEMORY)
_jpeg_buf = ORIGIN(OMV_JPEG_MEMORY);
#endif
_heap_size = OMV_HEAP_SIZE; /* required amount of heap */
_stack_size = OMV_STACK_SIZE; /* minimum amount of stack */
@ -99,6 +103,12 @@ SECTIONS
. = . + OMV_FFS_BUF_SIZE;
#endif
#if !defined(OMV_JPEG_MEMORY)
. = ALIGN(4);
_jpeg_buf = .; // IDE JPEG buffer
. = . + OMV_JPEG_BUF_SIZE;
#endif
. = ALIGN(4);
*(.dma_buffer)
@ -134,14 +144,10 @@ SECTIONS
. = ALIGN(4);
*(COMMON)
. = ALIGN(4);
_jpeg_buf = .; // IDE JPEG buffer
. = . + OMV_JPEG_BUF_SIZE;
. = ALIGN(4);
_ebss = .; // define a global symbol at bss end
__bss_end__ = _ebss;
_bss_end = _ebss; // Used by gccollect
_bss_end = .; // Used by gccollect
__bss_end__ = .;
} >OMV_MAIN_MEMORY
._heap (NOLOAD) :