Overview

 

NETMF for FM3 is targeted for SPANSION Cortex-M3 FM3 CPU and Cortex-M4 FM4 CPU. It is based on the “MCBSTM32E” solution (which “Oberon microsystems, Inc” implements. Thank you very much.) of the Porting Kit.

The files on the NETMF for FM3 project are delta files from .NET Micro Framework 4.3 Porting Kit (QFE1).

The previous files are delta files from .NET Micro Framework 4.2 Porting Kit (QFE2).

NETMF for FM3 currently supports for the following boards.
- SK-FM4
- KS_MB9BF568

- KS_MB9BF506
- CQ_FRK_FM3
- CQ_FRK_FM3 + WKFM3
- CQ_FRK_FM3 + WXMP3PLCD_F + WXPHY
- CQ_FRK_FM3 + WXMP3PLCD_FL + WXPHY
- CQ_FRK_FM3 + CQFM3DUINO
 

 

Documentation

 

SK_FM4

SK_FM4 solution is targeted for SK-FM4-U120-9B560 FM4 MCU Evaluation Board.

SK-FM4-U120-9B560


 

KS_MB9BF568

KS_MB9BF568 solution is targeted for a handmade board using MB9BF568R CPU (FM4).

 

KS_MB9BF506

KS_MB9BF506 solution is targeted for a handmade board using MB9BF506N CPU (FM3 type0).
The part of the schematic is referring to KSK-MB9BF506 via IAR Systems.
Therefore KS_MB9BF506 (not KSK-MB9BF506) may work on IAR KickStart Kit for MB9BF506R(KSK-MB9BF506) as well.
IAR KickStart Kit

 

CQ_FRK_FM3

CQ_FRK_FM3 solution is targeted for a board released by CQ Publishing in Japan, using MB9BF618T CPU (FM3 type2).
The board is bundled with the magazine of "Interface" Jun-2012 edition.
Product (in Japanese)
Schematic (pdf)
Pin (pdf)
CQ_FRK_FM3 solution may work on IAR KickStart Kit for MB9BF618T as well.

 

WKFM3

WKFM3 solution is targeted for the above "CQ_FRK_FM3" board with the "WKFM3" board which is released by WAKAMATSU TSUSHO.
Product (in Japanese)
Schematic (pdf)

 

 

WXMP3PLCD_FM3

WXMP3PLCD_FM3 solution is targeted for the above "CQ_FRK_FM3" board with "WXMP3PLCD_F" and "WXMP3PLCD_FL" boards which are released by WILL Electronics.
WXMP3PLCD_F
Product (in Japanese)
Schematic (pdf)
WXMP3PLCD_FL
Product (in Japanese)
Schematic (pdf)

 

CQFM3DUINO

CQFM3DUINO solution is targeted for the above "CQ_FRK_FM3" board with "CQFM3DUINO”, which is a handmade extension board.

 

Specification

 

T.B.D. ( Need to be updated for new boards)

The following table shows overview of specification for each board (solution).

Serial, SPI and I2C share same GPIO pins. Therefore some sets of GPIO pins are partly selected for each function.

 

Function

CQ_FRK_FM3

WKFM3

WX-MP3PLCD-FM3

KS_MB9BF506

GPIO

Serial

3 channels (ch0, 3,4)

3 channels (ch0, 3,4)

3 channels (ch0, 3,4)

3 channels (ch0, 3,4)

SPI

2 channels (ch6, 5)

2 channels (ch6, 5)

2 channels (ch6, 5)

2 channels (ch6, 5)

(SD card uses 1 ch)

I2C

3 channels (ch1, 5, 7)

3 channels (ch1, 5, 7)

3 channels (ch1, 5, 7)

3 channels (ch1, 5, 7)

PWM

Analog

USB function

SD Card

Option (*1)

Option (*1)

Ethernet

Option (*2)

Option (*2)

N/A

LCD display

Option (*2)

Option (*2)

Option (*2)

Touch Panel

Option (*2)

Option (*2)

Option (*2)

External Memory

Option (*2)

Option (*2)

○ (1MB or 2MB)

Option (*2)

 

*1: P31(CLK), P32(MOSI), P33(MISO), P30(CS) Pins are configured for SD card.

*2: To use the function, need to build after changing configuration in the project file.

 

How to use

 

1.        Write TinyBooter/TinyCLR binary

 

Please download TinyBooter / TinyCLR / TinyCLRNBL (no bootloader version of TinyCLR) from “Released” folder and write them on each board using SPANSION FLASH USB DIRECT Programmer (for TinyBooter and TinyCLRNBL) or MFDeploy (for TinyCLR). TinyCLRNBL is “no bootloader” version of TinyCLR.

 

SPANSION FLASH USB DIRECT Programmer can be downloaded from the following URL.

http://www.spansion.com/Support/microcontrollers/developmentenvironment/Pages/usb-direct-agreement.aspx  

http://www.spansion.com/jp/support/microcontrollers/development-environment/pages/downloads-flash-usb-direct.aspx  (In Japanese)

 

2.        USB driver

 

The USB drivers are included in the “CQ-NETMF-USB” folder.

The source files of the USB drivers are as it is included in the Porting Kit.

 

3.        Copy Interop Assembley files

Several interop assembly files in DeviceCode\Targets\Native\Interop\ManagedCode\xxxxxx\bin directories need to be copied to SDK directory (C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies). They are also stored in Released\xxxxxxxx\SDK_Assemblies directory. They are for handling LCD, SDCARD and so on.

 

How to Build

1.        Preparation

The following tools should be installed on Windows environment.

- GCC (supporting Cortex-M3)

Recommendation: Sourcery CodeBench Lite Edition by Mentor Graphics

“arm-2013.11-24” version is (GCC 4.8.1) is used.

“arm-2010q1-188” version (GCC 4.4.1) is used for compiling except for TinyBooter.

“arm-2012.09-63” version (GCC 4.7.2) is used for TinyBooter to reduce the size within 32KB.

GCC 4.7.2 can create highly size-optimize code, but it had an issue of compiling TinyCLR (FM3_GPIO_functions.cpp).

- Visual Studio 2012 Express

- .NET Micro Framework 4.3 SDK (QFE1)

- .NET Micro Framework 4.3 Porting Kit (QFE1)

The SDK and the Porting Kit can be downloaded from https://netmf.codeplex.com/releases/view/118283

 

The files on the NETMF for FM3 project are delta files from .NET Micro Framework 4.3 Porting Kit (QFE1).

The source files should be overwritten on the root directory where the Porting Kit is installed.

The default root directory is C:\MicroFrameworkPK_v4_3.

 

2.        Build steps

1. Install above tools

      Install GCC (C:\CodeSourcery\arm-2013-11.24)

      Install Visual Studio 2012 Express

      Install .NET Micro Framework 4.3 SDK (QFE1)

      Install .NET Micro Framework 4.3 Porting Kit (QFE1)

 

2. Copy (Overwrite) the files on the NETMF for FM3 to the Porting Kit root directory.

 

3. Configure the build environment by executing "setenv_base.cmd".

      Execute "Command Prompt"

      cd C:\MicroFrameworkPK_v4_3

      setenv_base.cmd GCC 4.8.1 "C:\CodeSourcery\arm-2013-11.24"

 

   Note: Might need to modify setenv_base.cmd, based on the build tools and environment.

 

4. Create the Porting Kit tools (such as MetadataProcessor, MFDeploy and so on) and a part of .NET Micro Framework library files.

      msbuild.exe build.dirproj (on the Porting Kit root directory)

 

   Note: Although there might be several build errors, they could be neglected.

 

5. Build each solution.

   Move the directory where each solution exists and execute build command.

 

      cd Solutions\CQ_FRK_FM3

      msbuild.exe dotNetMF.proj /t:build /p:flavor=release;memory=flash

 

6. Tinybooter and TinyCLR binary files are created on C:\MicroFrameworkPK_v4_2\BuildOutput\THUMB2\GCC4.7\le\FLASH\release\CQ_FRK_FM3\bin

 

      tinybooter.ihex       - TinyBooter binary (for writing to use SPANSION USB DIRECT Programmer)

      tinyclr.hex\ER_FLASH  - TinyCLR code binary with TinyBooter (for writing to boards to use MFDeploy and TinyBooter)

      tinyclr.hex\ER_CONFIG - TinyCLR configuration binary (for writing to boards to use MFDeploy and TinyBooter)

      tinyclrnbl.ihex     - TinyCLR code binary without TinyBooter (for writing to use SPANSION USB DIRECT Programmer)

 

Appendix

 

T.B.D. ( Need to be updated for new boards)

 

Flash Sector Map

 

The flash sector map of MB9BF618T (1MB) is as follows. MB9BF506N (512MB) is the same as the first 512MB of MB9BF618T.

 

 

Component

CQ_FRK_FM3

WKFM3

WXMP3PLCD_FM3

KS_MB9BF506

with bootloader
(TinyCLR)

without bootloader
(TinyCLRNBL)

with bootloader
(TinyCLR)

without bootloader
(TinyCLRNBL)

with bootloader
(TinyCLR)

without bootloader
(TinyCLRNBL)

with bootloader
(TinyCLR)

without bootloader
(TinyCLRNBL)

Flash size

1MB

1MB

1MB

512KB

TinyBooter

0x00000000

 

0x00000000

 

0x00000000

 

0x00000000

 

32KB (USB only)

 

32KB (USB only)

 

32KB (USB only)

 

32KB (USB only)

 

TinyCLR / TinyCLRNBL

0x00008000

0x00000000

0x00008000

0x00000000

0x00008000

0x00000000

0x00020000

0x00000000

608KB

640KB

608KB

640KB

608KB

640KB

384KB

384KB

Deployment

0x000A0000

0x000A0000

0x000A0000

0x000A0000

0x000A0000

0x000A0000

0x00008000

0x00060000

256KB

256KB

256KB

256KB

256KB

256KB

96KB

128KB

Config

0x000E0000

0x000E0000

0x000E0000

0x000E0000

0x000E0000

0x000E0000

 

 

128KB

128KB

128KB

128KB

128KB

128KB

 

 

 

 

The KS_MB9BF506 solution doesn’t have the config section as a flash sector, instead it is included in the code section (TinyCLR). To do that, blockstoragelist.cpp is modified.

 

Button Configuration

 

Function

CQ_FRK_FM3

WKFM3

WX-MP3PLCD-FM3

KS_MB9BF506

VK_MENU

NONE

NONE

P59 (SW_C)

NONE

VK_SELECT

NONE

NONE

P95 (SW_D)

NONE

VK_LEFT

NONE

NONE

P54 (SW_A)

NONE

VK_RIGHT

NONE

NONE

P56 (SW_B)

NONE

VK_UP

NONE

NONE

NONE

NONE

VK_DOWN

NONE

NONE

NONE

NONE

VK_HOME

NONE

NONE

NONE

NONE

VK_BACK

NONE

NONE

NONE

NONE

 

Last edited Apr 20, 2014 at 3:10 AM by ksekimoto, version 8

Comments

No comments yet.