... <看更多>
「mcu stack pointer」的推薦目錄:
mcu stack pointer 在 Going below the bottom of the stack in ATmega328P 的推薦與評價
Generally low-end MCUs only offer physical memory access, ... A stack pointer ending up there will quite soon lead to run-away code or ... ... <看更多>
相關內容
mcu stack pointer 在 gcc Startup files don't initialize stack pointer #17 - GitHub 的推薦與評價
gcc Startup files don't initialize stack pointer #17 ... ASELSTM added this to To do in stm32cube-mcu-fw-dashboard on Jun 19, 2020. ... <看更多>
mcu stack pointer 在 [問題] 每個task有自己的stack? - 看板C_and_CPP 的推薦與評價
疑問:對我來說,在嵌入式系統裡的stack就是file register,裡面可以放return address
、進入functio前使用到的變數、在function裡面所宣告的變數
我的直覺告訴我應該是所有的function共用一個stack,因為在嵌入式系統裡面stack的總
個數是固定的,不會因為function的多寡而變化。
另外,RTOS有自己private的data structure,請問這句是甚麼意思?
想請教前輩,我的觀念上哪裡有錯誤嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.248.26.157
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1505986968.A.A67.html
※ 編輯: zzss2003 (60.248.26.157), 09/21/2017 17:45:11
※ 編輯: zzss2003 (60.248.26.157), 09/22/2017 10:12:27
※ 編輯: zzss2003 (60.248.26.157), 09/22/2017 10:13:38
式被compiled跟linked後(也就是我們俗稱的.exe檔),stack的大小就已經是固定的了(當
然,heap是動態配置)。當我們要去執行這個.exe檔時,OS就會去讀取這個program所需要
的memory(text、global/static、stack)並分配給這個program。
以上都是發生在我們PC上的事情。我想問的是,在embedded system的環境下情況是不是不
一樣?。
※ 編輯: zzss2003 (60.248.26.157), 09/22/2017 15:33:02
MCU的hardware stack只能被用來存放return address,其他的data變數分別被放置在兩種
不同的stack(compiled stack跟software stack)compiled stack是靜態的(compile time
就會知道大小)、software stack是動態的(compiler會把剩下的memory全部給它)
※ 編輯: zzss2003 (60.248.26.157), 09/22/2017 16:06:51
... <看更多>