C Language Exercises – Day 12

C Language Exercises - Day 12

01 Read the following program: #include <stdio.h> main() { int i,j, m=55; for(i=1;i<=3;i++) for(j=3; j<=i; j++) m=m%j; printf(“%d\n “, m); } The output of the program is A) 0 B) 1 C) 2 D) 3 Answer: B Explanation: Brief 02 Read the following program: main() { int a=5,b=4,c=3,d=2; if(a>b>c) printf(“%d\n”,d); else if((c-1>=d)==1) printf(“%d\n”,d+1); else printf(“%d\n”,d+2); … Read more

C Language Exercises – Day 15

C Language Exercises - Day 15

01 Read the following program: main() { int a=1, b=3, c=5; int *p1=&a, *p2=&b, *p3=&c; *p3=*p1*(*p2); printf(“%d\n”,c); } The output result after execution is A) 1 B) 2 C) 3 D) 4 Answer: C Analysis: Brief 02 To write a good program, it is essential to ensure its correctness and reliability, and also to emphasize … Read more

barebox: The New Favorite for Embedded Booting!

barebox: The New Favorite for Embedded Booting!

First Encounter with bareboxHey, I’ve been experimenting with embedded booting recently, and I was captivated by a project called barebox. It is not just a simple follower of U-Boot; it inherits the spirit of U-Boot while also drawing on the design philosophy of the Linux kernel. Written in C and managed with kbuild/Kconfig for configuration, … Read more

Understanding the SWD Debug Interface Protocol

Understanding the SWD Debug Interface Protocol

Scan to FollowLearn Embedded Systems Together, learn and grow together Overview 1.1 What is the SWD Protocol SWD (Serial Wire Debug) is a two-wire debugging interface protocol developed by ARM, specifically designed for debugging and programming Cortex-M series microcontrollers. As a replacement for the traditional JTAG interface, SWD significantly reduces the number of pins while … Read more

Using Overlays in Buildroot

Using Overlays in Buildroot

Using Overlays in Buildroot Introduction In the article “Automatic Mounting of USB Hard Drives,” I completed debugging by modifying <span>/usr/lib/udev/rules.d/usbmount.rules</span>. During the debugging process, I operated on the development board. After debugging, how can I synchronize the modifications to the SDK code? To address this issue, I first searched the SDK and found that it … Read more

C Language Exercises – Day 11

C Language Exercises - Day 11

01 The ASCII value of the digit character ‘0’ is 48. Given the following program: main() { char a=’1′,b=’2′; printf(“%c,”,b++); printf(“%d\n”,b-a); } The output of the program is: A) 3,2 B) 25,2 C) 2,2 D) 2,25 Answer: C Explanation: printf(“%c, b++): The initial value of b is ‘2’ (ASCII value 50); b++ is a post-increment, … Read more

DAPLink: A One-Stop Solution for Embedded Programming, Debugging, and Serial Logging

DAPLink: A One-Stop Solution for Embedded Programming, Debugging, and Serial Logging

Developers working on embedded systems have certainly encountered issues such as tedious programming, difficult debugging, and lengthy log collection. Today, I would like to recommend a powerful tool—DAPLink—that provides a one-stop solution for programming, debugging, and serial logging, making the process incredibly smooth! What is DAPLink? In simple terms, DAPLink is firmware that runs on … Read more

Running Linux 6.15.3 on ARM Cortex-X925 Platform (Troubleshooting Guide)

Running Linux 6.15.3 on ARM Cortex-X925 Platform (Troubleshooting Guide)

Why Choose boot-wrapper-aarch64? If you are only focused on the Linux kernel, there is no need to run the complete software stack. Using boot-wrapper-aarch64 to boot Linux is quicker, and it is simple and easy to understand, which is sufficient for understanding the ARM boot process. There will be a tutorial later that explains running … Read more

Barebox: A Revolutionary Evolution of Embedded System Bootloaders, the Successor to U-Boot

Barebox: A Revolutionary Evolution of Embedded System Bootloaders, the Successor to U-Boot

The Ultimate Weapon for Embedded Developers In the field of embedded systems, the bootloader is a critical bridge connecting hardware and the operating system. As the modern successor to U-Boot, Barebox (formerly known as “Das U-Boot v2”) is redefining the possibilities of embedded bootloaders with its innovative design philosophy and developer-friendly features. It not only … Read more

Interrupts and Exceptions in Cortex-M

Interrupts and Exceptions in Cortex-M

Definition First, let’s look at the definitions of both in the authoritative guide for Cortex-M. 1 Exception Definition According to the authoritative guide for Cortex-M, an exception refers to an event that can alter the normal program flow. When an exception occurs, the processor pauses the currently executing task and executes a dedicated program to … Read more