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
Failed to read contents of Internal RAM L1-I_DATA in ARM DS
0
Arm Development Studio
Cache
Debug and Trace Services Layer (DTSL)
13529
views
23
replies
Latest
4 months ago
by
Boon Khai
Answered
DS-5 connect fail when cortex-r5 is in lock-step mode
+1
11225
views
10
replies
Latest
5 months ago
by
Stuart Hirons
Answered
On Cortex-M4F microcontrollers: is fixed point math faster or floating point?
+1
10779
views
10
replies
Latest
5 months ago
by
Ronan Synnott
Answered
Debugging kernel: OS support not working for Linux 5.4
+1
Kernel Developers
External Hardware Debug
Debugger
9649
views
5
replies
Latest
5 months ago
by
sgoldschmidt
Answered
DS-5 bare metal wait error after run "debug"
+1
DS-5 Development Studio
Debugging
Arm Compiler 5
Memory
32547
views
14
replies
Latest
5 months ago
by
prasadghole
<
>
View all questions in Arm Development Studio forum