Yesterday I was running along developing on my 5441x system, IDE 2.8.7, and I started getting false "Out of Memory" errors on code load. The first time it happened, I was going from a Run build to a Debug session with no source changes. My build uses less than 5% of memory, see screenshot. I powered down the development system and PC overnight. This morning, same story. It won't even load the Run build.
Any hints? What causes this?
False "Out of memory" on 5441x
Re: False "Out of memory" on 5441x
The out of memory error on Load has nothing to do with staticly allocated memory.
(Whets reported in the build)
It has to do with memory that is malloced or newed.
When you run autoupdate it attempts to malloc a buffer to hold the image.
If this fails you get that error.
To figure out how much free memory you have at run time call:
@include <bsp.h>
DWORD spaceleft();
(Whets reported in the build)
It has to do with memory that is malloced or newed.
When you run autoupdate it attempts to malloc a buffer to hold the image.
If this fails you get that error.
To figure out how much free memory you have at run time call:
@include <bsp.h>
DWORD spaceleft();
Re: False "Out of memory" on 5441x
That's good info. My application uses opensll as a library, so some dynamic allocation may be in play. But this happens right after boot, before any openssl lib functions are called.
Based on what you wrote, I rebooted to the boot loader and then sent the factory test image from the IDE. Back in business.
Thanks,
Larry
Based on what you wrote, I rebooted to the boot loader and then sent the factory test image from the IDE. Back in business.
Thanks,
Larry
Re: False "Out of memory" on 5441x
The MOD5441X has 64M of memory, so I can't imagine why its out of memory?
Whya are you are using openssl rather than the Netburner SSL implementation?
A whole lot better performance, and a lot less memory?
Whya are you are using openssl rather than the Netburner SSL implementation?
A whole lot better performance, and a lot less memory?
Re: False "Out of memory" on 5441x
> Why are you are using openssl rather than the Netburner SSL implementation?
I needed ECDSA for a project, which is not provided by NB, and decided to go all the way and port openssl to NB. That decision enabled the current project to quickly bring in standard des, 3des and MAC libraries.
The memory problem seems to be associated with Debug mode. I put a loop counter in main() that prints on UART0 every few seconds. As long as I stay in Run mode, the counter prints on schedule and code load always works. As soon as I load a Debug build, the counter fails, indicating that the main loop is not executing. I also get false positives on dataavail(). UART0 is unresponsive to commands and new code load fails until I drop out to the bootloader. So it's back to printf debugging for a while.
I ported openssl in 2018, and this problem is new, so that is not the problem here.
I needed ECDSA for a project, which is not provided by NB, and decided to go all the way and port openssl to NB. That decision enabled the current project to quickly bring in standard des, 3des and MAC libraries.
The memory problem seems to be associated with Debug mode. I put a loop counter in main() that prints on UART0 every few seconds. As long as I stay in Run mode, the counter prints on schedule and code load always works. As soon as I load a Debug build, the counter fails, indicating that the main loop is not executing. I also get false positives on dataavail(). UART0 is unresponsive to commands and new code load fails until I drop out to the bootloader. So it's back to printf debugging for a while.
I ported openssl in 2018, and this problem is new, so that is not the problem here.
Re: False "Out of memory" on 5441x
The current netburner SSL release supports ECDSA.