Starting today, I officially entered the development of tiny4412. Today I mainly watched the startup process and memory mapping of the Tiny4412 and the Exynos4412 datasheet. I wrote a marquee program with the sink (there will be a C language version later). Come out), let me talk about my development environment:
Development board: Tiny4412 enhanced version (the bottom plate is Tiny4412ADK 1312)
Development Tools: UltraEdit
Host: VmWare Ubuntu12.04(64bit)
Compilation Tools: arm-linux-gcc4.5.1
In order to facilitate classification management, we have specially opened a Tiny4412 learning area, I hope to help everyone, enter below The topic, talk about the marquee program.
I. Description of control principle
tiny4412 core board
First look at the schematic diagram:
tiny4412-led schematic diagram
tiny4412-led schematic diagram
As shown in the figure above, the Tiny4412 has 4 user LEDs. The four pins are controlled by GPM4_0~ GPM4_3. It can be seen from the principle that when the IO pin is high, the LED is off, when the IO pin is low. The LED is bright. The work we have to do is to set GPM4_0~ GPM4_3 as the output function, and control and output level can be high or low.
Second, program description
1.led.S
It is known from the schematic diagram that the program only performs two steps;
First step: Set the GPM4CON to GPM4_3 corresponding control register GPM4CON, so that the four pins GPM4_0~ GPM4_3 are output functions.
Tiny4412-GPM4CON
Step 2: Set the corresponding 4 bits of GPM4DAT to 0, make GPM4_0~ GPM4_3 low, 4 LEDs are all on, wait for a period Time sets the 0th bit to 0 and the remaining bits to 1 so that only the first light is on; wait for a while to set the 1st bit to 0, and the remaining bits to 1 so that only the second light is on; wait for a while The second bit is set to 0, and the remaining bits are set to 1, so that only the third light is on; wait for a while to set the third bit to 0, and the remaining bits to 1, so that only the fourth light is on; wait for a while to make GPM4_0~ GPM4_3 is all high level, and all 4 LED lights are off. This achieves the marquee effect.
In the program code, there are also related explanations here.
.text.globl _start_start:/** set GPM4 as output*/ldr r0, =0x110002E0 //The address of GPM4CON is 0x110002E0ldr r1, [r0] //Read the original value bic r1, r1, #0xff00 //Clear bit[15:8]bic r1, r1, #0xff //Clear bit[7:0]orr r1, r1, #0x1100 //Set bit[15:8] to 0b00010001orr r1, r1, #0x11 //Set bit[7:0] to 0b00010001str r1, [r0] //Write GPM4CON/** set GPM4DAT as Low For leds*/ldr r0, =0x110002E4 //The address of GPM4DAT is 0x110002E0ldr r1, [r0] //Read The original value leds_loop:bic r1, r1, #0xf //clear bit[0-3] to 0 full bright str r1, [r0] //write GPM4DATldr r2,=0xffffffbl delayorr r1, r1, #0xe //set Bit[0] is 0 LED1 is bright str r1, [r0] //Write GPM4DATldr r2,=0xffffffbl delaybic r1, r1, #0x3 //Set bit[1] to 0 LED2 is lit orr r1, r1, #1str r1, [r0] //Write GPM4DATldr r2,=0xffffffbl delaybic r1, r1, #0x6 //Set bit[2] to 0 LED3 is lit orr r1, r1, #2str r1, [r0] //Write GPM4DATldr r2,= 0xffffffbl delaybic r1, r1, #0xc //Set bit[3] to 0 LED4 on orr r1, r1, #4str r1, [r0] //write GPM4DATldr r2,=0xffffffbl delayorr r1, r1, #0xfstr r1, [r0] //Write GPM4DAT all off ldr r2,=0xffffffbl delayb leds_loophalt_loop:b halt_loopdelay://horse delay program sub r2,r2,#1 //sub subtraction cmp r2,#0x0 //Compare r0 with 0 bne delay //b is jump une is not equal, unequal jump to delaymov pc, lr /lr stored in the next instruction when calling the function, let the Pc pointer point to lr can complete the function Return
2. MakeFile Description
led.bin : led.Sarm-linux-gcc -c -o led.o led.Sarm-linux-ld -Tled.lds -N led.o -o led. Elfarm-linux-objcopy -O binary -S led.elf led.binarm-linux-objdump -D -m arm led.elf > led.disclean:rm -f *.dis *.bin *.elf *.o
When we execute the make command in the directory where the Makefile is located, the system will do the following:
The missing header file ‘security/pam_modules.h’ is part of the libpam development, a P
When a person is operating under Linux, they may encounter that the file they are doing is accident
When we write the shell, there will be such a scene: For example: I want to back up the passwd fil
This tutorial gives examples of how to provide messages/dialogs in Bash Shell scripts using tools l
Teach you how to increase hard disk space in Linux virtual machine
Linux using fdisk tool SSH command line partition and mount using partition tutorial
Do a good job in Linux log management
Arista Networks is a little different
Linux system management and maintenance - telnet command
Practical tips: What to do when the Linux system "crash"
Using Beowulf to Transform Common PCs into Clusters
Detailed TCP programming functions and steps
Novice trick: dd command skill under Linux operating system
Notebook noise is driven away from the reason why the notebook fan does not turn on at boot
Vista's own hard drive troubleshooting tool usage
Win10 "Message" application exposure, can send text messages and images
A detailed study of the CPU usage of WinXP in 100% of the reasons and solutions
How do I turn off the notification message for the Win10 Notification Center? Closed with tricks
Microsoft will launch 3 new Surface series tablet products next year
Win8.1 update daily patch error 80244fff reason and countermeasures
Solve win7 system MySQL service can not start error 1067 four methods