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

Questions about learning the ARM architecture ?

Hi! I want to learn Arm architecture and make projects with it but do not know where to start. I have STM32F401-Nucleo. I really want to learn how arm architecture works and what are the differences between cores etc.

1- Should I start with writing my codes in assembly to learn how everything works? Can Nucleo boards be programmed with assembly?

2- I downloaded Mbed, STMCube and uVision. I liked Mbed, but it uses just C++ and I do not know if it is a good choice.

3- Is there any roadmap or something else you can suggest to me?

  • >  1- Should I start with writing my codes in assembly to learn how everything works? Can Nucleo boards be programmed with assembly?

    By default, if you use the correct tool chain to compile/link the assembly code, the boards including Nucleo can execute assembly well.

    > 2- I downloaded Mbed, STMCube and uVision. I liked Mbed, but it uses just C++ and I do not know if it is a good choice.

    If you can build C/C++ code, usually you can also build assembly code and execute it.  The modern Integrated Development Environment (IDE) may help the developers a lot but may also hide much details.  Please read Arm compiler documents to understand the difference between C/C++ and assembly compiling.

     

    > 3- Is there any roadmap or something else you can suggest to me?

    We recommend you to read Arm Learn the Architecture pages first.

    There are three types of Architecture: A, R, M.  It seems that STM32F401-Nucleo is for Cortex-M architecture? Anyway, it is good start for Cortex-M if it is.

    One Architecture covers many aspects, such as Instruction Set (ISA), interrupt handling, memory model, memory management, security extension, debug and trace.

    Writing assembly code is very helpful to understand ISA and low level processor behaviors, while C code is acceptable to understand some high level architecture behavior like memory management, debug and trace.

  • >> Can Nucleo boards be programmed with assembly?

    Yes, of course.  You might want to look at https://github.com/WestfW/Minimal-ARM/wiki/AssemblyDevelopment and the associated code and links.  This grew out of a discussion that went like "I can get really cheap ARM development boards - can  I actually DO development without having to download several gigabytes worth of Compilers, IDEs, and special Tools?"  It didn't really go very far; "several gigabytes" isn't as much of a hardship as it used to be, and most of the "current" thoughts are more along the lines of "can I write bare-metal C code without relying on bloated vendor libraries or something like Arduino.  Which is also possible.

    >> Should I start with writing my codes in assembly to learn how everything works?

    Probably not.  Nearly all the documentation, examples, tutorial, discussion, and even the chip datasheets, are written assuming that C will be used.  The C compilers are "pretty good", and the assembly language environment ... not so good.  (that includes the limitations of the instruction set on smaller CPU, as well as the lack of chip definitions, assembly-oriented IDEs, widely used macro packages, and etc...)