STRING_SEG

Specifies the addressing mode and location of object code for constant character strings.

Syntax
  #pragma STRING_SEG [ modifier ] [ name ] 
  #pragma STRING_SEG DEFAULT  
Parameters

modifier

This optional parameter specifies the addressing mode to use:

name

A section name. You must use a section name defined in your project's linker command file.

Description

To specify the section in which to store constant character strings and the addressing mode to refer to this data, place this pragma before character string literal values. Use this pragma when porting source code for HC08 architectures to ColdFire V1 architectures.

Use DEFAULT to use the parameters specified in the previous use of this pragma.

The following listing shows an example.

Listing: DATA_SEG example
/* Place "longitude" and "altitude" in section rodata. */
const char* s1 = "longitude";

char* s2 = "altitude";

/* Place "latitude" in section sdata. */

char s3[50] = "latitude";

#pragma STRING_SEG MYSTRINGS

/* Place "liberty" and "fraternity" in section MYSTRINGS. */

const char* s4 = "liberty";

char* s5 = "fraternity";

/* "equality" will go in section sdata. */

char s6[50] = "equality";