OV7670 interfacing with LPC1857

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OV7670 interfacing with LPC1857

567 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by dhaval.chauhan on Tue Apr 12 05:43:00 MST 2016
I have MCB1857 development board and OV7670 camera module.I want to display image taken by camera module in Display of development board.

I have used source code "SCTCameraInterface_software_lpc1857" given on NXP website.When i programmed binary produced in Keil for this project , it is not working.

So i took source code of camera and merged it with "freertos_blinky" example code.Here i have used main function of Camera code as one thread.I am getting following error:
-------------------------------------------------------------------------------------------------------
Finished building: ../example/src/SCTCamDemo.c

Building target: freertos_blinky.axf
Invoking: MCU Linker
arm-none-eabi-gcc -nostdlib -L"C:\NXP\workspace\lpc_chip_18xx\Debug" -L"C:\NXP\workspace\lpc_board_keil_mcb_1857\Debug" -Xlinker -Map="freertos_blinky.map" -Xlinker --gc-sections -mcpu=cortex-m3 -mthumb -T "freertos_blinky_Debug.ld" -L C:\NXP\workspace\freertos_blinky\Debug -o "freertos_blinky.axf"  ./freertos/src/FreeRTOSCommonHooks.o ./freertos/src/croutine.o ./freertos/src/event_groups.o ./freertos/src/heap_3.o ./freertos/src/list.o ./freertos/src/port.o ./freertos/src/queue.o ./freertos/src/tasks.o ./freertos/src/timers.o  ./example/src/Cam_OV7670.o ./example/src/FraBufQ.o ./example/src/GLCD_LPC18xx.o ./example/src/I2CRegIO.o ./example/src/LCDRfrsh_MCB1800.o ./example/src/SCTCamDemo.o ./example/src/core_cm3.o ./example/src/cr_startup_lpc18xx.o ./example/src/freertos_blinky.o ./example/src/jtag_dbg_printf.o ./example/src/lpc18xx_cgu.o ./example/src/lpc18xx_i2c.o ./example/src/lpc18xx_scu.o ./example/src/sysinit.o   -llpc_board_keil_mcb_1857 -llpc_chip_18xx
c:/nxp/lpcxpresso_8.0.0_526/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: freertos_blinky.axf section `SECT_SDRAMRAW' will not fit in region `RamLoc32'
c:/nxp/lpcxpresso_8.0.0_526/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: region `RamLoc32' overflowed by 583760 bytes
collect2.exe: error: ld returned 1 exit status
make: *** [freertos_blinky.axf] Error 1
-----------------------------------------------------------------------------------------------------------------

How to solve this issue of Ram overflow?

Regards,
Dhaval
Labels (1)
0 Kudos
2 Replies

326 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos

326 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Tue Apr 19 01:17:18 MST 2016
The error is created from the linker, which sees more memory allocation in your code than it has available according to the given linker script file.

I don't expect that the freertos_blinky example sets up the external SDRAM, but the camera example requires for sure more RAM than a blinky example.

A camera module with VGA and RGB565 mode requires 640*480*16bits = 614.400bytes per frame buffer.
This for sure does not fit into the internal SRAM which is limited to 136kbyte.

So please add code which sets up the SDRAM, then you can hard code the frame buffer address to this memory.
Alternatively look for an example which uses the SDRAM anyway and put the camera example mode into that.

Regards,
NXP Support Team
0 Kudos