MSP430 info memory vs Rowley

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.

TIA...

Reply to
larwe
Loading thread data ...

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; } STRING_DATA;

Then, an instance such as:

const STRING_DATA = { {5}, {"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...

Regards,

Chris

Reply to
ChrisQ

No. I mean the .TXT file that can be generated (kind of like a .HEX file) for burning devices directly. In structure it contains multiple segments of the form:

@origin_address XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

And I need the data structure in question to be located in one of the info memory segments, not the main flash array.

Reply to
larwe

l

I must confess that I have not used Rowley since doing some beta testing on the pre-release versions a number of years ago. IIRC you could use an "@ address" syntax in the data structure declaration, much like the method that IAR introduced in the V3 compiler.

If you ask this on the Yahoo group then I expect that you will get a very quick answer.

Ian

Reply to
Ian

There's a Yahoo group?

Reply to
larwe

There is. It is quite active with a good SNR.

To visit your group on the web, go to:

formatting link

Ian

Reply to
Ian

why not just use IAR?

Reply to
bigbrownbeastie

Because the project was written and qualified using Rowley, and because the company has licenses for Rowley, not IAR?

Reply to
larwe

Rowley tech support is excellent and by real techies ... but you have to ask the right question. Sometimes they forget what people don't know.

Stephen

--
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads
Reply to
Stephen Pelc

FWIW the answer to my question is:

#pragma constseg("INFO_x") const unsigned char foo[] =3D {1,2,3,4}; #pragma constseg(default)

The reason this wasn't working for me is that my code doesn't reference foo (it reads/writes info mem directly by address - since I don't actually do anything with the data in foo, I just pass it to another device as a block). So the linker was optimizing the foo structure out of the final binary. Added dummy code to touch the structure and all is well.

Reply to
larwe

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.