简体   繁体   中英

simulate assembly code (arm cortex m3) with keil uvision 4

I used this guide Simulating ARM code which shows how to simulate assembly code (arm 7 little endian) and works perfectly well. I just changed the device from arm 7 little endian to arm cortex m3 and these are the errors :

Build target 'Target 1' 
assembling test.s...
linking...
sa.axf: Error: L6320W: Ignoring --entry command. Cannot find argument 'Reset_Handler'.
sa.axf: Warning: L6320W: Ignoring --first command. Cannot find argument '__Vectors'.
Target not created

I believe that the problem is that my project doesn't have some startup files.If this is the case how i can fix this?

The Cortex-M family uses a different exception model from "clasic ARM" and thus needs different startup. I'm not sure how Keil works with it, but maybe try adding a Reset_Handler label at the start of your code. You may also need to add a startup file with vector definitions. It might be easier to use some of the examples they should have provided, or a new project wizard if it has one.

Obviously the main() function entry point was previously defined as 'Reset_Handler' function, and now you don't have it in your project so that linker complained. And it is probably just a beginning of your problems.

If you want to port existing example from ARM7 architecture to Cortex M3, it might not be good idea if you used assembler since those are very different architectures.

If you absolutely have to do it, than at least find some working example for the new architecture (does not have to do what you need), and start from there in order to have a working start up file, tool set project file(s), and known good working environment in general. Then start porting old stuff one step at the time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM