We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi!
I'm trying to migrate my project from ARM MDK 3.24 to ARM MDK 4.10.
Compilation goes ok, but when I try to debug the project, it doesn't go into main(). when trying to execute the "BX R0" instruction in startup.s, here:
; Enter the C code IMPORT __main LDR R0, =__main BX R0
it goes to SWI handler and loops forever there.
Is there a solution for this?
SWI instruction is needed to go into SWI handler. Can you debug step by step(F11) in the disassembly window to see where exactly you branch to and what is executed on BX R0?
on BX R0 , the R0 register holds address 0x00000100 (it's the address of main() function), but the simulator suddenly goes to SWI...
I have some problems with the simulator for my ADuC7033(interrupts do not occur). I don't know which uC you use, but maybe you have some similar problem. Have you tried some example programs for your uC using the simulator?
Example projects works fine in MDK4. My project in MDK3 works fine, too. But when I try to run the MDK3 project in MDK4, this issue occurs.
When you run your MDK3 project in MDK4, do you change something else except startup file?
I don't change anything, even the startup.s file.
I've been through this - migrating from MDK3.X to MDK4.X - and I changed the startup file to be able to compile. Also some other changes were required: - use __irq as keyword for interrupts - use __swi(0).. for software interrupts - warnings may appear for inline assembly and some others I cannot think of at the moment. Maybe your new MDK has replaced itself the startup file? I had a lot of problems while migrating, so I'm amazed that you did nothing and it compiled. Maybe your code is written more portable. :)