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 | DSP56807: Linker Cmd File main()- function always at the same address

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

  

Post a new Thread

Re: DSP56807: Linker Cmd File main()- function always at the same address - Christian Brauchli - Oct 7 7:08:00 2001



Hi,

To place the main() routine always to the same P-Flash Address change the
following in your linker.cmd file:

#***************************************************************************
****
.ApplicationCode :
{
# Place all code into Program Flash
stepper.c (.text) #do not delete this here. main() needs to be
#the first function in the file stepper.c so
the linker will located main() to the address
#0x0086 all the time.
* (.text)
* (rtlib.text)
* (fp_engine.text)
* (user.text)

} > .pFlash **************************
rgds Chris

-----Ursprüngliche Nachricht-----
Von: Santi Corera <>
An: Christian Brauchli <>;
<>; Art Johnson
<>
Datum: Montag, 7. Oktober 2002 09:03
Betreff: Re: [motoroladsp] DSP56807: Linker Cmd File main()- function always
at the same address >About the initiliazation of registers, Which is the diference between
>resetting them in a function called directly or through the COP interrupt ?
>
>----- Original Message -----
>From: "Art Johnson" <>
>To: "Christian Brauchli" <>;
><>
>Sent: Friday, October 04, 2002 7:33 PM
>Subject: RE: [motoroladsp] DSP56807: Linker Cmd File main()- function
always
>at the same address >> 1. You can do the following in your linker.cmd file:
>>
>>
>#**************************************************************************
*
>****
>> # Linker.cmd file for the DSP56F807 chip,
>> # using internal data memory only ( EX = 0, Boot Mode 0A )
>>
>>
>#**************************************************************************
*
>****
>> MEMORY {
>>
>> # .pInterruptVector (RX) : ORIGIN = 0x0000, LENGTH = 0x0086
>> .pInterruptVector (RX) : ORIGIN = 0x0004, LENGTH = 0x0082
>> .pMain_C_Flash (RX) : ORIGIN = 0x0086, LENGTH = 0x0F7A
>> .pFlash (RX) : ORIGIN = 0x1000, LENGTH = 0xE000
>> .pIntRAM (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
>> .pIntRAM_Mirror (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
>> .pBootFlash (RX) : ORIGIN = 0xF800, LENGTH = 0x0800
>>
>> .xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0020
>> .xOSRegisters (RW) : ORIGIN = 0x0020, LENGTH = 0x0010
>> .xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010
>> .xIntRAM (RW) : ORIGIN = 0x0040, LENGTH = 0x0FC0
>> .xIntRAM_Mirror (RWX) : ORIGIN = 0x0040, LENGTH = 0x0FC0
>> .xStack (RW) : ORIGIN = 0x0F00, LENGTH = 0x0100
>> .xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
>> .xReserved (R) : ORIGIN = 0x1800, LENGTH = 0x0800
>> .xFlash (R) : ORIGIN = 0x2000, LENGTH = 0x2000
>> .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
>> .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
>> .xCoreRegisters (RW) : ORIGIN = 0xFF80, LENGTH = 0x0080
>> }
>>
>#**************************************************************************
*
>****
>>
>>
>>
>> In your SECTIONS section, add the following just after the
>".ApplicationInterruptVector" block:
>>
>>
>#**************************************************************************
*
>****
>> .Main_C_Code :
>> {
>> # Place main.c code into Main_C_Flash
>> main.c (.text)
>>
>> } > .pMain_C_Flash
>>
>#**************************************************************************
*
>****
>>
>> Your main() function must, of course, be the first code in the main.c
>file, so it will be placed at the address you want. This method is more
>direct than the other method, which would be to put main.c as the first
file
>in the Link Order settings.
>>
>>
>>
>> 2. You could enable the COP (Watchdog) timer, and let it time out. You
>will need to have its Interrupt Vector (number 1, address X:$0002) point to
>your function that handles the interrupt when it occurs. This should put
>all of the on-chip peripherals in their reset state. It does not, of
>course, change the value of the ALU or AGU registers (X0, Y0, Y1, etc.).
>>
>>
>> I hope this helps.
>>
>>
>> Regards,
>>
>> Art Johnson
>> Senior Systems Analyst
>> PMC Prime Mover Controls Inc.
>> 3600 Gilmore Way
>> Burnaby, B.C., Canada
>> V5G 4R8
>> Phone: 604 433-4644
>> FAX: 604 433-5570
>> Email:
>> http://www.pmc-controls.com
>>
>>
>>
>>
>> -----Original Message-----
>> From: Christian Brauchli [mailto:]
>> Sent: Friday, October 04, 2002 9:20 AM
>> To:
>> Subject: [motoroladsp] DSP56807: Linker Cmd File main()- function always
>> at the same address
>>
>>
>> Hi,
>>
>> 1. For my application I need to have the main() routine allways linked to
>the same address in my P-Flash (for example 0x0086). Does anybody have an
>idea how to define this in the linker.cmd file.
>>
>> 2. Is there an easy way to reset all the DSP- Registers to the reset
state
>without putting the DSP into Reset Condition?
>>
>>
>> Thanks
>> Chris
>>
>>
>>
>>
>> _____________________________________
>> /groups.php3
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _____________________________________
>> /groups.php3
>>
>>
>>
>>
>>
>





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

DSP56807: Linker Cmd File main()- function always at the same address - Christian Brauchli - Oct 4 16:20:00 2002

Hi,

1. For my application I need to have the main() routine allways linked to the
same address in my P-Flash (for example 0x0086). Does anybody have an idea how
to define this in the linker.cmd file.

2. Is there an easy way to reset all the DSP- Registers to the reset state
without putting the DSP into Reset Condition? Thanks
Chris





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

RE: DSP56807: Linker Cmd File main()- function always at the same address - Art Johnson - Oct 4 18:33:00 2002

1. You can do the following in your linker.cmd file:

#*******************************************************************************
# Linker.cmd file for the DSP56F807 chip,
# using internal data memory only ( EX = 0, Boot Mode 0A )

#*******************************************************************************
MEMORY {

# .pInterruptVector (RX) : ORIGIN = 0x0000, LENGTH = 0x0086
.pInterruptVector (RX) : ORIGIN = 0x0004, LENGTH = 0x0082
.pMain_C_Flash (RX) : ORIGIN = 0x0086, LENGTH = 0x0F7A
.pFlash (RX) : ORIGIN = 0x1000, LENGTH = 0xE000
.pIntRAM (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
.pIntRAM_Mirror (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
.pBootFlash (RX) : ORIGIN = 0xF800, LENGTH = 0x0800

.xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0020
.xOSRegisters (RW) : ORIGIN = 0x0020, LENGTH = 0x0010
.xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010
.xIntRAM (RW) : ORIGIN = 0x0040, LENGTH = 0x0FC0
.xIntRAM_Mirror (RWX) : ORIGIN = 0x0040, LENGTH = 0x0FC0
.xStack (RW) : ORIGIN = 0x0F00, LENGTH = 0x0100
.xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
.xReserved (R) : ORIGIN = 0x1800, LENGTH = 0x0800
.xFlash (R) : ORIGIN = 0x2000, LENGTH = 0x2000
.xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
.xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
.xCoreRegisters (RW) : ORIGIN = 0xFF80, LENGTH = 0x0080
}
#*******************************************************************************
In your SECTIONS section, add the following just after the
".ApplicationInterruptVector" block:

#*******************************************************************************
.Main_C_Code :
{
# Place main.c code into Main_C_Flash
main.c (.text)

} > .pMain_C_Flash
#*******************************************************************************

Your main() function must, of course, be the first code in the main.c file, so
it will be placed at the address you want. This method is more direct than the
other method, which would be to put main.c as the first file in the Link Order
settings.
2. You could enable the COP (Watchdog) timer, and let it time out. You will
need to have its Interrupt Vector (number 1, address X:$0002) point to your
function that handles the interrupt when it occurs. This should put all of the
on-chip peripherals in their reset state. It does not, of course, change the
value of the ALU or AGU registers (X0, Y0, Y1, etc.). I hope this helps. Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com

-----Original Message-----
From: Christian Brauchli [mailto:]
Sent: Friday, October 04, 2002 9:20 AM
To:
Subject: [motoroladsp] DSP56807: Linker Cmd File main()- function always
at the same address Hi,

1. For my application I need to have the main() routine allways linked to the
same address in my P-Flash (for example 0x0086). Does anybody have an idea how
to define this in the linker.cmd file.

2. Is there an easy way to reset all the DSP- Registers to the reset state
without putting the DSP into Reset Condition? Thanks
Chris

_____________________________________
/groups.php3




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

Re: DSP56807: Linker Cmd File main()- function always at the same address - Santi Corera - Oct 7 8:01:00 2002

About the initiliazation of registers, Which is the diference between
resetting them in a function called directly or through the COP interrupt ?

----- Original Message -----
From: "Art Johnson" <>
To: "Christian Brauchli" <>;
<>
Sent: Friday, October 04, 2002 7:33 PM
Subject: RE: [motoroladsp] DSP56807: Linker Cmd File main()- function always
at the same address > 1. You can do the following in your linker.cmd file: #***************************************************************************
****
> # Linker.cmd file for the DSP56F807 chip,
> # using internal data memory only ( EX = 0, Boot Mode 0A ) #***************************************************************************
****
> MEMORY {
>
> # .pInterruptVector (RX) : ORIGIN = 0x0000, LENGTH = 0x0086
> .pInterruptVector (RX) : ORIGIN = 0x0004, LENGTH = 0x0082
> .pMain_C_Flash (RX) : ORIGIN = 0x0086, LENGTH = 0x0F7A
> .pFlash (RX) : ORIGIN = 0x1000, LENGTH = 0xE000
> .pIntRAM (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
> .pIntRAM_Mirror (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
> .pBootFlash (RX) : ORIGIN = 0xF800, LENGTH = 0x0800
>
> .xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0020
> .xOSRegisters (RW) : ORIGIN = 0x0020, LENGTH = 0x0010
> .xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010
> .xIntRAM (RW) : ORIGIN = 0x0040, LENGTH = 0x0FC0
> .xIntRAM_Mirror (RWX) : ORIGIN = 0x0040, LENGTH = 0x0FC0
> .xStack (RW) : ORIGIN = 0x0F00, LENGTH = 0x0100
> .xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
> .xReserved (R) : ORIGIN = 0x1800, LENGTH = 0x0800
> .xFlash (R) : ORIGIN = 0x2000, LENGTH = 0x2000
> .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xCoreRegisters (RW) : ORIGIN = 0xFF80, LENGTH = 0x0080
> }
>
#***************************************************************************
**** >
> In your SECTIONS section, add the following just after the
".ApplicationInterruptVector" block: #***************************************************************************
****
> .Main_C_Code :
> {
> # Place main.c code into Main_C_Flash
> main.c (.text)
>
> } > .pMain_C_Flash
>
#***************************************************************************
****
>
> Your main() function must, of course, be the first code in the main.c
file, so it will be placed at the address you want. This method is more
direct than the other method, which would be to put main.c as the first file
in the Link Order settings. >
> 2. You could enable the COP (Watchdog) timer, and let it time out. You
will need to have its Interrupt Vector (number 1, address X:$0002) point to
your function that handles the interrupt when it occurs. This should put
all of the on-chip peripherals in their reset state. It does not, of
course, change the value of the ALU or AGU registers (X0, Y0, Y1, etc.). > I hope this helps. > Regards,
>
> Art Johnson
> Senior Systems Analyst
> PMC Prime Mover Controls Inc.
> 3600 Gilmore Way
> Burnaby, B.C., Canada
> V5G 4R8
> Phone: 604 433-4644
> FAX: 604 433-5570
> Email:
> http://www.pmc-controls.com >
>
> -----Original Message-----
> From: Christian Brauchli [mailto:]
> Sent: Friday, October 04, 2002 9:20 AM
> To:
> Subject: [motoroladsp] DSP56807: Linker Cmd File main()- function always
> at the same address > Hi,
>
> 1. For my application I need to have the main() routine allways linked to
the same address in my P-Flash (for example 0x0086). Does anybody have an
idea how to define this in the linker.cmd file.
>
> 2. Is there an easy way to reset all the DSP- Registers to the reset state
without putting the DSP into Reset Condition? > Thanks
> Chris >
>
> _____________________________________
> /groups.php3 >
> _____________________________________
> /groups.php3




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

RE: DSP56807: Linker Cmd File main()- function always at the same address - Art Johnson - Oct 7 11:54:00 2002

There is no difference, between resetting the registers in a function called
directly or through the COP interrupt. Technically, the ALU and AGU registers
do not have a "reset" state, other than what you decide to put into them in your
code. The Program Controller and the on-chip peripherals are the only parts of
the DSP56800 chips that truly have a "reset" state.

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com
-----Original Message-----
From: Santi Corera [mailto:]
Sent: Monday, October 07, 2002 1:01 AM
To: Christian Brauchli; ; Art Johnson
Subject: Re: [motoroladsp] DSP56807: Linker Cmd File main()- function
always at the same address About the initiliazation of registers, Which is the diference between
resetting them in a function called directly or through the COP interrupt ?

----- Original Message -----
From: "Art Johnson" <>
To: "Christian Brauchli" <>;
<>
Sent: Friday, October 04, 2002 7:33 PM
Subject: RE: [motoroladsp] DSP56807: Linker Cmd File main()- function always
at the same address > 1. You can do the following in your linker.cmd file: #***************************************************************************
****
> # Linker.cmd file for the DSP56F807 chip,
> # using internal data memory only ( EX = 0, Boot Mode 0A ) #***************************************************************************
****
> MEMORY {
>
> # .pInterruptVector (RX) : ORIGIN = 0x0000, LENGTH = 0x0086
> .pInterruptVector (RX) : ORIGIN = 0x0004, LENGTH = 0x0082
> .pMain_C_Flash (RX) : ORIGIN = 0x0086, LENGTH = 0x0F7A
> .pFlash (RX) : ORIGIN = 0x1000, LENGTH = 0xE000
> .pIntRAM (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
> .pIntRAM_Mirror (RWX) : ORIGIN = 0xF000, LENGTH = 0x0800
> .pBootFlash (RX) : ORIGIN = 0xF800, LENGTH = 0x0800
>
> .xAvailable (RW) : ORIGIN = 0x0000, LENGTH = 0x0020
> .xOSRegisters (RW) : ORIGIN = 0x0020, LENGTH = 0x0010
> .xCWRegisters (RW) : ORIGIN = 0x0030, LENGTH = 0x0010
> .xIntRAM (RW) : ORIGIN = 0x0040, LENGTH = 0x0FC0
> .xIntRAM_Mirror (RWX) : ORIGIN = 0x0040, LENGTH = 0x0FC0
> .xStack (RW) : ORIGIN = 0x0F00, LENGTH = 0x0100
> .xPeripherals (RW) : ORIGIN = 0x1000, LENGTH = 0x0800
> .xReserved (R) : ORIGIN = 0x1800, LENGTH = 0x0800
> .xFlash (R) : ORIGIN = 0x2000, LENGTH = 0x2000
> .xExtRAM (RW) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xExtRAM_Mirror (RWX) : ORIGIN = 0x4000, LENGTH = 0xBF80
> .xCoreRegisters (RW) : ORIGIN = 0xFF80, LENGTH = 0x0080
> }
>
#***************************************************************************
**** >
> In your SECTIONS section, add the following just after the
".ApplicationInterruptVector" block: #***************************************************************************
****
> .Main_C_Code :
> {
> # Place main.c code into Main_C_Flash
> main.c (.text)
>
> } > .pMain_C_Flash
>
#***************************************************************************
****
>
> Your main() function must, of course, be the first code in the main.c
file, so it will be placed at the address you want. This method is more
direct than the other method, which would be to put main.c as the first file
in the Link Order settings. >
> 2. You could enable the COP (Watchdog) timer, and let it time out. You
will need to have its Interrupt Vector (number 1, address X:$0002) point to
your function that handles the interrupt when it occurs. This should put
all of the on-chip peripherals in their reset state. It does not, of
course, change the value of the ALU or AGU registers (X0, Y0, Y1, etc.). > I hope this helps. > Regards,
>
> Art Johnson
> Senior Systems Analyst
> PMC Prime Mover Controls Inc.
> 3600 Gilmore Way
> Burnaby, B.C., Canada
> V5G 4R8
> Phone: 604 433-4644
> FAX: 604 433-5570
> Email:
> http://www.pmc-controls.com >
>
> -----Original Message-----
> From: Christian Brauchli [mailto:]
> Sent: Friday, October 04, 2002 9:20 AM
> To:
> Subject: [motoroladsp] DSP56807: Linker Cmd File main()- function always
> at the same address > Hi,
>
> 1. For my application I need to have the main() routine allways linked to
the same address in my P-Flash (for example 0x0086). Does anybody have an
idea how to define this in the linker.cmd file.
>
> 2. Is there an easy way to reset all the DSP- Registers to the reset state
without putting the DSP into Reset Condition? > Thanks
> Chris >
>
> _____________________________________
> /groups.php3 >
> _____________________________________
> /groups.php3





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