Motorola DSP56800 Guía de usuario Pagina 296

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 446
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 295
ELF Linker and Command Language
Linker Command File Syntax
296
Targeting MC56F83xx/DSP5685x Controllers
.main_application :
{
# .text sections
*(.text)
*(.rtlib.text)
*(.fp_engine.txt)
*(user.text)
} > .text
__ROM_Address = 0x2000
.data : AT(__ROM_Address) # ROM Address definition
{
# .data sections
F__Begin_Data = .; # Start location for RAM (0x3000)
*(.data) # Write data to the section (ROM)
*(fp_state.data);
*(rtlib.data);
F__End_Data = .; # Get end location for RAM
# .bss sections
* (rtlib.bss.lo)
* (.bss)
F__ROM_Address = __ROM_Address
} > .data
}
To make the runtime copy from ROM to RAM, you need to know where the data starts
in ROM (__ROM_Address) and the size of the block in ROM you want to copy to
RAM. In the following example (Listing 10.18
), copy all variables in the data section
from ROM to RAM in C code.
Listing 10.18 ROM to RAM Copy From C After Writing Data Flash
#include <stdio.h>
#include <string.h>
int GlobalFlash = 6;
// From linker command file
extern __Begin_Data, __ROMAddress, __End_Data;
void main( void )
{
Vista de pagina 295
1 2 ... 291 292 293 294 295 296 297 298 299 300 301 ... 445 446

Comentarios a estos manuales

Sin comentarios