Maker Pro
Maker Pro

m3 cortex programming

Hello forum,
Its been a long time since I have been in the scene. With work and all.
Also now that im back.. ive decided to get off my pic32 developing and into arm. I have no clue where to start. I have the smt32 discovery board. I also downloaded a few compilers and library's and cannot find any tutorials. Like my pic32. I can write code for it and it will work on almost all the other pic32 mcu as long as the processor has the hardware required in the code. Is it the same on the m3 cortex. Or is it compiler/library specific? Im asking for example

//fake function
SetPinHigh(PIN1);

This would turn into assembly for the specific mcu targeted in the compiler. But are all the functions standard for all arm? Or do I have to get st's standard library for there mcu's.
 
Last edited:
Great choice. ARM is an excellent embedded architecture that is going to be around for a long time.

GCC supports the Cortex-M3, but it is pretty tricky to install (especially if you are using Windows). If you have Linux experience, here are some instructions for compiling GCC specifically for the Cortex-M3

http://www.coactionos.com/getting-s...nstalling-a-cortex-m3-compiler-on-ubuntu.html

Otherwise, you'll want to install a pre-built toolchain such as YAGARTO.

As for interacting with the Hardware: to access Cortex-M3 hardware (such as the interrupt system), you uses the CMSIS library which is the same for all Cortex-M3 devices (but not the same as pic32). To access other peripheral hardware, it is device specific and you'll need to read up on the STM32 registers which are available in the CMSIS header files.
 
Top