Bare horse running program on ARM

Source: Internet
Author: User

Today, I tested the program of running the horse without going into the system using the Yilong st2410 program. First, we will summarize several methods of streaking programs on the arm Board: since we want to streaking without the arm board into the system, the method is to select the last BIOS after power-on Reset: 7: set autoboot parameter, 1: Linux 2: wince. The 7th option requires you to enter the system automatically started after power-on reset, and select any number except 1 and 2 (for example, 3). After power-on, the system will always stop on the BIOS interface, wait for the operating system you choose to enter, so that the arm enters the streaking state. After entering the streaking state, the test program has the following methods: 1. ARM-JTAG debugging agent method to configure the axd online debugging program 2. Use U-boot to load the program to the SDRAM to run. 3. Use SJF software to burn the program into flash. (In principle, both NAND Flash and nor flash can be burned.) It is recommended that you do not burn nor Flash because the program provided by Samsung is not perfect. The following describes how to configure the axd online debugging program with the ARM-JTAG debugging agent: 1. First install and run the ARM-JTAG debugging agent ARM9. Check the arm9-kernel through a debugging proxy. Provides environment support for interaction between the host machine and the target board. 2. Correctly configure the axd Debugger for the ARM-JTAG debugging agent. Run the debugging software axd Debugger in the ads1.2 software, click options/configure target in the menu, select remote_a.dll in the pop-up interface window, and then click Configure: In the pop-up window, click the "select" button, select the "arm Ethernet driver" option, and then click the "Configure" button below. In the displayed window, enter the number "127.0.0.1" and confirm. In this way, the online debugging environment is configured. Close and restart the axd debugger. Click file/load image in the menu to find the debugging target code (*. axf format), open it and start the target code download. a progress bar will appear. After the download is complete, you can perform single-step or full-speed debugging. During the debugging, you can view the various CPU registers, you can also set breakpoints, single-step, full-speed, and other debugging functions. Note: During axd debugging, ARM-JTAG debugging agent software should always be turned on, otherwise axd will prompt that the target device is not found. The 2410 GPF4--GPF7 is connected to four diodes respectively. To control the diode light-off is to control the GPF port, to control the GPF port, it is necessary to understand the port-related registers: Port configurator (GPACON-GPHCON) in the S3C2410, most pins are reused. Therefore, define a function for each pin. The port control register (pncon) defines the functionality of each pin. If the GPF0-GPF7 and GPG0-GPG7 are used as wake-up signals in power-down mode, these ports must be set in interrupt mode. Port Data Register (GPADAT-GPHDAT) If the port is configured as the output port, the data can be written to the corresponding bit of pndat. If the port is configured as the input port, data can be read from the bit corresponding to pndat. Port pull-registers (GPBUP-GPHUP) Port pull-registers control the enable or disable of the pull-up registers for each port group. When the corresponding bit is 0, the pull-up register of this pin is allowed. When the value is 1, it is forbidden to pull up the register. Miscellaneous control register this register controls the data port's pull register, high impedance status, USB channel and clkout selection. The external interrupt control register (extintn) provides 24 external interrupts for multiple requests. The extintn register can be used to configure the request signal triggering mode for external interruptions as low-level triggering, high-level triggering, descent edge triggering, rising edge triggering, and bilateral edge triggering. Finally, a piece of program code is used to implement the lawn lamp:/* This is a program that uses gpio for the lawn lamp./* gpio1 to gpio4 correspond to gpf4 to gpf7 of 2410 respectively */# include "2410lib. H "# define gpfcon (* (volatile unsigned *) 0x56000050) // port F control # define gpfdat (* (volatile unsigned *) 0x56000054) // port F Data # define gpfup (* (volatile unsigned *) 0x56000058) // pull-up control F int main () {gpfcon = (gpfcon | 0xff00) & 0xffff55ff; // GPF4--GPF7 is set to output gpfup | = 0xff00; // disable GPF pull up While (1) {int I = 0; gpfdat = (gpfdat & 0xffffff0f) | 0xe0; delay (100); gpfdat = (gpfdat & 0xffffff0f) | 0xd0; delay (100 ); gpfdat = (gpfdat & 0xffffff0f) | 0xb0; delay (100); gpfdat = (gpfdat & 0xffffff0f) | 0x70; delay (100) ;}} different from the microcontroller, the bare Runner Program also includes some hardware initialization header files and functions into the project where the marquee program is located. Otherwise, the program cannot run. The hardware initialization program is complicated. I don't know much about it after a whole day today. It seems that I still need to practice it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.