Suggested Certification for Keil Uvision

Certified Embedded System Engineer from IPCS Global

Recommended Book for Keil Uvision

★★★★☆
Check Amazon for current price
View Deal
On Amazon

Recommended Book 1 for Keil Uvision

★★★★☆
Check Amazon for current price
View Deal
On Amazon

Recommended Book 2 for Keil Uvision

★★★★☆
Check Amazon for current price
View Deal
On Amazon

Recommended Book 3 for Keil Uvision

★★★★☆
Check Amazon for current price
View Deal
On Amazon

Recommended Book 5 for Keil Uvision

★★★★☆
Check Amazon for current price
View Deal
On Amazon

Note: *Check out these useful books! As an Amazon Associate I earn from qualifying purchases.

Interview Questions and Answers

Keil µVision (now part of MDK-ARM by Arm) is an Integrated Development Environment (IDE) for developing, building, and debugging embedded applications primarily for Arm Cortex-M, Cortex-R, Arm7, Arm9, and 8051-based microcontrollers.

µVision IDE, Arm Compiler (armcc/armclang), CMSIS-Core, CMSIS-RTOS (RTX or RTX5), Software Packs (Device Family Packs - DFP), and ULINK/ J-LINK debug adapters.

DFP is a software pack that contains startup files, CMSIS drivers, register definitions, flash programming algorithms, and example projects specific to a microcontroller family (e.g., STM32F4, NXP LPC, etc.).

Project ? New µVision Project ? Select directory ? Choose microcontroller from Database (Manage Run-Time Environment ? Select device) ? Add startup file and configure components.

MDK-Lite has a 32 KB code size limit and limited middleware; MDK-Standard/Professional removes the code size limit and includes full middleware (TCP/IP, USB, File System, etc.) and advanced debug features.

It is an assembly file that contains the vector table, reset handler, default exception handlers, and system initialization (stack pointer setup) before jumping to main().

Project ? Options for Target ? Debug tab ? Select debugger (ULINK, J-LINK, CMSIS-DAP, ST-Link) ? Load the correct driver and flash algorithm from the pack.

The .sct (scatter) file defines memory layout (Flash and RAM regions), placement of code, data, stack, heap, and RW/ZI sections for the linker.

__attribute__((section("name"))) places a variable/function in a custom section. __attribute__((at(address))) places a variable at an absolute memory address (used for peripherals or special memory).

Debug ? Windows ? System Viewer (for peripherals/SVD), Memory window, Watch window, or Registers window. Peripherals are visible only if the device SVD file is installed.

Debug: Optimization Level 0, includes debug symbols (-g), larger code. Release: Higher optimization (O2/O3), no debug info, smaller and faster code.

Open Manage Run-Time Environment ? CMSIS ? RTOS2 (Keil RTX5) ? Select components (Kernel, Event Flags, etc.) ? Keil automatically adds source files and configurations.

Pack Installer downloads and manages Device Family Packs, CMSIS, middleware packs, and legacy support packs from the Keil website.

Project ? Options for Target ? Output tab ? Check "Create HEX File" or use the fromelf utility in User tab (after-build command) to generate .bin.

__weak functions (like HardFault_Handler) are default weak implementations that can be overridden by user-defined strong implementations in main code.

.axf/.elf: Debuggable executable with symbols. .hex: Intel HEX format used by programmers for flashing. .bin: Raw binary image.

Use #include and printf; in Options ? C/C++ ? check "Enable MicroLIB" or link with RTL that supports semihosting, and enable ITM Port 0 in debug settings.

Event Recorder is a lightweight debugging tool using CMSIS-DAP that captures printf-like events, RTOS events, and user annotations with timestamps without stopping the target.

Use Manage Run-Time Environment (RTE) window instead of "Select Device for Target" ? legacy method. Packs provide automatic component selection and updates.

Build Output shows code/data sizes. Use Performance Analyzer (Debug ? Performance Analyzer) or Instruction Trace (ETM) with ULINKpro for cycle-accurate profiling.