Sign in

username:

password:



Not a member?

Search motoroladsp



Search tips

Subscribe to motoroladsp



motoroladsp by Keywords

56303 | 563xx | 5680 | 56805 | 5680x | 56F80 | 56F800DEMO | 56F805 | 56f807 | 56F830 | ADC | Bootloader | Codec | CodeWarrior | CW5 | CW6 | Debugger | DSP56303 | DSP56303EVM | DSP563xx | DSP5680 | DSP56800 | DSP56807 | DSP56858 | DSP56858EVM | DSP56F803 | DSP56F805 | DSP56F807 | DSP56F80x | DSP56F826 | DSP56F827 | DSP56F8xx | EVM | FFT | Flash_over_jtag | GPIO | Interrupt | Interrupts | JTAG | LCD | Linker | MCF5307 | Metrowerks | Modulus | MSCAN | PCMaster | PWM | Quad | Rif | RTOS | SDK | SPI

Discussion Groups

Discussion Groups | Freescale DSPs | Linker.cmd values in C program

Technical discussions about Freescale (Motorola) DSPs (including the DSP56000, DSP56300, DSP56600, 56800 DSPs).

  

Post a new Thread

Linker.cmd values in C program - Peter Becher - Jul 20 13:33:00 2005



Hi All,

Is there a way to use values from the linker.cmd file in a C program?

Such as the .xStack ORIGIN and LENGTH values.

Thanks,
Pete




(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )

RE: Linker.cmd values in C program - Yochum, William - Jul 20 15:55:00 2005

There might be better ways, but here is an example ...
 
 
MEMORY
{
...
 .xstack  (RW)  : ORIGIN = 0x0040, LENGTH = 0x0300  # stack
...
 .custom (R)   : ORIGIN = 0x2000, LENGTH = 0x0010  # custom stuff from this file 
...
}
    
SECTIONS
{
...
 
 
  .information :
  {
     _STACK_ORIGIN0x40;         # constant from MEMORY declaration above
     _STACK_LENGTH = 0x300;        # constant from MEMORY declaration above
     WRITEH( _STACK_ORIGIN );
  
   WRITEH( _STACK_LENGTH );
  } > .custom
 
              #
              # Make the custom variables global
              # and accessible from "C"
           &n bsp;  # under the same name w/o the leading "F"
              #
   Fstack_origin = ADDR(.information) + 0;
   Fstack_length = ADDR(.information) + 1;
...
}
-----Original Message-----
From: Peter Becher [mailto:p...@dynatronix.com]
Sent: Wednesday, July 20, 2005 1:34 PM
To: m...@yahoogroups.com
Subject: [motoroladsp] Linker.cmd values in C program

Hi All,

Is there a way to use values from the linker.cmd file in a C program?

Such as the .xStack ORIGIN and LENGTH values.

Thanks,
Pete


The information contained in this message is confidential and intended only for use of the designated recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this message in error, and that any review, dissemination, distribution, copying, or alteration of this message is strictly prohibited. If you have received this communication in error, please notify the originator immediately and remove it from your system.





(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )

RE: Linker.cmd values in C program - Peter Becher - Jul 21 9:44:00 2005

Hi William,

Thanks for the reply.

I was hoping there was a way to directly use the values entered in the MEMORY section.  I do something similar to what you are doing with constants but sometimes I forget to change both values.  Maybe I just need a better "memory".

Thanks,
Pete

At 03:55 PM 7/20/2005 -0400, Yochum, William wrote:
There might be better ways, but here is an example ...


MEMORY
{

...
.xstack  (RW)  : ORIGIN = 0x0040, LENGTH = 0x0300  # stack
...

.custom (R)   : ORIGIN = 0x2000, LENGTH = 0x0010  # custom stuff from this file
...
}
   
SECTIONS
{

...


  .information :
  {
     _STACK_ORIGIN = 0x40;         # constant from MEMORY declaration above

     _STACK_LENGTH = 0x300;        # constant from MEMORY declaration above
     WRITEH( _STACK_ORIGIN );
     WRITEH( _STACK_LENGTH );
  } > .custom


              #
              # Make the custom variables global
              # and accessible from "C"

              # under the same name w/o the leading "F"
              #
   Fstack_origin = ADDR(.information) + 0;

   Fstack_length = ADDR(.information) + 1;
...
}
-----Original Message-----
From: Peter Becher [mailto:p...@dynatronix.com]
Sent: Wednesday, July 20, 2005 1:34 PM
To: m...@yahoogroups.com
Subject: [motoroladsp] Linker.cmd values in C program

Hi All,

Is there a way to use values from the linker.cmd file in a C program?

Such as the .xStack ORIGIN and LENGTH values.

Thanks,
Pete











(You need to be a member of motoroladsp -- send a blank email to motoroladsp-subscribe@yahoogroups.com )