Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Development Studio forum
Moving stack from TCM to external DDR2 SDRAM
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
3 replies
Subscribers
126 subscribers
Views
2028 views
Users
0 members are here
Related
Moving stack from TCM to external DDR2 SDRAM
Offline
Kevin Schaffer
over 7 years ago
Offline
Gilead Kutnick
over 7 years ago
Note: This was originally posted on 23rd November 2011 at
http://forums.arm.com
SP points to the last thing that was allocated on the stack, unless the stack is empty, in which case it points right past the stack. So if you allocate 3 words in a function they'll be accessible at [ sp ], [ sp + 4 ], and [ sp + 8 ]. The allocation itself will be performed by subtracting 12 from the stack pointer. Unallocated memory starts immediately at addresses below the stack pointer.
Cancel
Up
0
Down
Reply
Cancel
Offline
Kevin Schaffer
over 7 years ago
Note: This was originally posted on 22nd November 2011 at
http://forums.arm.com
One more question: In a given function, does SP point to the highest used address on the stack? Or does it point to, say, the first used address of the local function, and, if the local function used, say, 12 bytes, SP, SP - 4, and SP - 8 are all used, so if I was looking for the address of the first *unused* byte (4-byte) location, I'd have to look at SP - 12?
Cancel
Up
0
Down
Reply
Cancel
Offline
Kevin Schaffer
over 7 years ago
Note: This was originally posted on 17th November 2011 at
http://forums.arm.com
Ok, figured it out.
That setup seems to be A-Ok, as far as I know (let me know otherwise). However, when filling the stack with a pattern (which I was doing by accessing the SP) instead of starting at the SP - 4 (going lower in addresses) I was starting at SP.
There may be other things wrong, but at least my stack analysis seems to be ok and not crashing into Abort_Handler now.
Cancel
Up
0
Down
Reply
Cancel
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Answered
How to view SFRs in DS during debugging?
+1
2878
views
1
reply
Latest
3 months ago
by
Ronan Synnott
Answered
Dual-core debugging in DS
0
5733
views
2
replies
Latest
3 months ago
by
Ivan Savvateev
Answered
DS52020.0 connection to Musca-A/B boards not working
+1
Arm Development Studio
Musca-A
7529
views
4
replies
Latest
3 months ago
by
Daniel Oliveira
Answered
Positioning a function in a Position Independent Executable for ARMV8
+1
8285
views
3
replies
Latest
4 months ago
by
Stephen Theobald
Answered
Link a pure binary file to image with scatter file
0
8248
views
3
replies
Latest
4 months ago
by
Ronan Synnott
<
>
View all questions in Arm Development Studio forum