This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

The S120 APP RAM is not enough for RSA calculation

Hi,

I want do RSA on NRF51822. The build environment is GCC. And the develop base on S120. The RSA need 1K to do calculation. If I enable the RSA calculation, the APP may have some tricky problem.

I want to decrease the RAM using. But all is needed. I found in the link file has reserved 2K RAM. Does those RAM reserved for SoftDevice?

S120 Link file RAM (rwx) : ORIGIN = 0x20002800, LENGTH = 0x1800

S110 Link file RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000

Can I use those RAM for APP?

And I found the NRF51822 has 16K RAM. Why the configure file configured as 8K?

Thanks!

Parents
  • Are you using a static buffer for the RSA, dynamically allocated one or stack allocated one? I can easily imaging problems stemming from taking 1kB out of stack, as in:

    my_handler() {
        char rsa_value[1024];
        perform_math(&rsa_value);
        ...
    }
    

    For a statically allocated buffer, you should be able to verify the compiler-generated memory map...

Reply
  • Are you using a static buffer for the RSA, dynamically allocated one or stack allocated one? I can easily imaging problems stemming from taking 1kB out of stack, as in:

    my_handler() {
        char rsa_value[1024];
        perform_math(&rsa_value);
        ...
    }
    

    For a statically allocated buffer, you should be able to verify the compiler-generated memory map...

Children
No Data
Related