Renesas TM V.3.20A Especificaciones Pagina 317

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 762
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 316
Renesas Technology, Tools FAQs
Last Updated: August 25, 2000
Document Number: 01051004_e
Q.
I was under the assumption that all const declarations were assigned to the ROM sections. But when I specify the constants as
shown below, these constants were assigned to data sections. How can I assign the following to ROM sections?
const S_TBL *sp_tbl[]={
p00, /* pointer to structure */
p01, /* pointer to structure */
p02, /* pointer to structure */
};
A.
To assign the above constants to the ROM section, please specify sp_tbl in the following way:
S_TBL *const sp_tbl[]={
p00, /* pointer to structure */
p01, /* pointer to structure */
p02, /* pointer to structure */
};
You need to assign p00, p01, and p02 as well as sp_tbl to the ROM section:
const S_TBL *const sp_tbl[]={
p00, /* pointer to structure */
p01, /* pointer to structure */
p02, /* pointer to structure */
};
[Reference]
When using a const-declaration to a pointer, what is assigned to the ROM will differ depending on the position of the const.
In the following example,
const int *i={a,b,c};
"a, b, c" will be assigned to the ROM.
But, in the following example,
int * const i={a,b,c};
"i" will be assigned to the ROM.
Top of Page | Back to Previous Page
Terms of Use Privacy Policy
(C)2004 Renesas Technology Corp., All Rights Reserved.
Vista de pagina 316
1 2 ... 312 313 314 315 316 317 318 319 320 321 322 ... 761 762

Comentarios a estos manuales

Sin comentarios