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
Function returns structure problem in ARM926
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
5 replies
Subscribers
126 subscribers
Views
2169 views
Users
0 members are here
Related
Function returns structure problem in ARM926
Offline
reddyr reddyr
over 7 years ago
Parents
Offline
reddyr reddyr
over 7 years ago
Note: This was originally posted on 5th July 2009 at
http://forums.arm.com
Thanks for your kind and reply..
Still i couldnt solve my problem,i will explain you logic in my
application
struct A
{
int k[10];
int l[10];
int m[10];
};
static struct B
{
int a[10];
int b[10];
int c[10];
};
struct B should be static structure because
I am calling f2() function many times in my suppilcation,so next time when i call the function f2() it should have previous values of f2()so it should be static
############ main.c #################
main()
{
f4()
{
f3(); frist time
f3(); second time the values of f2() will use here
}
############## test.c #######################
f3()
{
f2();
}
#########################################
In f2() we should modify static strure B vlues,by passing refernce of B to f2() function.In side the function f2() using another structure (structure A),with A object we should modify values and should return updated static data values.
I should not use static structre vabiles in f2() because inside f2() function i have tight for loops and doing math operation on values,so copy static values to local variable and modify those varibles with math operations and return those varibles to satic structure.
I should not do math operations on static variables,becuase it will take more core cycles than local varibles, thats why i am copying to another local structe and do math operations.
Please give me the solution how can i do this..
waiting for kind reply
Cancel
Up
0
Down
Reply
Cancel
Reply
Offline
reddyr reddyr
over 7 years ago
Note: This was originally posted on 5th July 2009 at
http://forums.arm.com
Thanks for your kind and reply..
Still i couldnt solve my problem,i will explain you logic in my
application
struct A
{
int k[10];
int l[10];
int m[10];
};
static struct B
{
int a[10];
int b[10];
int c[10];
};
struct B should be static structure because
I am calling f2() function many times in my suppilcation,so next time when i call the function f2() it should have previous values of f2()so it should be static
############ main.c #################
main()
{
f4()
{
f3(); frist time
f3(); second time the values of f2() will use here
}
############## test.c #######################
f3()
{
f2();
}
#########################################
In f2() we should modify static strure B vlues,by passing refernce of B to f2() function.In side the function f2() using another structure (structure A),with A object we should modify values and should return updated static data values.
I should not use static structre vabiles in f2() because inside f2() function i have tight for loops and doing math operation on values,so copy static values to local variable and modify those varibles with math operations and return those varibles to satic structure.
I should not do math operations on static variables,becuase it will take more core cycles than local varibles, thats why i am copying to another local structe and do math operations.
Please give me the solution how can i do this..
waiting for kind reply
Cancel
Up
0
Down
Reply
Cancel
Children
No data
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
Problem with arm_cmplx_mag_f32()
+1
2360
views
2
replies
Latest
1 month ago
by
Vishal_Patel
Answered
Can anyone please help me on how evalution development studio 2020.1 work s and which compiler is needed and how it can be setup?
+1
2147
views
3
replies
Latest
1 month ago
by
Ronan Synnott
Answered
Can anyone tell me the difference between DSTREAM and DSTREAM-ST?
+1
2320
views
2
replies
Latest
1 month ago
by
Xiang
Not Answered
Would you be interested in a VScode extension to handle ARM toolchain?
0
2029
views
0
replies
Started
1 month ago
by
vix
Answered
How to view SFRs in DS during debugging?
+1
2719
views
1
reply
Latest
2 months ago
by
Ronan Synnott
<
>
View all questions in Arm Development Studio forum