This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Memory allocation error with bootloader

I have a big problem with LPC2387 and http-upload demo project when it's loaded by bootloader.
After one ten of minute that the application it's running with one ftp connection and one http connection that try to download the same a big file; the application hangs with this error:

MEM ERR: Alloc, No memory Used 5300 bytes, 12 blocks

This error occur also with only continuously ping without any communication with the socket but the error occur after some hour.

If the ethernet cable is disconnected the application run well without problem.

I think that the remap of the vector interrupts by the application it's correct. I have used the define REMAP RAM_MODE RAM_INTVEC and the interrupt like serial, timer, ethernet and so on it's ok.

In the startup file of application I have forced the cpu to go to the supervisor mode to properly setting of stack and heap of the application with this piece of code:

SWI_RAM_ADDR EQU 0x40000028 LDR R8, =SWI_RAM_ADDR LDR R7, [R8] LDR R9, =Stack_Set_Addr STR R9, [R8] SWI 11
Stack_Set_Addr DCD Stack_Setup
Stack_Setup STR R7, [R8]

This is my setting of bootloader and project application:

-> Bootloader:
Secondary SD Bootloader from nxp:
No RTX
IROM1 address 0x0000, size 0x10000
IRAM1 address 0x4000000, size 0x1000
Heap Size: 0x400
Stack Size (user Mode): 0x400

-> Application: Http_upload demo project without RTX

IROM1 address 0x10000, size 0x70000
IRAM1 address 0x4000040, 0xFFC0 //Save first 64 byte for remap interrupt
IRAM2 address 0x7FD0000, size 0x4000
Ass Define: REMAP RAM_MODE RAM_INTVEC

I already tried:

1) Change Memory pool in Net_config.c (increase or decrease) -> problem no solved
2) Increase Heap Size of Bootloader or/and application -> no solution
3) Increase Stack Size in User Mode in bootloader and/or application -> no solution
4) Build the application without bootloader but with Remapping of interrupts vector -> no solution

I'm afraid that the promblem it's the use of DMA or Memory allocation when the interrupt are mapped in the RAM.

Someone have any solution for me?

Thank's

0