MCU design and development of small Tips: specific steps and methods to create and transplant K10 BSP package

1. Creation of K10 BSP package

When developing KineTIs series MCUs based on MQX4.0, it is usually necessary to support the BSP of the corresponding MCU. However, in MQX4.0, there is no ready-made BSP package for K10, so it needs to be created by the user. The easier way to create is to select the BSP of the closest MCU from the existing KineTIs BSP package as a template, and then modify and migrate it based on it. This article describes the specific steps and methods for modifying and porting BSPs.

Typical BSP packages that are currently available include:

• The BSP package for KineTIs 50MHz devices is twrk20d50m

• The BSP package for KineTIs 72MHz devices is twrk20d72m

• Support for Kinetis 100MHz devices, 3 BSPs for version 1.x, twrk40x256, twrk53n512 and twrk60n512

• Support for Kinetis 100MHz devices, 2 BSPs available for version 2.x, twrk40d100m and twrk60d100m

• Two BSP packages supporting Kinetis 120MHz devices are twrk60f120m and twrk70f120m

For example, for K10DN512ZVLQ10, the mask number is 4N30D, the corresponding version is 1.x, and its main frequency is 100MHz, so the BSP of twrk60n512 can be used as a template, and the modification and porting can be performed on this basis.

2. BSP package code generation

First download and install MQX4.0 from Freescale's official website https://. Other early versions, such as MQX3.8, MQX3.7, etc., can be found here, all with the MQX BSP Cloning Wizard tool. You can use this tool to create and migrate BSPs by following the steps below.

2.1 New BSP

After selecting NEW MQX BSP Clone in the File menu, the interface shown in Figure 1 appears. Enter the name K10DN512 in Name, then select twrk60n512 as its Board Base, and finally click Finish.

Figure 1. Creating a new BSP

Figure 1. Creating a new BSP

Then there will be a window as shown in Figure 2. Under this interface, you can select CW10.x or IAR or KEIL as the development platform, and whether you need to generate options for libraries and routines such as BSP, PSP, MFS, RTCS, USB, etc. . It should be noted that since the K10 itself does not include USB and Ethernet modules, do not select the appropriate option.

Figure 2. Choosing the development platform and associated software libraries

Figure 2. Choosing the development platform and associated software libraries

2.2 Generate BSP package

In order to simplify the operation, only select the IAR development environment, and only choose to generate BSP, PSP and MQX routines, then click Generate MQX Projects to start creating new BSP code, as shown in Figure 3.

Figure 3 Click on the project to generate the BSP package

Figure 3 Click on the project to generate the BSP package

Then in the C:\Freescale\Freescale_MQX_4_0\config\K10DN512 directory, find the BSP code generated for IAR just now, use the IAR development environment to select File->Open->Workspace, open the build_libs.eww project. As shown in Figure 4.

Figure 4 Open the IAR BSP project

Figure 4 Open the IAR BSP project

Note: When opening this project, it will prompt whether the RTCS, MFS, USB and other libraries should be loaded. Since this document only transplants the basic BSP and PSP packages, and only checked these two items in Figure 2, you can ignore the loading of MFS, RTCS, USB and other packages except BSP and PSP. Click to confirm It will be fine. If you need to use other packages in the actual application, you need to check the corresponding Libraries library and reference code options in Figure 2, and then generate the code.

Hengstar provides a range of Industrial Fanless Pc for industrial automation environments. The PC is powered by a fanless Industrial Motherboard, with onboard Intel Atom N270 1.6G Hz CPU or Intel Atom D525 dual core 1.8G Hz CPU, and a Solid State Drive, making the PC very compact and rugged in structure. We also have H61 motherboard. It supports Intel Core i3/i5 CPU. Customer can have a high-performance PC by using this H61 motherboard. Hengstar`s industrial fanless PCs suit for the harshest industrial environments and comply with various international NEMA and IP standards.

Fanless Panel PC

Fanless Industrial Computer,Industrial Fanless Pc,Fanless Embedded Computer,Fanless Touch Panel Pc

Shenzhen Hengstar Technology Co., Ltd. , https://www.angeltondal.com