MSP430 IAR / FreeRTOS v4.0.1 Update. This update contains the entire FreeRTOS v4.0.1 distribution with the additions/modifications needed to support the MSP430F169 Eval. board port. The builds that are contained in this zipfile are made with the latest EW430 release available from IAR - that's version 3.41A as of this writing. This file has been updated to reflect anything new per the MSP430F169 Eval. Board from Elprotronic. The MSP430F169 Eval. board that I have has been updated with an MSP430F1611 - but I've included a *.txt file (TI-format) that will load on the eval. board with the '169 installed. I've noted things that you'll have to change in the code - like memory sizes, etc. The *.txt files are found in ..\Debug\Exe\... You can load the *.txt files onto the eval. board and observe LED's 1-4 blinking according to the default LED task 'pattern' and ASCII 'A' thru 'z' will print out of the serial port @ 115.2KB, 8 bits, 1 stop-bit, no parity. Note you'll need a NULL modem cable connected to the serial port of the eval. board. A NULL modem cable is a cable that crosses pins 2 and 3. A straight-through cable won't work - you won't see anything printing out unless you attach a NULL modem adapter or NULL modem cable. Notes: This file is just here as a suggestion on how to get going - plus gives a 'state of the port' - please read under prvSetupHardware() and port.c below as a minimum: Files to modify for your target: ..\Demo\msp430_iar: take a look at main.c: - (also, in case you're porting to another target - these are good hints:) mainly prvSetupHardware(): clocking and I/O's are set-up there - VERY important! You must first change prvSetupHardware() to match your target. There's a lot of example I/O setup there - you may damage your target if you don't match the I/O to your target. FreeRTOSConfig.h - configCPU_CLOCK_HZ - default here is (6MHz For The MSP430F169 Eval. Board) 8MHz FreeRTOSConfig_asm.h - copy of the above to be included in assembler file (below). in main() - put in what you want to try and run - but look at the functions first. I have commented out vStartLEDFlashTasks() because my target doesn't match that... (the MSP430F169 Eval. board has LEDs 1-4 as mentioned above - so it is included - you can customize as you wish) In main() - 21 (or so)tasks are started - at this point I think all of them are running OK - you can monitor the usTaskCheck[] array and you should see all of the counters increment - indicating that pvParameters must be working OK. You can also monitor sBlockingProducerCount[] and sBlockingConsumerCount[]. For the '169 - the LED tasks are started - since there are only 4 - that's 4 for them. The COM tasks are started - that's two more, plus an error check task plus the IDLE task for a total of 8 tasks. You can experiment with the other tasks - that's what I used for the '169. There's also a *.txt file included that only runs these same 8 tasks on the '1611. Otherwise - the default *.txt file that will be built will make the 21 or so tasks that are meant to run on the '1611. This port was done with the MSP430F1611 in mind - you'll want to take a look at: FreeRTOS\Source\portable\msp430f1611: (the port uses this even if you build for the '169 - you can change that in the compile options) interrupt_grabber.c - just a debug file that will 'grab' - spin (while (1)) if an unexpected interrupt is generated by your target. Just edit this as needed. If you get INTVEC 'collisions' at link time - more than likely you need to edit this file. Lowinit.c - included with the IAR Compiler - helps to initialize unused areas in memory - helpful in finding that pointer marching through memory - in the workspace I've defined this as (FF3F) - JMP HERE.... port.c - take a look and modify as needed. This is where the issue exists with R12 copying pvParameters into R10 - I've tried to fix this in this port but I won't 100% guarantee it'll work in all cases. There are some instances of data types in which this may not work with the IAR compiler - at least that's my current understanding. AFAIK though - this is working OK. portext.s43 - MSP430 file with context save/restore macros and what's necessary for the timer tick. I basically cloned the MSPGCC and xWorks ports as a starting point obviously. portmacro.h - take a look and modify as (or if) needed. This port uses the serial.c file in the xWorks port (modified): ..\Demo\msp430_Crossworks\serial\serial.c: take a look at that and modify as needed. This port also uses the ParTest.c file in the xWorks port (modified also): ..\Demo\msp430_Crossworks\ParTest\ParTest.c: take a look at that and modify as needed. portable.h: ..\Source\include\portable.h: IAR_MSP430 is defined there. It's also a C preprocessing #define... You'll need to modify this as needed. This port is supplied as is and is posted as a 'public service'. If you have questions I'll be happy to attempt to help; but you'll probably be better served by looking at www.FreeRTOS.org or asking Richard Barry. You can post a question at http://www.sourceforge.net/projects/freertos/ look for Forums on the toolbar and post there. It's also useful to search the forum archives because the issue you may be having has happened to someone before and you'll be able to benefit from their prior experience by reading the forum threads. As a reminder: FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Have Fun, John C. Westmoreland April '06