Thursday, April 14, 2011

New kit on the blog

At the last Embedded World show it was Cortex-M3 everywhere and I discovered that Fujitsu (now?) also sells cheapish development kits for their Cortex-M3 products. I obtained one of these kits, the SK-FM3-100PMC, to check out. The kit contains an SK-FM3-100PMC board, an AB type USB cable, a CDROM and a sheet with additional information. It does not contain the promised CD/DVD with Softune Workbench mentioned in the additional information.

On the board you’ll find an MB9BF506N processor (100 pins, 80 MHz, 512 KB flash, 64 KB RAM, 8 multifunction serial ports, 2 CAN ports & USB host & device, plus of course the usual timers and PWM-like peripherals, DMA and what not). Available connectors are UART-A RS-232 (9-pin female subd), UART-B USB (type A), CAN (9-pin male subd), USB host, USB device (type A), 20-pin JTAG (as usual the wrong way around for my Keil pod, Keil even gets this wrong on their own boards. Actually the cable is upside down on the pod) & Trace and headers for all the processor’s pins. On-board gadgets are two 7-segment LED displays (I always like that) and two square white push buttons.

The board can be powered from a multitude of sources: externally feeding a 1117 5V regulator, JTAG and both USB-A connectors. The processor itself will work from 2.7V up to 5.5V, meaning that this is one of the rare Cortex-M3 devices that can run directly from 5V.



Lets go!
Insert the CDROM and connect the board to the PC using the UART-B connector. A pretty well written Readme file pops up that guides you through the process of setting up a development environment for the kit. Driver installation is very easy, Windows can do it all alone (except for the usual “Do you really want to do this?” nagging). When the board is powered the 7-segment display starts counting up to 99 and then stops. Pressing the INT0 push-button makes it count down to 00, pressing INT1 makes it count up again.

The readme also describes how everything should be packed in the box, which is cool if you want to put it away properly.

The board has a reset LED, interesting. It lights up when you press the (square blue) reset button. Such an LED is maybe helpful to detect situations where the board is kept in reset without you wanting to?

The CDROM contains a free serial port terminal program SKwizard. This utility only knows about four COM ports, when my board is on COM20… Luckily the flash programming tool FM3 can handle COM ports up to nr. 20 (phew…). Yes, I know you can assign a different number to a virtual COM port, but this is poor/old school programming. The other flash programming tool (there are two) allows port numbers up to 255.

To test ease of (re)programming the board I first tried the FM3 flash tool. This one uses the serial port for programming and is pretty straightforward to use. The only weird thing (besides the COM port numbers) is that the file picker wants an S-record file, but only knows the extensions MHX, CNV & AHX, and not the SREC files that come with the kit.

The second tool for direct USB programming over the USB device port is a bit more difficult to get started, because it needs a driver that is not on the CDROM and I could not find it on the Fujitsu website either. Contacting Fujitsu taught me that the driver is hidden in the installation folder of the Flash USB Direct tool (on my PC: c:\Program Files\Fujitsu\FUJITSU USB DIRECT Programmer\driver\). I was also told that no drivers are available yet for Windows 7, but they are coming. Once the driver installed (COM 22!), I could reprogram the board. To my surprise direct USB programming turned out to be as slow (or fast, but I prefer slow in this case) as serial port programming. However, I did like the friendly message after successful programming: “It ended normally completely”. (Probably to be pronounced with a Japanese accent.)

Example code is provided for IAR and Keil compilers. I did have Keil uVision 3 with a ULINK2 pod, but you need version 4 to open the project files, so I downloaded & installed an upgrade of 312 MB. Now with my brand new version 4 I could indeed open the example projects.

What the people at Fujitsu forgot to mention is that you have to copy the examples to your hard disk otherwise uVision will not be able to build them as it tries to create files in the project folder. More annoying is that they also did not mention that you have to manually select the device - for some reason the project does not include the device – otherwise you cannot flash the board after a build and you receive confusing error messages. So, before building a project, select the device: Project -> Options for Target, click on the Device tab and select the MB9BF506N. This will also load the correct flash algorithm file. Now build the project and load it in the processor with your ULINK2, ME or PRO pod.

If you look closely at the project files you will see a file named FLASH_DEBUG_README.txt. This file says that you should copy an FLM file from the project to the Keil environment, but it seems that uVision 4 already contains usable flash files that get loaded when you select the target device.

I could not try trace recording, because you need a ULINK Pro for that.


The board in a Keil uVision 4 / ULINK2 environment.

Now that I am finally ready to start developing for this board it is a shame to discover that there doesn’t seem to be a nice Fujitsu library encapsulating all the peripherals of the chip and the board; some sort of a BSP as people like to call it nowadays. The best they have come up with is an empty template project, a bit meager.

Documentation includes full schematics of the board, but it is lacking a mechanical drawing with the positions of the break-out connectors that seem to be placed on a convenient 0.1 inch grid. So measure carefully when you design an extension card for it.

Tuesday, April 5, 2011

Open4 EvoPrimer

In the previous post I mentioned the Open World Design Contest launched by ST and others. The participants who make it into the second round will get free development tools, notably the EvoPrimer platform.

This platform is actually a very interesting set of tools developed by Raisonance under the name of Open4 (read as “Open for …”). The system is very open indeed and schematics and source code can be downloaded for free. A system consists of a base, a kind of multimeter-sized pod, and target boards that slide into the pod. The base offers the human interface like a color touch screen, a joystick, buttons, LEDs, audio I/O, IrDA, accelerometer and a li-ion battery with charger, the target board offers the applications.


Open 4 dissection...

Several target boards are available, with 8-bit and 32-bit processors from ST, but you can also develop your own. When you open the base you get access to a connector for extension cards that can slide through an opening under de joystick (if you remove the cover). This connector is the main way to go for those who want to add something to the system.

Software development is done with the Ride7 IDE, also from Raisonance, using GCC. The free version lets you compile and flash any size of code and debug executables of up to 32 KB. You have to pay for unlimited debugging. The IDE connects directly to the base through a USB port, without the need for additional programming or debugging pods. Ride7 also offers an ARM simulator.

Instead of writing all the GUI code yourself, you should (but you are not obliged to) built your application on CircleOS. It is not clear to me who the owner is of this OS, but the main thing is that it is free and open source software. CircleOS handles the display, the touch screen and all other hardware that is built in the EvoPrimer base. It also calls the user application on a regular basis and it lets the application interact with the OS to obtain button states etc. Applications are stored in a special memory area and there is room for several of them. The OS will allow the user to select the application from a menu. The application memory available depends on the target board you are using.


Ride7 is a nice IDE indeed!

Although Raisonance and their tools seem to concentrate on microcontrollers from ST, the Ride7 IDE can also be used for ARM-based controllers from other brands. It happily supports many NXP and TI (Luminary) models and if you look in the Ride7 installation folders you will find more supported processors than that the IDE lets you choose from. If you don’t like Eclipse (who does?) and if you don’t mind debugging the hard way, this is a very nice IDE for ARM development. My next Sceptre project will probably be done using this IDE.

Oh, did I mention the price of an EvoPrimer kit? About 100 euros for a base with target board!