This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to write an assembly language to program stm32f4 discovery

Hi,

I am newbie to ARM.Recently I bought a STM32F4 discovery kit and I like to start up programming it in assembly language to get clear understanding of the processor.Can anyone please provide me a small assembly program example code.I have no idea,what are the things I have to add in the program,before I start programming in assembly.

  • Take an existing project, add the instructions you want to experiment with in startup
    _stm32f4xx.s at Reset_Handler

    The processor expects a vector table with initial SP and PC setting, this is how it gets to the Reset_Handler. Turn off the "run to main" option in the debugger settings, and you can step through all the code you have added.

    Want to learn how the processor works, suggests you read the ARM TRM for the Cortex-M4, and books like those from Joseph Yiu. Several online resources dealing with ARM assembler.

    Take smaller steps, look at the assembler listing or disassembly of code generated by the compiler.