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

Problem calling function from SRAM

Hi everybody

I have used an example problem and used my functions to place in the ram after calling it main , it isnt working..........(Iam working on ADuC7026 processor).

#define MUL_hi(a, b) ((a*b)>>16)
#define MAC2_hi(a, b, c, d) ((a*b + c*d)>>16)
inline void fft_rescramble(int * x_vector, const int LENGTH);
register unsigned int R15 asm ("pc");
void Ram_Function(int *end) __attribute__ ((section (".fft_ifft_func")));
void fpfft(int * X_real, int * X_imag, int * x);
void fpifft(int * x, int * X_real, int * X_imag);
void Ram_Function(int *in_buf)
{
int X_re[256],X_im[256],re[256];
fpfft(X_re,X_im,in_buf);
fpifft(re,X_re,X_im);
}
Thanks Hameed

Parents Reply Children
  • I haven't solved the linker problem yet.

    What I did was define a funtion (with the same prototype) to be in a RAM section, and just copied the real function from .text to RAM. Since my function is assembly language I was assured that the internal references were correct. It works fine, but I wish I knew what I'd done wrong with the linker script.

    Having spent $$$ on the GNU tools (with Keil debugging capability) just prior to the release of CARM I couldn't really justify the cost of upgrade to my superiors. CARM would ease this problem, but introduce others of its own.

  • Having spent $$$ on the GNU tools (with Keil debugging capability) just prior to the release of CARM I couldn't really justify the cost of upgrade

    How much time will you spend trying to work around a problem a tool upgrade would fix? How much is that time worth? (Rule of thumb: 2.5x your salary expressed as an hourly rate.) What are the risks of delay in the project, and how much would that cost?

    The cost of software development tools is usually a pretty minor factor in the overall cost of development.