Skip to main content
Graduate II
December 6, 2023
Solved

I want to learn more about programming ARM microcontrollers

  • December 6, 2023
  • 2 replies
  • 3099 views

Hello everyone, I recently came across a subject at the university in which we programmed a discovery board. Normally what we did was configure the peripherals with the CubeMx, then we added some libraries for sensors to the project, and we programmed what we wanted it to do. The thing is that we always copied things already done in other example projects and modified it.

I what to learn to program the STM32 from scratch and not depend on files already written by other people. I have knowledge of digital electronics, I know how microcontrollers work in general terms. I know how to program in C and I'm looking at some programming books on ARM CortexM microcontrollers.

What books, courses, websites, etc... do you recommend I look at? I would like to not depend on the STM32CubeIDE to be able to program the microcontrollers. I aslo wouldn't like to depend on existing files. I want to programe it from scratch.

Thank you very much in advance!

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    >>Assemblers, Compliers, Linkers, and Loaders

    Basically one of those college level CS books/classes covering all the mechanics and moving parts. I'm an EE, and I've written assemblers, disassemblers and linkers. I've tinkered with compilers, but I've no particular desire to write one from scratch.

    Project files for different IDE vary. These days often XML, and describe meta-data about files, tree, locations of libraries and include files. Allows the tools to enumerate the pieces, track dependencies, drive the tools command lines. Some tools can generate makefiles.

    GNU/GCC and MAKE work pretty much universally across MCU's you find the cross-compiler to suit your host and target.

    Books and manuals on Eclipse ?

    Tutorials on building a project from scratch on an IDE? Those likely exist, videos probably on YouTube depending at what level of detail you seek.

    https://www.amazon.com/s?k=Joseph+Yiu+Cortex-M

    https://www.st.com/resource/en/programming_manual/pm0214-stm32-cortexm4-mcus-and-mpus-programming-manual-stmicroelectronics.pdf

    2 replies

    Graduate II
    December 6, 2023

    Building on materials already available tends to save a lot of time and scale better.

    If you want a 1980's coding experience, perhaps pull the Reference Manual for the STM32 and work through the register definitions of the peripherals.

    To learn the cores perhaps some of the original ARM TRM and 32-bit assembler, and then move to the 16-bit Thumb(2).

    Joseph Yiu has some good Essential Cortex-M3 (and related) series. ST has their Programming Manual

    Perhaps you want the Assembler, Complier, Linker, and Loader angle?

    BTurc.2Author
    Graduate II
    December 6, 2023

    Perhaps you want the Assembler, Complier, Linker, and Loader angle?

    I don't want to program the peripherals with the reference manual,I want to understand what project files do, and I think knowing how to make them myself is a good way to undersatnd what they do. Maybe if I understand what the assembler, compiler and linker are, I can roughly understand what they are for. Where can I find out about this??

    Thank you so much!

    Graduate II
    December 6, 2023

    >>Assemblers, Compliers, Linkers, and Loaders

    Basically one of those college level CS books/classes covering all the mechanics and moving parts. I'm an EE, and I've written assemblers, disassemblers and linkers. I've tinkered with compilers, but I've no particular desire to write one from scratch.

    Project files for different IDE vary. These days often XML, and describe meta-data about files, tree, locations of libraries and include files. Allows the tools to enumerate the pieces, track dependencies, drive the tools command lines. Some tools can generate makefiles.

    GNU/GCC and MAKE work pretty much universally across MCU's you find the cross-compiler to suit your host and target.

    Books and manuals on Eclipse ?

    Tutorials on building a project from scratch on an IDE? Those likely exist, videos probably on YouTube depending at what level of detail you seek.

    https://www.amazon.com/s?k=Joseph+Yiu+Cortex-M

    https://www.st.com/resource/en/programming_manual/pm0214-stm32-cortexm4-mcus-and-mpus-programming-manual-stmicroelectronics.pdf

    Super User
    December 8, 2023