Sgpio camera error

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

Sgpio camera error

1,409 Views
dimitrissideris
Contributor III

Hi there,

I am trying to get a camera work at my custom PCB.

The uC is 4367 and the camera is OV7670.

I followed the example from here:

AN11343: SGPIO camera module design using LPC4300 | www.LPCware.com 

This example works in dual core M0 and M4.

I changed the code according to my needs and used only M4.

1.

Is there any problem with that whatosoever?

I dont think so because there is also an example with one core setup

AN11196: Camera interface design using SGPIO | www.LPCware.com 

Currently i am under heavy development and in a state that i migrated the code from example 11343 to my code and this error occurs.

arm-none-eabi-gcc -nostdlib -L"C:\Users\d.sideris\Desktop\LPC_workspace\LpcOpen\lpc_chip_43xx\Debug" -L"C:\Users\d.sideris\Desktop\LPC_workspace\LpcOpen\lpc_board_nxp_lpcxpresso_4337\Debug" -Xlinker -Map="periph_sgpio_camera.map" -Xlinker --gc-sections -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mthumb -T "periph_uart_Debug.ld" -o "periph_sgpio_camera.axf"  ./example/src/cr_startup_lpc43xx.o ./example/src/ov7670.o ./example/src/sgpio_camera.o ./example/src/sysinit.o   -llpc_board_nxp_lpcxpresso_4337 -llpc_chip_43xx


c:/nxp/lpcxpresso_8.1.4_606/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: periph_sgpio_camera.axf section `.bss' will not fit in region `RamLoc32'


c:/nxp/lpcxpresso_8.1.4_606/lpcxpresso/tools/bin/../lib/gcc/arm-none-eabi/5.2.1/../../../../arm-none-eabi/bin/ld.exe: region `RamLoc32' overflowed by 275540 bytes


collect2.exe: error: ld returned 1 exit status


make: *** [periph_sgpio_camera.axf] Error 1

I ve searched and read about ramloc32 ovlerflow but i didnt quite understand what i have to do to solve this.

So please I would very like some help!

The 11343 was migrated to the periph_uart lpcopen example because projects goal is to transfer camera data through uart.

2.

So I read that default lpcopen projects have "little memory" occupied. I dont know if this is valid. How can i check and configure what memory is occupied?

Labels (4)
0 Kudos
10 Replies

793 Views
converse
Senior Contributor V

Well, it didn't take long to find...

The large array is:

US_RcvBuf g_rcvDbBuf;

US_RcvBuf is a union, that is 320x240x2x2 - 300k. (307200 bytes)

You are going to struggle to fit that into a 32k memory region. The largest block of contiguous RAM on this part if 40k.

0 Kudos

793 Views
dimitrissideris
Contributor III

Thanx a lot for the help!

So, if i would like to handle camera how would i do that if ram can handle only 40k max?

Can you please take a look here? This is the application note of what i am trying to do. I use this code as my basecode so that i can adjust it to my needs.

AN11343: SGPIO camera module design using LPC4300 | www.LPCware.com 

Thanx a lot in advance!

0 Kudos

793 Views
converse
Senior Contributor V

I don't know the application (and I do not want to), but the MCB4300 has a lot of external memory connected to the LPC4357 (16MB NOR Flash, 4MB Quad-SPI Flash, 16 MB SDRAM). I guess that is what the AN is using. So, if you want to have a large frame buffer, presumably you are going to need to do the same and connect an external memory device to your MCU, using the EMC.

Good luck with your project.

0 Kudos

793 Views
dimitrissideris
Contributor III

Thanx for the help.

0 Kudos

793 Views
converse
Senior Contributor V

There is something causing you code to be 275k too large. If you can't find it, attach you project and I'll take a look for you.

0 Kudos

793 Views
dimitrissideris
Contributor III

Really? That would be very helpful!

Sorry for the delayed answer. I had to be off desk for a couple of days.

check example/src

0 Kudos

793 Views
converse
Senior Contributor V

The error means that your application is too large to fit into the available memory - by 275k! It is trying to load it into the 32k SRAM region of memory.

The error indicates that it is caused by the .bss section, which is for zero-initialised data, so I would guess that you have defined a very big array in your code.

0 Kudos

793 Views
dimitrissideris
Contributor III

i can't find anything like a big array.

Any other clue?

0 Kudos

793 Views
dimitrissideris
Contributor III

When i code an uninitialized array which is too big, compilers generates:

error: size of array 'ridiculously_long_variable' is too large

0 Kudos

793 Views
dimitrissideris
Contributor III

any help please?

0 Kudos