I bought the TI experimenter board which features the MSP430F5529; for fun I
decided to exercise Rowley Crossworks IDE and port the code from CCE and
IAR. As we all know TI only supports IAR and CCE in its example files. So
I have most of this done, it is straightforward, but I hit a snag with
__no_init and __data16; from what my googling shows, Rowley supports a
16-bit wide data model and a 20-bit wide code model. So it seems the
__data16 attribute can be removed. I believe this is for IAR who support
small, medium and large data models. I think the __no_init I does not
change the values in RAM across a reboot. Not sure; anyway, the question I
pose is can I replace this example line:
extern __no_init BYTE __data16 pbYBufferAddressEp82[];
with
extern BYTE pbYBufferAddressEp82[];
and expect the USB stack to still function.
-Bill
porting code to Crossworks
Started by ●May 12, 2011
Reply by ●May 12, 20112011-05-12
On Thu, May 12, 2011 at 12:52 PM, William Sell wrote:
>As we all know TI only supports IAR and CCE in its example files.
There a reference somewhere that documents the differences between
IAR, CCE/CCS, Crossworks, and/or mspgcc? Has anyone ever attempted
to develop a set of ifdefs/macros/includes to make things more
portable?
-p.
>As we all know TI only supports IAR and CCE in its example files.
There a reference somewhere that documents the differences between
IAR, CCE/CCS, Crossworks, and/or mspgcc? Has anyone ever attempted
to develop a set of ifdefs/macros/includes to make things more
portable?
-p.
Reply by ●May 12, 20112011-05-12
Bill,
> I bought the TI experimenter board which features the MSP430F5529; for fun
> I decided to exercise Rowley Crossworks IDE and port the code from CCE and
> IAR. As we all know TI only supports IAR and CCE in its example files.
So I
> have most of this done, it is straightforward, but I hit a snag with
__no_init
> and __data16; from what my googling shows, Rowley supports a 16-bit wide
> data model and a 20-bit wide code model. So it seems the
> __data16 attribute can be removed. I believe this is for IAR who support
> small, medium and large data models. I think the __no_init I does not
> change the values in RAM across a reboot. Not sure; anyway, the question
I
> pose is can I replace this example line:
>
> extern __no_init BYTE __data16 pbYBufferAddressEp82[];
>
> with
>
> extern BYTE pbYBufferAddressEp82[];
That will work. When you define pbYBufferAddressEp82 you will need:
BYTE pbYBufferAddressEp82[HoweverBig] __at "NOINIT"; // Can also use @
instead of __at
-- Paul.
> I bought the TI experimenter board which features the MSP430F5529; for fun
> I decided to exercise Rowley Crossworks IDE and port the code from CCE and
> IAR. As we all know TI only supports IAR and CCE in its example files.
So I
> have most of this done, it is straightforward, but I hit a snag with
__no_init
> and __data16; from what my googling shows, Rowley supports a 16-bit wide
> data model and a 20-bit wide code model. So it seems the
> __data16 attribute can be removed. I believe this is for IAR who support
> small, medium and large data models. I think the __no_init I does not
> change the values in RAM across a reboot. Not sure; anyway, the question
I
> pose is can I replace this example line:
>
> extern __no_init BYTE __data16 pbYBufferAddressEp82[];
>
> with
>
> extern BYTE pbYBufferAddressEp82[];
That will work. When you define pbYBufferAddressEp82 you will need:
BYTE pbYBufferAddressEp82[HoweverBig] __at "NOINIT"; // Can also use @
instead of __at
-- Paul.
Reply by ●May 13, 20112011-05-13
"Paul Curtis" :
>>
>> extern __no_init BYTE __data16 pbYBufferAddressEp82[];
>>
>> with
>>
>> extern BYTE pbYBufferAddressEp82[];
>
> That will work. When you define pbYBufferAddressEp82 you will need:
>
> BYTE pbYBufferAddressEp82[HoweverBig] __at "NOINIT"; // Can also use @
> instead of __at
What is this __data16 for?
M.
>>
>> extern __no_init BYTE __data16 pbYBufferAddressEp82[];
>>
>> with
>>
>> extern BYTE pbYBufferAddressEp82[];
>
> That will work. When you define pbYBufferAddressEp82 you will need:
>
> BYTE pbYBufferAddressEp82[HoweverBig] __at "NOINIT"; // Can also use @
> instead of __at
What is this __data16 for?
M.
Reply by ●May 13, 20112011-05-13
On 2011-05-13 13:05, Matthias Weingart wrote:
> "Paul Curtis" :
>>> extern __no_init BYTE __data16 pbYBufferAddressEp82[];
>>>
>>> with
>>>
>>> extern BYTE pbYBufferAddressEp82[];
>>
>> That will work. When you define pbYBufferAddressEp82 you will need:
>>
>> BYTE pbYBufferAddressEp82[HoweverBig] __at "NOINIT"; // Can also use @
>> instead of __at
>
> What is this __data16 for?
If a variable is placed in __data16 memory, i.e. 0-0xFFFF, it can be
accessed using classic MSP430 instruction. If it is placed in __data20
it must be accessed using more expensive MSP430X extended instructions.
In the small and medium data model, __data16 is the default memory.
In this case, the __data16 keyword is used to ensure that the variable
will be placed there regardless of the memory model used.
-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.
> "Paul Curtis" :
>>> extern __no_init BYTE __data16 pbYBufferAddressEp82[];
>>>
>>> with
>>>
>>> extern BYTE pbYBufferAddressEp82[];
>>
>> That will work. When you define pbYBufferAddressEp82 you will need:
>>
>> BYTE pbYBufferAddressEp82[HoweverBig] __at "NOINIT"; // Can also use @
>> instead of __at
>
> What is this __data16 for?
If a variable is placed in __data16 memory, i.e. 0-0xFFFF, it can be
accessed using classic MSP430 instruction. If it is placed in __data20
it must be accessed using more expensive MSP430X extended instructions.
In the small and medium data model, __data16 is the default memory.
In this case, the __data16 keyword is used to ensure that the variable
will be placed there regardless of the memory model used.
-- Anders Lindgren, IAR Systems
--
Disclaimer: Opinions expressed in this posting are strictly my own and
not necessarily those of my employer.