Monday, October 27, 2014

Xmodem

Note,

there has three ways to sent file to destination with “Tera term”.

1. Checksum

128-byte packets

2. CRC

128-byte packets

3. 1k

1024-byte packets was the most popular such solution. In this case, the throughput at 9600 bit/s is 81%

lsz [2]

-vv verbose

-X xmodem

-k 1k

-b binary

 

Reference

[1] http://en.wikipedia.org/wiki/XMODEM

[2] https://opengear.zendesk.com/entries/22923362-Serial-port-file-transfer-using-X-Y-Zmodem

Sunday, October 26, 2014

Declarations

C 99 provide programmer a way to save a memory space.

struct DM {

int x,

char* z[]

}

z just a label, compilar won’t allocate a memory for that, and this declaration only could put in last of structure declaration. therefore if we need to allocate a space for this structure when we need to store a data in variable z, otherwise we will assign wrong address which is next to variable x.

 

Reference

[1] C in a nutshell

Keil Firmware Binary

 

Normally, Keil will build the HEX file for Magic Flash to burn the code to MCU or .axf for mvisual.

but it’s not for binary code. therefore we need to using some ways to convert HEX to binary.

1.

C:\Keil\ARM\ARMCC\bin\fromelf.exe --bin --output=myprog.bin myprog.axf[1,2]
2.

C:\Keil\ARM\bin\ElfDwt.exe <filename>.axf BIN(<filename>.bin)[3]

 


and we could check the binary with application(AN11305)[4].


this software will check the signature at 0x1C, (43 f0 ff ef or charater Cðÿï )


Reference


[1]http://www.keil.com/support/docs/3213.htm


[2]http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka11291.html


[3]http://www.lpcware.com/content/blog/binary-file-creation-using-keil-mdk-toolchain


[4]http://www.lpcware.com/content/nxpfile/an11305-usb-system-programming-lpc11u3xlpc11u2x

Register Transfer Level Design with Verilog (1) [ebook]

設計程式之所以有趣不外乎是它的千變萬化,同樣的結果卻有不同的寫法。 但這些不同寫法當中也並沒有分誰對誰錯,也沒有制定標準來規範何事該用何解。 這也就是我們設計者的珍貴!! [1] Primitive Instantiations 在Verilog中最基本的邏輯...