The syntax of MOV can also be more complex as the following examples show.[7]
MOV EAX, [EBX] ; Move the 4 bytes in memory at the address contained in EBX into EAX
MOV [ESI+EAX], CL ; Move the contents of CL into the byte at address ESI+EAX
Reference
The syntax of MOV can also be more complex as the following examples show.[7]
MOV EAX, [EBX] ; Move the 4 bytes in memory at the address contained in EBX into EAX
MOV [ESI+EAX], CL ; Move the contents of CL into the byte at address ESI+EAX
Reference
for keil compilar environment, they had a defination for time stamp, therefore we could use that to be a release note for product purpose.
how to use?
printf("%s %s",__DATE__,__TIME__);
or you could assign memory for them.
U8 KC_DATA Datestring[sizeof(__DATE__)];
U8 KC_DATA Timestring[sizeof(__TIME__)];
memcpy(Datestring, &__DATE__, sizeof(__DATE__));
memcpy(Timestring, &__TIME__, sizeof(__TIME__));
Reference
Compiler-specific Features [4]
function attributs
assign a section for place function code [1,2]
Variable attributs
locating a variable at absolute memory address [3]
Reference
[1] http://www.keil.com/support/man/docs/armccref/armccref_Cacbgief.htm
[2] http://www.keil.com/forum/13875/-at-for-function-address/
[3] http://www.keil.com/support/docs/2829.htm
[4] http://www.keil.com/support/man/docs/armccref/armccref_chdfijae.htm
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
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
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
To Manually Create Shortcuts
Environment Variables
%windir%\System32\rundll32.exe sysdm.cpl,EditEnvironmentVariables
device manager
devmgmt.msc
RunDll32.exe devmgr.dll DeviceManager_Execute
%windir%\System32\rundll32.exe shell32.dll,Control_RunDLL hdwwiz.cpl
設計程式之所以有趣不外乎是它的千變萬化,同樣的結果卻有不同的寫法。 但這些不同寫法當中也並沒有分誰對誰錯,也沒有制定標準來規範何事該用何解。 這也就是我們設計者的珍貴!! [1] Primitive Instantiations 在Verilog中最基本的邏輯...