-----------------------------------------------------------------
----------------------------------- Cpu/jx44b0/start. S ------
-------------------------------------------------------------------
Find
# If config_jx44b0_clock_speed = 60
Ldr r0, = 0x70081/* 60 MHz (Quartz = 10 MHz). For details about how to calculate it, refer to the description of the computing method I wrote */
# Elif config_jx44b0_clock_speed = 75
Ldr r0, = 0xac042/* 75 MHz */
# Else
# Error config_89c44b0_clock_speed undefined
Set the clock speed
------------------------------------------------------------------------------
-------------- Cpu/jx44b0/serial. c -----------------------------------
--------------------------------------------------------------------------------
Find the following items
It is mainly to change the frequency and set the matching
Void serial_setbrg (void)
{
DECLARE_GLOBAL_DATA_PTR;
U32 divisor = 0;
/* Get correct divisor */
Switch (gd-> baudrate ){
Case 1200:
# If config_jx44b0_clock_speed = 60
Divisor = 3124;
# Elif config_jx44b0_clock_speed = 75
Divisor = 3905;
# Else
# Error config_89c44b0_clock_speed undefined
# Endif
Break;
Case 9600:
# If config_jx44b0_clock_speed = 60
Divisor = 390;
# Elif config_jx44b0_clock_speed = 75
Divisor = 487;
# Else
# Error config_89c44b0_clock_speed undefined
# Endif
Break;
Case 19200:
# If config_jx44b0_clock_speed = 60
Divisor = 194;
# Elif config_jx44b0_clock_speed = 75
Divisor = 243;
# Else
# Error config_89c44b0_clock_speed undefined
# Endif
Break;
Case 38400:
# If config_jx44b0_clock_speed = 60
Divisor = 97;
# Elif config_jx44b0_clock_speed = 75
Divisor = 121;
# Else
# Error config_89c44b0_clock_speed undefined
# Endif break;
Case 57600:
# If config_jx44b0_clock_speed = 60
Divisor = 64;
# Elif config_jx44b0_clock_speed = 75
Divisor = 80;
# Else
# Error config_89c44b0_clock_speed undefined
# Endif break;
Case 115200:
# If config_jx44b0_clock_speed = 60
Divisor = 32;/* The specific algorithm and the above clock speed algorithm are in the same document */
# Elif config_jx44b0_clock_speed = 75
Divisor = 40;
# Else
# Error config_89c44b0_clock_speed undefined
# Endif
--------------------------------------------------------------------------
--------- Board/T2T/TT. C -------------------------------
------------------------------------------------------------
There is nothing to say about this. If you are using a popular online schematic, there are basically no changes. I have added some things, so this file has changed a lot.
However, the file mainly sets the pins of 44B0, Which is IO and which is TXD and RXD. I'm not talking about it anymore. I'm a little patient to read 8-6 pages of the Data Manual.
---------------------------------------------------------------------
------------ Lib_arm/board. c -----------------------------------
---------------------------------------------------------
It seems that the NIC needs to add an INCLUDE
// To be supplemented
This file does not need to be modified. I will explain it online, by the way.
Perform Various initialization settings, including:
Cpu_init CPU-related settings, in./cpu/B0/cpu. c.
The settings related to the board_init board are specific in the board/wx/wx20/wxw.c
Interrupt_init interrupt settings, which are not used, are specific in./cpu/FIG/interrupts. c
Env_init initializes the environment variable, depending on the media used to store the environment variable. If flash is used for storage, the program is in common/env_flash.c.
Init_baudrate: Set the baud Parameter
Serial_init serial port initialization, In the cpu.
Lele_init_f console settings, in./common/console. c
Display_banner: display the title. [click it to make it output personalized things. :)]
Dram_init available memory configuration, in./board/wx/wx20/wxw.c.
Flash_init flash initialization, specific./drivers/cfi_flash.c.
The next step is environment variable initialization, network initialization, and finally to main_loop. You can run various commands.
==========================================
[5] Flash burning
This part may be too simple and rarely written, but is it really easy for people who do not know the ARM development process? I am a cainiao and got stuck here for 3 days :)
Generally, there are several methods,
1) The original bootloader program of the Board or the Special ads program compiled for burning
A relatively advanced and fast method. Many existing development boards use this method (relatively powerful companies). In this situation, the CPU runs, so the speed is fast.
For example, zlg, but it is difficult for beginners or those who do not prepare to study hardware in detail, because they need to write (rewrite) ads to burn programs. You can check if you like.
2) fluted
Like flashpgm, it seems to be called the boundary scanning method, and the CPU does not run at this time, so it is slow to write.
Fluted is not recommended here, because it is simple and troublesome + slow.
Because you need to write (rewrite) Two configuration files, which are character interfaces. Some people say that this software can only be used in Win98. It seems wrong (now there are methods that can be used in 2000 and XP)
Favorite friends can use
3) flashpgm (recommended)
Simple Program, GUI interface, and high speed.
The setting is very simple. Select the correct model in the CPU, of course, it is a 3-star 44b0. The same is true in flash, where both 39lv160 and 29lv160 are available.
Confirm the address. The RAM address is 0xc000000 (on bank7). The flash Address is 0x0 (on bank0)
Read the flash ID after the selection (the button at the bottom left) to read the manufacturer's ID.
Then, run the programe button. Note that flashpgm does not support Bin format. Follow these steps.
In addition, try to clean it before writing it. The programe menu has an option, and you can check it.
For more information about the writing method, see another document I have summarized. Here I will only talk about uboot-related topics.
As mentioned above, three files are generated after uboot compilation.
U-boot-elf files can be identified by most Debug programs;
U-boot.bin -- binary binfile, pure U-BOOT binary Execution Code, without saving ELF format and debugging information. This file is generally used to download to the user Development Board;
U-boot.srec -- Motorola S-record format, can be downloaded to the Development Board through the serial port.
Flashpgm does not support Bin format. You can burn U-boot -- ELF format files. Don't look at it without an extension.
Also, if you are lazy (just like me) and burn it with other ready-made binfiles, flashpgm also provides a bintos19 program, which is located in its installation directory. Run it in specific usage, and it will tell you.
Note: Sometimes (especially when a program already exists in Flash) 0xc000000 may inexplicably prompt that the memory cannot be written. There are several ways to try it: change the address to 0x10000000 (like the cache address), and then click erver to erase the chip. Generally, the erasure operation is unsuccessful. In the end, it doesn't matter. In this case, close the erasure dialog box, then 0x0000000 address remains unchanged and flash is burned. I usually write a self-written LED test applet to occupy the memory :). At this time, replace 0x000000 with 0xc000000 and then follow the normal operation. Generally, the operation is normal.
The reason for this is that the previous program (most of which are incorrect) is running and takes up Ram and Rom. The next LED test applet is to clear these parts.
If the above method is not normal, you can use another program named flashp with 2 letters missing :) very good! I would like to pay tribute to the author of this program !!
Use this software to clean FLASH and then use FLASHPGM to burn it. The reason is that FLASHP is very powerful, but the writing seems to be somewhat problematic ~~