. NET Micro Framework 4.2 beta source code analysis

Source: Internet
Author: User
Tags ftp client

. NET Micro Framework 4.2 beta has been released for some time and has not made time to study it. Yesterday, due to the LWIP protocol stack (I feel that the previous version has a problem), I just got the code, so I took a moment to study it.

The major change in this version is to support remote security upgrades, VB.net program development, pwm and ad.

1. Application directory

A MicroBooter directory is added, which is called the remote security update function. It works with MFDeploy to complete the upgrade function.

2. CLR directory

The Libraries directory contains three more directories.

(1) SecurityPkcs11

Data packets (or objects) are processed securely, with a lot of code and relatively complicated.

(2) SPOT_PWM

PWM support library

(3) SPOT_Update

The Remote Upgrade support library feels that these methods have been exposed to the user program (including SecurityPkcs11). Does the user program control the upgrade process by itself?

Several files have been modified.

In the Debugger. cpp file, Flash has three more BLOCKTYPE_SIMPLE_A partitions for reading and writing Memory.
BLOCKTYPE_SIMPLE_ B

BLOCKTYPE_UPDATE -- region corresponding to Remote Upgrade

In addition, it is the specific Code related to the upgrade.

The Debugger_full.cpp file contains four additional communication commands.
UpgradeToSsl

MFUpdate_Start

MFUpdate_AddPacket

MFUpdate_Install

It seems that this upgrade process can be encrypted through ssl.

Corlib_native.cpp (mscorlib. dll)
Added Base64 encoding and decoding.

Corlib_native_System_Numer.cpp
Enhanced Format output. From the code perspective, it seems that ToString ("X") is supported ")

Spot_native.cpp (Microsoft. SPOT. Native. dll)
The method related to Cryptography_Key_RSA is removed.

Spot_hardware_native.cpp (Microsoft. SPOT. Hardware. dll)
Added support for pwm and ad.

3. DeviceCode directory

The change is bigger. I only want to talk about a few important ones.

(1), stubs_analog

AD Template File

(2) stubs_PWM

Pwm Template File

(3) MFUpdate

Remote Upgrade function interface at the PAL Layer

(4) NetMFPkcsCrypto

Integrate PKCS11 in OpenSSL

(5) PKCS11

PKCS #11 v2.11 password token Interface Standard

(6) SimpleStorage

Read and Write Flash files in a similar way

File changes:

Blockstoragelist. cpp
Added the IsErased method.

AT91 directory
Supports AT9263 CPU

4. Formework directory

The changed directories mainly include the following:

(1) Native_PWM

PWM class library

(2) Native_Update

MFUpdateProperty class library

(3) FTP

FTP Client and Server support

(4) Security

X509Certificate2 class library

(5) Update

MFFirmwareUpdate class library;

MFAssemblyUpdate class library;

MFKeyUpdate class library;

MFUpdate class library;

MFUpdateVersion class library;

(6) PKCS11

PKCS11 class library

The main changes to the file are as follows:

DPWS has relatively large modifications, and most of the main files have been modified.
CPU. cs
Added enumeration of PWM and Analog

NetworkSeurity. cs
Added the X509Certificate class.

IPAddress. cs
Added the getdefalocallocaladdress method.

WireProtocol. cs
Add c_MEMORY_USAGE_UPDATE

C_MEMORY_USAGE_SIMPLE_A

C_MEMORY_USAGE_SIMPLE_ B

Estimated: c_MEMORY_USAGE_UPDATE = 0x0060 is incorrect. It should be 0x00000060.

Conver. cs
Added the ToBase64String and FromBase64String methods.

Number. cs
Format conversion, supporting "X" characters

MFDeployForm. cs
Supports remote deployment of files with the. nmf extension.

MFDevice. cs
Added support for MicroBooter

5. Solutions directory

Added support for the SAM9263_EK Platform

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.