Page 1 of 1

IAR EW430 + Salvo + MSP430F5438

PostPosted: Thu Nov 13, 2008 8:33 am
by Unregistered User
We acquired samples of the new TI XMS430F5438 with the TS130P25x100 demo board. The devices seem to work well with IAR Embedded Workbench 4.11B.

When I build "tut2" tutorial program, which creates two very simple tasks, and link against the library salvoliarxit.r43, the watchdog timer hook causes a PUC when OSSched is called. The code looks right (both C
code and assembly code), but writing to the WDTCTL register causes the
PUC.

Including the salvohook_wdt.c file into the project, so that it recompiles that module with my latest compiler, makes everything work fine. I suspect that recompiling the libraries would fix the problem.


Re: IAR EW430 + Salvo + MSP430F5438

PostPosted: Thu Nov 13, 2008 8:37 am
by aek
So, that sounds like something re the register mapping and/or defined symbols is different between early MSp430X chips and the 'F5xx series -- not too surprising.

So, an interim solution is to do exactly what you did -- namely, to add the wdt hook back into the project as a source module, in which case it is recompiled (with the proper definitions for the 'F5xx), and no more problems. Note that among the hooks, the wdt hook is the only one that is hardware-specific (the others -- and the main Salvo code -- are only instruction-set specific), so the rest of the Salvo library works fine.

I suspect that what we'll have to do in the next release is compile the libraries with a dummy / blank WDT hook altogether, as the only other solution is to build separate MSP430X libraries for the 'F5xx series, which is a pointless exercise in additional complexity.

------------------


Re: IAR EW430 + Salvo + MSP430F5438

PostPosted: Thu Nov 13, 2008 11:24 am
by Bob Techentin
I'm not so sure this is a huge problem.

I rebuilt salvoliar430xit.r43 from sources, using IAR EW 4.11B, using your makefiles*, and it seems to work OK.

* (OK, I had to hack the makefiles a little, because the top level Makefile wasn't passing any options to Makefile2 for my Cygwin.)

Bob


Re: IAR EW430 + Salvo + MSP430F5438

PostPosted: Thu Nov 13, 2008 11:46 am
by Bob Techentin
Oops. Rebuilding the library didn't work. (I forgot to switch from simulator-mode to run it in the hardware.)

Bob


Re: IAR EW430 + Salvo + MSP430F5438

PostPosted: Thu Nov 13, 2008 11:59 am
by aek
Cygwin works fine here ... though it can be difficult to get it set up properly ... you're probably missing one of the required components.

Note that a build like you've been doing (library + wdt hook) is exactly the same as using a rebuilt library with no hook, in terms of compiler options. So my guess is that your rebuilt library is again being built for a non-5xx part, hence it won't work.

------------------


Re: IAR EW430 + Salvo + MSP430F5438

PostPosted: Thu Nov 13, 2008 12:03 pm
by aek
It's a huge problem because for the first time, (apparently) the WDT control registers have different defines based on which MSP430 we're talking about. In the past, the WDT was the same across all the families. Hence either we spin special 'F5xx libraries (which adds to the size of the installer, complexity of documenting which library to use, etc.), or we simply remove the "active" WDT hook from the distribution, and go with a dummy hook instead.

From the user's perspective, using the Salvo code remains the same no matter what, save for having to (optionally) define a WDT hook.

------------------


Re: IAR EW430 + Salvo + MSP430F5438

PostPosted: Tue Nov 18, 2008 8:38 am
by Bob Techentin
There are deeper problems that the WDT module. I created a modest 2-task application with some message passing, and context switching wouldn't work. I'm not going to describe the application or failure mode, because it seems to be just related to the library not matching the processor.

Source code builds work OK, since the application and the OS are all compiled against the XMS430F5438.

And I can rebuild a library using Cygwin. There is something goofy about the top level Makefile, because it tries to call Makefile2 with blank options. Maybe something with my Cygwin, but the usual "make -f Makefile msp430x" does not work. I can, however, call Makefile2 directly like this:

make -f Makefile2 salvoliar430xit.r43 F=iar430x CVER=4 T=OSL C=OST CLC=0 O=OS

Rebuilding the library with the latest compiler produces identical object files with the identical problem. But I found out that I can change Src/Make/IAR430/Makefile CFLAGS to "-D__XMS430F5438__" (instead of FG4619) and I get a working library.

So I can build a new library specifically for the F5438. I've got one of the FG4619 demo boards, so I could try my application out on that. But I don't know what would need to be done to test library backward compatibility.

How did you choose the F4619 as the "x" target? And how do you verify that it works over many different CPUs?


Re: IAR EW430 + Salvo + MSP430F5438

PostPosted: Tue Nov 18, 2008 8:56 am
by aek
1) You're missing a Cygwin element that is key to allow the top-level makefiles to call the lower-level ones. I'll try to figure out which one it is.

2) They key to figuring out whether "special" or separate libraries are required is to look at how many libraries are supplied with the compiler itself, and to correlate them against the particular part that you're building for. We have not yet done this with the 'F5XX series ...

3) The 'FG4619 works with our MSP430X libraries.

------------------