westmorelandeng wrote on Monday, November 04, 2013:
Hello RTOSer’s and Richard,
Someone has asked me to look at the port for the MSP430F6659. Note this '430 has a discontinuous memory space for internal RAM - there is a lower 16KB < 0xFFFF and the rest ~ 49KB is greater than 0xFFFF. The part has 66 KB of RAM and 512 KB of FLASH - so it is one of the ‘bigger’ '430’s.
The ‘regular’ '430 demo works fine as long as you don’t allocate too much memory. So, what does that mean?
I had a port handy for the '5635. I didn’t have the hardware at first - the other port I posted was from stuff in the simulator. I thought I had something that would work. I modified the port the blink the 3 LED’s on the 'PZ100USB demo board from TI - the usual LED tasks run fine using the usual demo code - no problem.
But when I try to allocate > 20KB using the FreeRTOS heap manager - the port fails. I tried this with heap_1 and heap_3. Using the malloc from IAR resulted in the same thing when trying to allocate > 20KB.
I looked in the map files in both instances - and noticed this difference:
In the first case - where I allocate around 14KB of memory - the DATA20_Z segment falls into:
DATA20_Z 2406 - 5E2F 3A2A rel 1
and in the case that fails:
DATA20_Z 000F0000 - 000F5229 522A rel 1
I took a look at the port assembly and I don’t think the problem is there - but I am not 100% certain yet. I have traced through it - one problem is the tools become a bit unstable when an error occurs; so it will take some additional time to determine what is wrong.
I am using v7.5.3 in the port.
So - there seems to be a problem with addressing - when something is in the DATA20_Z segment when it is mapped > 0xFFFF by the linker - the port fails. I have checked the variables that are addressed int the port assembly - I tried changing those - but the port fails in the same way.
Note xTickCount does not increment before the failure - so we are not reaching that yet. All of the demo tasks are made successfully.
The 430 has a requirement to have all IRQ code in the lower memory - at or below 0xFFFF - I don’t think there is an issue - vPortTickISR in the port is below 0xFFFF in case you were wondering.
I will post results as I have them - I am working on this currently on a time available basis.
Thanks,
John W.