Keil Logo

ARMCC: PROGRAM DOES NOT REACH MAIN


Information in this article applies to:

  • RealView C Compiler Version 3

QUESTION

I have added some modules to my project, and now the program does not reach main anymore. When I run the code in the debugger it seems that the CPU reaches the SWI handler.

In the disassembly window I can see the following instruction:

SWI_Handler     B       SWI_Handler             ; Trap for exception. Branch self.
0x00000044  EAFFFFFE  B         0x00000044

What can be the reason for that?

ANSWER

When the startup code calls the SWI handler, you have most likely used memory allocation functions, but you did not define a heap in the Startup.s file.

Specify a value for Heap_Size in the Startup.s file.

Heap_Size       EQU     0x00001000

MORE INFORMATION

  • RealView Compiler and Library User's Guide, The C and C++ Libraries

SEE ALSO

Last Reviewed: Monday, March 12, 2018


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.