新人該怎麼進入狀況? - 工程師

By Frederica 
at 2018-09-03T22:26
at 2018-09-03T22:26
Table of Contents
你是用C寫FW吧 
 
C相對C++簡單很多
 
首先先準備好一套好的code tracing tool
 
Slik edit, source insight, 或是visual studio都可以
 
我個人比較喜歡SI
 
他有個功能是可以找refernce
 
你很快可以列出這個函數有在哪些地方被使用到
 
C不是物件導向 也沒有一大堆第三方函式庫
 
頂多就是call back fuction 和指標一開始比較難懂
 
大部分流程都是sequential 沒有multithread的話又更簡單
 
如果是系統廠的FW 把廠商提供的sample code和spec看一看 看一下重要的register怎麼讀寫 有沒有特定流程
 
尤其是ISR的部分 寫軟體轉做FW的很容易忘記硬體有自己interrupt
 
有問題就問原廠 不要自己想破頭想單幹硬解
 
IDE或script環境先建好 不要compile環境不一樣產生有問題的bin檔
 
記住volatile這個關鍵字是幹嘛的 如果某個變數在code以外的地方有可能被更動的話就要?
 
debug mode要會用 有時候光打印log看不出問題
 
版本控制軟體要會 進code前請資深的同事幫你review下 自己先測過再進code
 
邏輯分析儀 示波器要會用 要知道怎麼trigger
 
有bug很多時候是你記憶體操作錯誤
 
比如說用太多區域變數導致stack overflow
 
或是有module把heap free掉 別的module又去access他
 
通常記憶體問題log和debug mode看不太出來
 
單個module也不會發生 但整個程式一起運作就會發生crash 很難解
 
功力不夠的話 沒事不要重構 會招人怨又找自己麻煩
 
菜鳥的話 大guy4這樣
-----
Sent from JPTT on my iPhone
 
--
    C相對C++簡單很多
首先先準備好一套好的code tracing tool
Slik edit, source insight, 或是visual studio都可以
我個人比較喜歡SI
他有個功能是可以找refernce
你很快可以列出這個函數有在哪些地方被使用到
C不是物件導向 也沒有一大堆第三方函式庫
頂多就是call back fuction 和指標一開始比較難懂
大部分流程都是sequential 沒有multithread的話又更簡單
如果是系統廠的FW 把廠商提供的sample code和spec看一看 看一下重要的register怎麼讀寫 有沒有特定流程
尤其是ISR的部分 寫軟體轉做FW的很容易忘記硬體有自己interrupt
有問題就問原廠 不要自己想破頭想單幹硬解
IDE或script環境先建好 不要compile環境不一樣產生有問題的bin檔
記住volatile這個關鍵字是幹嘛的 如果某個變數在code以外的地方有可能被更動的話就要?
debug mode要會用 有時候光打印log看不出問題
版本控制軟體要會 進code前請資深的同事幫你review下 自己先測過再進code
邏輯分析儀 示波器要會用 要知道怎麼trigger
有bug很多時候是你記憶體操作錯誤
比如說用太多區域變數導致stack overflow
或是有module把heap free掉 別的module又去access他
通常記憶體問題log和debug mode看不太出來
單個module也不會發生 但整個程式一起運作就會發生crash 很難解
功力不夠的話 沒事不要重構 會招人怨又找自己麻煩
菜鳥的話 大guy4這樣
-----
Sent from JPTT on my iPhone
--
Tags:
        工程師
        
All Comments

By Olivia 
at 2018-09-05T17:37
at 2018-09-05T17:37

By Hedda 
at 2018-09-07T21:42
at 2018-09-07T21:42

By Catherine 
at 2018-09-10T21:05
at 2018-09-10T21:05

By Carol 
at 2018-09-13T19:52
at 2018-09-13T19:52

By Robert 
at 2018-09-18T14:42
at 2018-09-18T14:42

By Emma 
at 2018-09-19T22:24
at 2018-09-19T22:24

By Brianna 
at 2018-09-24T11:35
at 2018-09-24T11:35

By Necoo 
at 2018-09-26T04:56
at 2018-09-26T04:56

By Daph Bay 
at 2018-09-29T14:56
at 2018-09-29T14:56

By Caroline 
at 2018-09-30T18:20
at 2018-09-30T18:20

By Erin 
at 2018-10-04T15:06
at 2018-10-04T15:06

By Franklin 
at 2018-10-05T12:11
at 2018-10-05T12:11

By Xanthe 
at 2018-10-07T00:33
at 2018-10-07T00:33

By Hazel 
at 2018-10-07T14:07
at 2018-10-07T14:07

By Callum 
at 2018-10-09T08:32
at 2018-10-09T08:32

By Frederica 
at 2018-10-10T18:45
at 2018-10-10T18:45

By Tristan Cohan 
at 2018-10-14T11:01
at 2018-10-14T11:01

By David 
at 2018-10-14T15:50
at 2018-10-14T15:50

By Dinah 
at 2018-10-18T01:39
at 2018-10-18T01:39

By Ivy 
at 2018-10-22T22:04
at 2018-10-22T22:04

By Ophelia 
at 2018-10-26T03:36
at 2018-10-26T03:36

By Ivy 
at 2018-10-27T11:49
at 2018-10-27T11:49

By Rae 
at 2018-10-31T20:10
at 2018-10-31T20:10

By Yedda 
at 2018-11-05T10:10
at 2018-11-05T10:10

By Andrew 
at 2018-11-09T06:43
at 2018-11-09T06:43

By Harry 
at 2018-11-09T18:47
at 2018-11-09T18:47
Related Posts
「港務備取通知報到消息」

By Rachel 
at 2018-09-03T21:41
at 2018-09-03T21:41
石頭待多久跳比較好

By Margaret 
at 2018-09-03T21:18
at 2018-09-03T21:18
請益 南亞科 後端測試工程師

By Gary 
at 2018-09-03T20:34
at 2018-09-03T20:34
為何台積電能稱霸全球M不能?

By Queena 
at 2018-09-03T20:27
at 2018-09-03T20:27
工作權益請益

By Daniel 
at 2018-09-03T19:27
at 2018-09-03T19:27