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
control is not returning to assembly when tried return(0) in main of test case
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
3 replies
Subscribers
126 subscribers
Views
2435 views
Users
0 members are here
Related
control is not returning to assembly when tried return(0) in main of test case
Offline
Lokesh Kumar
over 7 years ago
Note: This was originally posted on 27th August 2012 at http://forums.arm.com
Hi,
Here is my code. As you can see below from C test case main has return and main was called by assembly code by using BL main.
But when I run this test control never comes back to assembly, since main is not retuning control to assembly as it should have done since BL instruction is used.
I do see that main function is getting completed as it's printing it's messages.
Do I need to do something different?
[color=#1F497D]Assembly code is as below :-[/color]
//ARM initialization code
//Call C main function
BL main
MOV r0, #0
MOV r1, #1
LDR r2, =0xffffffff
LDR r10, =0xcab00010
LDR r0, [r10]
STR r0, [r10] ; 0's
STR r2, [r10] ; f's
STR r0, [r10] ; 0's
DMB
Loop
WFI
B Loop
B pass
[color=#1F497D] [/color]
[color=#1F497D][/color]Main function of C code is as below :-
[color=#1F497D] [/color]int main(int argc, char *argv[]) {
loc_puts("INFO: ARM Booted Successfully!\n");
loc_puts("READ to boot space!\n"); return (0);
}
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