Forums

MSP430 info memory vs Rowley

Started by larwe October 7, 2009
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...
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. > > TIA...
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
On Oct 7, 4:49=A0pm, ChrisQ <m...@devnull.com> wrote:
> 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 > > Assume by txt that you mean the code segment ?. If you just want the
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.
On Oct 7, 10:14=A0pm, larwe <zwsdot...@gmail.com> wrote:
> On Oct 7, 4:49=A0pm, ChrisQ <m...@devnull.com> wrote: > > > 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 wil=
l
> > > Assume by txt that you mean the code segment ?. If you just want the > > 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.
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
On Oct 8, 5:54=A0am, Ian <ian.o...@gmail.com> wrote:

> If you ask this on the Yahoo group then I expect that you will get a > very quick answer.
There's a Yahoo group?
On Oct 8, 12:38=A0pm, larwe <zwsdot...@gmail.com> wrote:
> On Oct 8, 5:54=A0am, Ian <ian.o...@gmail.com> wrote: > > > If you ask this on the Yahoo group then I expect that you will get a > > very quick answer. > > There's a Yahoo group?
There is. It is quite active with a good SNR. To visit your group on the web, go to: http://groups.yahoo.com/group/msp430/ Ian
On Oct 7, 8:42=A0pm, larwe <zwsdot...@gmail.com> 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. > > TIA...
why not just use IAR?
On Oct 9, 4:18=A0am, bigbrownbeastie
<bigbrownbeastiebigbrownf...@googlemail.com> wrote:

> > I'm trying to locate a structure in MSP430 info memory using Rowley > > CrossWorks (a preinitialized structure, so it appears in the .txt > > why not just use IAR?
Because the project was written and qualified using Rowley, and because the company has licenses for Rowley, not IAR?
On Wed, 7 Oct 2009 12:42:25 -0700 (PDT), larwe <zwsdotcom@gmail.com>
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.
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
On Oct 7, 3:42=A0pm, larwe <zwsdot...@gmail.com> 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)
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.