天天看點

.NET Micro Framework V4.2 QFE2新版本簡介

*Micro Booter 代碼優化調整

*浮點運算相關代碼進行了調整

*CLR_RT_HeapXXXX等相關函數,增加了CLR_UINT32 blockSize  這個參數

*64位長整轉字元串的bug已經解決

*增加了DA接口(模拟量輸出)

*引入了g_fDoNotUninitializeDebuggerPort全局變量,調試口解除安裝要進行判斷

if(!g_fDoNotUninitializeDebuggerPort)

{

   DebuggerPort_Uninitialize(m_port );

}

*損耗平衡代碼

\MicroFrameworkPK_v4_2_QFE2\DeviceCode\Drivers\BlockStorage\WearLeveling\BS_WearLeveling_Driver.cpp

損耗平衡相關代碼進行了大幅度的修改,以前我測試過程中發現,這段代碼實作的有問題,希望這次改進,能解決以前的遺留問題。

*檔案系統代碼

\MicroFrameworkPK_v4_2_QFE2\DeviceCode\Drivers\FS\FAT\FAT_FileHandle.cpp

\MicroFrameworkPK_v4_2_QFE2\DeviceCode\Drivers\FS\FAT\FAT_SectorCache.cpp

如果不啟用損耗平衡功能,檔案系統在寫比較大的檔案的時候,就會出現問題,看此次修改的代碼,資料緩存做了一定的處理,等我移植好相關代碼,測試一下,看看是否還存在類似問題。

另外定義了一個 FAT_FS__DO_NOT_UPDATE_FILE_ACCESS_TIME 宏,因為檔案系統中,如果檔案一修改,就更改修改時間,代價還是蠻高的,如果不是特别在意檔案的修改時間,又對檔案系統操作的性能有要求,應該在配置檔案中,定義這個宏。

*WinUSB

由于引入了WinUSB,是以在USB配置檔案裡,徹底去掉了Sideshow(以前vista系統控制台中有該功能,Win7中給去掉了)的支援。

\MicroFrameworkPK_v4_2_QFE2\Framework\Debugger\WinUsb

\MicroFrameworkPK_v4_2_QFE2\tools\bin\Test\WinUsbInvoke.dll

WinUSB驅動

\MicroFrameworkPK_v4_2_QFE2\USB_Drivers\WinUSB\DriverPackage\win7

*bool HAL_CONTINUATION::IsLinked()

異步處理,增加了這個函數

*LWIP協定棧

\MicroFrameworkPK_v4_2_QFE2\DeviceCode\pal\COM\sockets_lwip\sockets_lwip.cpp

部分代碼也進行了調整

* SSD1289顯示驅動

\MicroFrameworkPK_v4_2_QFE2\DeviceCode\Drivers\Display\SSD1289

顯示增加了一晶片SSD1289的支援

*Touch

增加了一個 TouchScreen.cs 檔案

*TestMFProfiler(上一個版本也有)

有一個比較有用的測試工具\MicroFrameworkPK_v4_2_QFE2\tools\bin\TestMFProfiler.exe

可以充分評測目前的運作的程式的各種參數。

不過這次更新也引入了一些問題

1\MicroFrameworkPK_v4_2_QFE2\CLR\Core\HeapPersistence\Heap_Persistence_stub.cpp

很奇怪,這個檔案裡面的代碼應該是空的,不知道為啥全填寫了具體的實作代碼

2\MicroFrameworkPK_v4_2_QFE2\CLR\Libraries\SPOT_Hardware\SPOT_Serial\spot_hardware_serial_native_System_IO_Ports_SerialPort.cpp

該檔案中增加了一個 break,不太了解,因為添加了之後,意味着序列槽必須一次讀夠要擷取的資料了。

 while(fRes && count> 0)

 {

    int read = ::USART_Read(port, (char*)ptr, count );

    if(read == 0)

    {

            stack.m_evalStack[1 ].NumericByRef().s4 = totRead;

           TINYCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.WaitEvents(stack.m_owningThread, *timeoutTicks,CLR_RT_ExecutionEngine::c_Event_SerialPort, fRes ));

        }

        else if(read < 0)

        {

           TINYCLR_SET_AND_LEAVE(CLR_E_INVALID_PARAMETER);

        else

            ptr     += read;

            totRead += read;

            count   -= read;

            break;  <-- 新增加的

 }

官方更新說明:

The additions for this release includeadding support for the WinUSB driver in replacement of thecurrent USB driver that had been associated with some deployment problems. AnalogOutput has also been added based on a contribution from OberonMicrosystems – part of the Mountaineer group that makes .NET Gadgeteermainboards. Finally, support for installing the latest versions of GCC (4.6.1)has been added.

There have also been a number ofperformance improvements and minor bug fixes which include:

File system

Improved FS performance and some minor bug fixes Added continuation to flush the FS cache at a configurable time

Wear Leveling

Reworked the Driver to fix some issues around bad block replacement improved diagnostics for wear leveling

MicroBooter

Changes to support unaligned ZI/RW sections RW/RO sections are no longer required to be contiguous Fixed SREC processor to support multiple BS devices and non-contiguous memory streams Read buffer is now only 512K instead of a block size

Touch Screen

Improved the Gesture Driver Fixed some minor issues with the touch driver moved the touch event structures, enums, and delegates assembly (Microsoft.SPOT.Native)

Others

Thumb-2 assembly code updated and global lock implemented SerialPort.DiscardBuffer fixed (flushes the correct buffer) SerialPort.Read no longer blocking if data is available. Faster loadign of large heaps Support weak references with stubbed EWR Better support of emulated floating point bounds checking Better hex number formatting AppDomain.GetAssembly implemented Fixed issues with the stream reader (no longer waits forever to refill the buffer) Better handling of the case where RTIP is not installed as PK add-on but used in the solution

繼續閱讀