bloggerads

2021年7月24日 星期六

Scatter File Note

用來描述source code裡面, 變數, 程式要放到memory的哪一段位址.
然後一些defin, source code 和 scatter file會互相參考

常見的簡單 scatter file內容:

1.

https://developer.arm.com/documentation/dui0493/i/Chdbjdii


execution region的起始位置設為load region的起始位置

 2.

LOAD ADDR SIZE ;ADDR: 起始位址, SIZE: 長度
{
    RO +0
    {
        * (+RO)
    }

    RW +0 ;跟在前一個區域後面接著放
    {
        * (+RW)
    }

    ZI +0
    {
        * (+ZI)
    }
}

2021年7月19日 星期一

Windows平台用cygwin安裝build code工具make

1. Download cygwin
https://www.cygwin.com/
2. Execute the exe:
When you get to the "Select Packages" screen, expand the "Devel" section, find the "make" package, and select the version you want
3. Add make path to the environment. (typically under cygwin64/bin)
4. Done.

2021年7月14日 星期三

2021年7月6日 星期二

ARM 打包 library的command

打包成.a的形式:   armar   -r  mylib.a   obj1   obj2   obj3

打包成.lib的形式: armar   --create   mylib.lib   obj1   obj2 

.a或.lib可以直接和其他.o檔一起link, 產生出最後的binary

Visual Studio Hotkey/Operation (Continue Update..)

Duplicate this line: Alt + Shift + ↓

Comment/Uncomment line(s): Ctrl + /

Search Function: Ctrl + t

Bookmark: Ctrl + Alt + k

Jump to Bookmark: Ctrl + Alt + j

Trim trailing space automatically:

Transform TAB to Space

Show the function list in a file



2021年7月4日 星期日

英文筆記

關代: that/which/who

that:
1. that前面不可加逗點","
2. that前面不可加介系詞, 如during, of, in, at, on,...
3. 前面有比較級後面要選that, 如first, last, best,...

which:
逗點前面看到完整句子(, which)

where:
, where後面必須接完整子句(即不缺主詞或受詞)

Ving和Vpp要放在後面 (ex: record-breaking, record-broken)

介系詞(of,...)後面不可接句子

  • Because of you -> Correct
  • Because of you eat my cake -> Wrong
although是用來連接逗號前後兩個句子用的

How can(v) you(n) blablabla.. 名詞在動詞後面這種的疑問句一定要是疑問句(不可在句子內, 即How要放在開頭)

time當時間是不可數 前面接much => How much time I have?
time當次數是可數 前面接many => How many times?

other的用法 (https://www.youtube.com/watch?v=sQvDSmAkZKo)
the other :  加the代表有範圍
other        : 沒加the代表沒範圍
the others   =  the other students
any other student   <--通用-->   all the other students

2021年6月29日 星期二

Add a Git Submodule

Use Git Turtoise:

TortoiseGit -> Submodule Add...

Use Git Command:

git submodule add -b <branch> --name <submodule name> <repository> <folder path>

----------------------------------------------------------------------------------------------

After setting the previous step, you will find the new file ".gitmodules" is created (or updated)
Check the contents if it is as expect:

[submodule "name"]

path <folder path>

url =  <repository>

branch <branch>  -->  One of branch in the Submodule repository (Can ignore this one)

----------------------------------------------------------------------------------------------

Following Issue happened in build code after I add the submodule in my one of project:

cp: cannot overwrite directory 'xxxxxxxx.git' with non-directory

This means the build procedure is trying to copy xxxxxxxx.git to somewhere the xxxxxxxx.git has already existed.

I did the following steps to overcome this problem. (or you can simply delete it, and it will be automatically generated during submodule init)

1. git commit/check-in the code 
2. delete the xxxxxxxx.git in the submodule 
3. git submodule init/update