Re: MSP430 info memory vs Rowley

larwe wrote:
I'm trying to locate a structure in MSP430 info memory using Rowley
CrossWorks (a preinitialized structure, so it appears in the .txt
file). Is there a pragma or other directive similar to IAR's that will
directly place my structure in info memory without having to play with
custom segment names and special linker control info? ISTR having done
this in the past but cannot remember how to do it.


Assume by txt that you mean the code segment ?. If you just want the data to appear in the code section, you don't need any special keywords or pragmas. At least, not on any compiler i've used. For example, if you define a structure as:

typedef struct {
U8 u8Length;
U8 *pu8String;

Then, an instance such as:

const STRING_DATA = {
} sStringDataExample;

Should appear in the code section at link time. I often use defined structures like this for menu trees and other data. The only minor problem is when structures point to others and you then need to define them in reverse order to avoid whinges from the compiler about unresolved references.

Anyway, it only takes a few minutes to hack around with this on a test module to see what's what...



Relevant Pages

  • Re: request for feedback: making foreign function calls to C printf-style functions safer
    ... - compiler would report that. ... syntax for such a feature, but we are talking about an optional pragma, ... fine even after the format specifier syntax had been extended. ... compiler should check for in the format string. ...
  • Re: include file question
    ... Where did you read that #pragma once is obsolete? ... because it suggests that what you need is some kind of weird compiler hack to make your ... inside the header file to prevent multiple execution of the contents. ... documentation about Objective C, which is a language which is NOT the C++ language, has ...
  • Re: include file question
    ... First off I first read that you could keep the compiler ... But then I read that #pragma once is obsolete? ... The #include guards are portable since the beginning of time, ... Note that some headers use neither because they are ...
  • Re: Ada checks suppression thanks to compilation options and Ada conformity
    ... One text book describes "pragma" as a "directive to the ... the compiler -- and indicate that compilers are allowed to ignore ... But this doens't apply to pragma Suppress, ... specify a compiler command-line option to suppress all checks, ...
  • Re: Packages private parts and protected types
    ... unneeded bodies which Ada95 solved with a pragma. ... a source file containing that body. ... accidental error to result in the compiler accepting a package without ...