2014/11/28

ARM Code Sections

In source code
#pragma arm section [section_type_list]

Valid section types are:
code
rodata
rwdata
zidata

Example
#pragma arm section rwdata = "foo", rodata = "bar"


In scatter file 
RO
Constants (ex: const TEMP, etc.) and Code 

RW
Expressed initialized global variables 

ZI
Uninitialized global variables, and the variable is initialized to 0


GCC world
.text
program code

.rodata
read-only data;

.data
read-write initialized data;

.bss
read-write zero initialized data.


Reference
http://www.cprogramdevelop.com/912436/
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491g/BCFJBABB.html
https://sourceware.org/binutils/docs/ld/REGION_005fALIAS.html#REGION_005fALIAS

2014/11/27

VIM tips

:vim foo * | cw
Find the "foo" in files in current folder

:vim foo **/*.js | cw
Search for foo in every JavaScript file in the current directory recursively

gt
Switch between tabs

Ctrl+ww
Switch between windows

Ctrl+ws
Split window

Ctrl+r "
Paste yanked text to VIM command prompt

ma, mb
Make a marker "a" , "b"

`a, `b
Got to marker "a", "b"


Reference:
http://stackoverflow.com/questions/12526274/vim-search-text-in-folder

2014/11/04

NCQ Error Info

Host gets NCQ commands error information by issuing command ATA_CMD_READ_LOG_EXT(0x2F), page 10h.

Implementation in Linux: function ata_eh_read_log_10h().
called by ata_eh_analyze_ncq_error()/

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...