Even better: although the issue with huge memory was due to a bug
(3534574) in storing 20-bit integers into a packed structure, the TCB
structure in the FreeRTOS port shouldn't have been marked packed
anyway.  The port has been updated, and FreeRTOS now works in small,
medium, and huge memory models with mspgcc 20120606.

Known issues with 20120606:

* Don't use -mmemory-model=large
(https://sourceforge.net/tracker/?func=detail&aid=3534450&group_id=42303&atid=432701)

* Don't combine -fcode-sections -fdata-sections -mmemory-model=medium
-mcode-region=far
(https://sourceforge.net/tracker/?func=detail&aid=3534425&group_id=42303&atid=432701)

* Don't use the packed attribute on structures that have fields that
are based on int20_t/uint20_t
(https://sourceforge.net/tracker/?func=detail&aid=3534574&group_id=42303&atid=432701)

* Small interrupt routines might get placed into RAM when linking for
a chip that has a RAM mirror down at 0x0200 (e.g., the MSP430FG4618).
(https://sourceforge.net/tracker/?func=detail&aid=3532786&group_id=42303&atid=432701)

There are a couple others on the tracker page, but they're not too
likely to be an issue.

I hope everybody else is playing with this too.  I'm switching to work
PyXB for a couple days, but will check back regularly.

Peter

On Mon, Jun 11, 2012 at 5:22 PM, Peter Bigot <big...@acm.org> wrote:
> On Wed, Jun 6, 2012 at 4:31 PM, Peter Bigot <big...@acm.org> wrote:
>> Those of you that need to implement context switch support might be
>> interested in https://github.com/pabigot/freertos-mspgcc which
>> provides FreeRTOS platform files that use the new 20-bit mspgcc
>> features.  The relevant code can be browsed at:
>>
>> https://github.com/pabigot/freertos-mspgcc/blob/master/Source/portable/GCC/MSP430/port.c
>>
>> I've validated preemptive and non-preemptive task switching using all
>> memory models on one very simple EXP430F5438-based demonstration.
>> Depending on how things go, I may do more over the next couple days.
>
> I've done a bit more, and am pleased to say that porting the standard
> EXP430F5438 demo from the CCS version present in FreeRTOS 7.1.1 was
> pretty trivial, and that 20120606 can successfully run it under the
> medium memory with all non-library code placed in far memory:
>
>  cd Demo/MSP430X_MSP430F5438_MSPGCC
>  make clean TARGET_FLAGS='-mmemory-model=medium -mcode-region=far' install
>
> This is supposed to be a pretty heavy stress test, with blinking
> lights, context switches, serial port stuff, a couple types of button
> presses, and LCD output.
>
> Porting this did reveal a couple bugs which have been added to the
> tracker, but all of the ones for medium memory model could be worked
> around in source.
>
> Small memory model works too, as one would expect.  Large runs afoul
> of the previously mentioned tree optimization issue in gcc, while huge
> has a different undiagnosed problem that leaves garbage in the upper
> four bits of 20-bit registers.
>
> I expect that 20-bit support will be of biggest value when using
> medium memory model, so if you've been holding off until there's
> evidence that mspgcc works, I think the basics are there.
>
> Again, that's all at: https://github.com/pabigot/freertos-mspgcc
>
> Peter
>
>>  cd Demo/exp430f5438
>>  make clean XCFLAGS='-mmemory-model=medium -mcode-region=far' demo.elf
>>  mspdebug -j uif 'prog demo.elf'
>>
>> Peter

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to