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
Dynamic (Runtime) ITCM (Instruction Scratchpad Memory) Allocation
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
2 replies
Subscribers
126 subscribers
Views
1664 views
Users
0 members are here
Related
Dynamic (Runtime) ITCM (Instruction Scratchpad Memory) Allocation
Offline
Amir Mahdi Hosseini Monazzah
over 7 years ago
Note: This was originally posted on 12th May 2012 at http://forums.arm.com
Hi,
These days my important question is about how to allocate ITCM (Instruction Scratchpad Memory) of ARM926ej-s. for doing this, i use scatter loading and part my code to some definite area of my memory, each area contain a function, then i define a function pointer and before running this part of program with aid of memcopy() function, i copy the function from it's address in main memory to ITCM Area, and change the address of function pointer to the new location of it in ITCM. this method already works for ordinary program wich has only operation like multiply, divide and ..., but when the function is more complex and use c library function or any other linker symbols, then after relocating the program crash, when it arrive at that symbols. for debugging this problem i searched the disassembled code and find that by memcopy() i can't take thew linker symbols to the itcm, infact after relocation a primary code like " BL _rt_sdiv" changes to "BL 0xffef0000". i've also try to constructe a symdef file and use it as linker symbol table, but unfortunately this method didn't work.
now my primary question is "How to Allocate The ITCM dynamically without needing to implement all the c function library again?"
Sincerely,
A.M.H.Monazzah
Offline
Peter Harris
over 7 years ago
Note: This was originally posted on 13th May 2012 at
http://forums.arm.com
Can you define "crash" in more detail? Does it segfault, give invalid instruction, etc?
If you have a mix of ARM and Thumb then make sure you set the bottom bit of the jump address to 1 if the function in TCM is a Thumb entry point, or you are going to get interworking faults.
Cancel
Up
0
Down
Reply
Cancel
Offline
Scott Douglass
over 7 years ago
Note: This was originally posted on 14th May 2012 at
http://forums.arm.com
If you can arrange to iniitalize the ITCM so that it's ready to be loaded before scatter loading then I'd suggest that you try scatter loading the desired code directly into the ITCM instead of using memcpy "by hand". That way the debug symbols will be right. (But I haven't done this myself, so there may be problems I don't know about.)
If you have to do the memcpy, then the functions that you relocate need to be built /ropi so that they are position-independant.
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
DSTREAM Probe damage - Spare parts?
0
DSTREAM
11284
views
2
replies
Latest
6 months ago
by
SamGKN
Suggested Answer
Optimized ARM version of memcmp
0
9867
views
3
replies
Latest
6 months ago
by
Ronan Synnott
Not Answered
Develop Kotlin apps with OpenCl to run in a Samsung mobile that use Mali G71
0
8852
views
2
replies
Latest
6 months ago
by
ARMStrongssen
Answered
FVP Debug problems for Blinky Example project on Cortex-M4
0
Fixed Virtual Platforms (FVPs)
Debugging
Cortex-M4
9685
views
2
replies
Latest
6 months ago
by
Sagittarius
Answered
Product license check-out for feature "platform_editor:202003" failed
0
ARM Development Suite (ADS)
DSTREAM
9865
views
2
replies
Latest
6 months ago
by
David DV
<
>
View all questions in Arm Development Studio forum