Skip to main content

How to test frame buffer in linux

The intended goal of this article is to provide the user with enough information so they can display an image onto a screen of their choosing. How to re-build frame buffer testing application.

Base knowledge

http://trac.gateworks.com/wiki/OpenEmbedded/Video_Out

Frame buffer test application

- rebuild fb-test-app

step 1: Download soure code (git installed on your machine and account in git-hub is required)
Command in git:
git init
git clone https://github.com/prpplague/fb-test-app.git
step 2: Change makefile
vi Makefile //open Makefile by vim editor :set nu //show line number
replace from line 6 to line 12 by folow code:
CC=arm-linux-gnueabi-gcc CFLAGS=-02 -Wall

Save change command
:wq
step 3: Rebuid
Type “make” command
step 4: Copy execute file to target system by filezilla or something like that
step 5: Remote target by root account, change mode of execute file (what copied from host)
su chmod +x fb-test
step 6: Test app
  Check mode of fb
cat /sys/class/graphics/fb2/*cat /sys/class/graphics/fb2/modescat /sys/class/graphics/fb2/mode
//Set "mode value" from modes list to mode
echo "mode value" > /sys/class/graphics/fb2/mode
//unblank screen
echo 0>/sys/class/graphics/fb2/blank
//export
export DISPLAY=:2

//Run program
./fb-test -f 0 -r //fullfill fb0 by red colour
./fb-test -f 1 -b //fullfill fb1 by blue colour
step 7: Validation: copy frame buffer (raw pixel to view).
mkdir /home/thaidao/img cp /dev/fb0 /home/thaidao/img cp /dev/fb1 /home/thaidao/img
step 8: Copy raw pixel from target to host by filezilla or ..

step 9: Go to rawpixels.net to check pixel raw copied from target board.(Must be configure picture properties)

Comments

Post a Comment

Popular posts from this blog

[STM32] How to configure Timer 1, Channel 3 is PWM 1kHz, duty cycle 20% to control BLDC motor

 To configure Timer1 for a 1 kHz PWM signal with a 20% duty cycle on an STM32H7S3L8 microcontroller, follow these steps: 1. Understand the Timer Parameters PWM Frequency : 1 kHz → Period = 1 ms. Duty Cycle : 20% → ON time = 0.2 ms. The timer’s clock frequency is derived from the APB clock (e.g., TIMCLK). Let’s assume you know the APB clock frequency. The Timer prescaler and auto-reload register (ARR) define the PWM frequency. 2. Compute Timer Parameters Formula: PWM Frequency = Timer Clock (Prescaler + 1) * (ARR + 1) \text{PWM Frequency} = \frac{\text{Timer Clock}}{\text{(Prescaler + 1) * (ARR + 1)}} PWM Frequency = (Prescaler + 1) * (ARR + 1) Timer Clock ​ For 1 kHz PWM: A R R = Timer Clock PWM Frequency ∗ ( Prescaler + 1) − 1 ARR = \frac{\text{Timer Clock}}{\text{PWM Frequency} * (\text{Prescaler + 1)}} - 1 A RR = PWM Frequency ∗ ( Prescaler + 1) Timer Clock ​ −...

[CanadaLife] Example of answers for final test in Smart Service Ontario 2024

If you have failed the final exam in the first attempt. Congratulations, you are not odd. Here, take a look and grab some corrected answers for your next attempt.  Don't waste your money and time for more failure.  Good luck bros. Quick note: remember that, the system will change the bunch of questions after each attempt. Then your next questionnaire will be different compared with the first trial. ========================================== =============FINAL TEST=================== ========================================== TIP: Here is a list of questions you did not answer correctly. *Please note: You will only be able to view this list immediately following your test attempt. ========================================== Alcohol slows down the central nervous system and impacts how a person thinks, acts, and moves. This means alcohol is a: depressant ========================================== Alcohol is metabolized in the body at a set rate. For most people, that rate is: one...

[AI] How to pass ATS (Applicant Tracking Systems)

  When it comes to passing through the initial screening by AI (Applicant Tracking Systems or ATS), it's important to optimize your resume for the specific keywords and formatting preferences that these systems use. Here are some tips: Use Relevant Keywords: Identify keywords from the job description and include them in your resume. ATS systems look for matches between the job requirements and your resume content. Keyword Placement: Integrate keywords naturally throughout your resume, especially in the skills, experience, and education sections. However, avoid keyword stuffing; ensure the language remains clear and coherent. Simple Formatting: Stick to a clean and straightforward format. Avoid complex designs, tables, or graphics that may confuse the ATS. Use standard fonts and keep the layout consistent. Use Standard Headings: ATS systems are designed to recognize specific sections. Use standard headings such as "Education," "Skills," "Experience," an...