Understanding Programming Environments for Microcontrollers

Microcontroller programming is a practical skill; programs must run on a microcontroller platform to see results and accumulate programming experience. While studying microcontroller courses at school, one might feel a disconnect due to a lack of practical application. In fact, learning about microcontrollers is simple, and the first step is to understand the programming environment.
When starting with microcontrollers, we commonly use the 51 series 8051 microcontroller and the STM32 microcontroller. These two microcontrollers are quite typical because the microcontroller courses in schools are based on the 51 microcontroller, while STM32 has a wealth of learning materials. Below, we will introduce the programming environments for these two types of microcontrollers.

1. Common Programming Environments for Microcontrollers

Popular microcontroller environments include Keil and IAR, which can cover 90% of the microcontroller models on the market and both provide function libraries. Depending on the bit width of the microcontroller, these two programming environments also have different versions.

1.1 Common Versions of Keil

There are four common versions of Keil:

  • Keil MDK: Primarily for ARM microcontrollers, such as ARM7/9, Cortex-M1/3/4, etc.

  • Keil C51: Primarily for 51 series microcontrollers.

  • Keil C166: Mainly supports XC16x, C16x, and ST10, etc.

  • Keil C251: Mainly supports 251 core microcontrollers.

Understanding Programming Environments for Microcontrollers

keil for ARM

1.2 Common Versions of IAR

IAR has four common versions:
  • IAR for ARM: Mainly used for 32-bit microcontrollers, such as the Cortex-M0 series.
  • IAR for 8051: Mainly for 51 microcontrollers.
  • IAR for MSP430: Primarily for TI’s MSP430 microcontrollers.
  • IAR for STM8: Mainly for ST’s STM8 series microcontrollers.

Understanding Programming Environments for Microcontrollers

IAR for ARM

Thus, the above two programming environments can fully cover mainstream microcontroller development. In recent years, domestic semiconductor development has been rapid, but most of their cores are Cortex-M series, and semiconductor manufacturers have also launched their own programming environments. To quickly open the market, they have developed function libraries for Keil and IAR.

2. How to Obtain Official Library Functions?

When learning about the 51 microcontroller, tutorials directly introduce the microcontroller’s registers, and we also configure registers directly during programming. At work, when encountering STM8 and STM32 microcontrollers, manufacturers provide function library software packages that encapsulate the register configurations, allowing us to simply call the corresponding functions. This greatly reduces learning costs, improves development efficiency, and lowers the probability of errors in register configuration.

Taking the domestic microcontroller AC78013 as an example, let’s discuss how to obtain the official microcontroller examples. Visit the official website and find the “Developer Community” in the navigation bar.

Understanding Programming Environments for Microcontrollers

Developer Community

Find “Developer Resources,” and on the left side, locate the “AC7801x” series to enter the microcontroller material detail page.

Understanding Programming Environments for Microcontrollers

Here, you can see that the official provides examples for IAR, Keil, and Eclipse environments. Click on the corresponding programming environment to download.

Understanding Programming Environments for Microcontrollers

The official provides demo resources on the chip, which developers can directly use for project development. Nowadays, every industry is very competitive, and the semiconductor industry is no exception. As long as you have volume, manufacturers will write the code for you, but unfortunately, we don’t have the volume, so let’s not talk about it and get back to coding.

Understanding Programming Environments for Microcontrollers

END

Source: Mastering Embedded Systems
Copyright belongs to the original author, if there is any infringement, please contact for deletion.
Recommended Reading
The Operating System by the Japanese Almost Dominated the World…
Understanding the Differences Between hex, bin, and axf Files in One Article
No Foreign Authorization Needed! A Milestone in Fully Self-Designed Domestic CPUs is Here~

→ Follow to Stay Updated ←

Leave a Comment

×