Transplant the Redboot to the s3c44b0x platform.

Source: Internet
Author: User

Basically follow the steps below, but there are some problems.

The following steps are copied from the documents on the ECOS official website. Minimal Requirements

These is the changes you must make before your attempt to build redboot. You is advised to read all the sources though.

Copy of the existing platform HAL from the same or another architecture. Rename the files as necessary to follow the STANDARD:CDL and MLT related files should contain the <arch>_<varian T>_<platform> triplet.

Adjust CDL Options. Primarily option naming, real-time Clock/counter, and cyghwr_memory_layout variables, but also other options may need edit Ing. Look through the Architecture/variant CDL files to see if there is any requirements/features which where isn't used on the Platform you copied. If so, add appropriate ones. See the sections called HAL Platform CDL for more details.

Add the necessary packages and target descriptions to the top-level ecos.db file. See the section called ECos Database. Initially, the target entry should only contain the HAL packages. Other hardware support packages would be added later.

Adjust the MLT files in include/pkgconf to match the memory layout on the platform. For initial testing it should is enough to just hand edit. h and. ldi files, but eventually you should generate all files Using the Memory layout editor in the Configuration tool. See the sections called Platform Memory Layout for more details.

Edit the MISC/REDBOOT_<STARTUP>.ECM for the STARTUP type that has chosen to begin with. Rename any platform specific options and remove any that does not apply. In the cdl_configuration sections, comment out any extra packages that is added, particularly packages such as Cygpkg_io_f LASH and Cygpkg_io_eth_drivers. These is not needed for initial porting and would be added back later.

If The default IO macros is not correct, override them in Plf_io.h. This is necessary if the platform uses a different endianness from the default for the CPU.

Leave out/comment out code that enables caches and/or MMU if possible. Execution speed would not be a concern until the port was feature complete.

Implement a simple serial driver (polled mode only). Make sure the initialization function properly hooks the procedures up in the virtual vector IO channel tables. Redboot'll call the serial driver via these tables.

By copying a existing platform HAL most of this code would be already done, and would only need the platform specific HARDW Is access code to is written.

Adjust/implement necessary platform initialization. This can is found in Platform.inc and platform. S files (arm:hal_platform_setup.h and <PLATFORM>_MISC.C, PowerPC: <platform>. S). This step can be postponed if doing a RAM startup Redboot first and the existing ROM monitor handles board in Itialization.

Define Hal_stub_platform_reset (optionally empty) and hal_stub_platform_reset_entry so redboot can Reset-on-detach- This was very handy, often removing the need for physically resetting the board between downloads.

The first problem I encountered was the fourth step of modifying the memory distribution. h files and. ldi files are easy to understand, can be modified smoothly, but MLT file does not understand, MLT file is configtool with, if not changed, in the use of Configtool configuration, do import this step will automatically exit. Finally, I changed the MTL file to look like this, you can continue to use Configtool.

Ram.mlt

Version 0
Region RAM 0c000000 800000 0!
Section fixed_vectors 0 1 0 1 1 0 1 0 0c000020!
Section rom_vectors 0 1 0 1 1 1 1 1 20000 0c020000 text text!
Section text 0 4 0 1 0 1 0 1 fini fini!
Section fini 0 4 0 1 0 1 0 1 rodata rodata!
Section Rodata 0 4 0 1 0 1 0 1 rodata1 rodata1!
Section rodata1 0 4 0 1 0 1 0 1 fixup fixup!
Section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table!
Section gcc_except_table 0 4 0 1 0 1 0 1 data Data!
Section data 0 4 0 1 0 1 0 1 BSS BSS!
Section BSS 0 4 0 1 0 1 0 1 heap1 heap1!
Section Heap1 0 8 0 0 0 0 0 0!

Rom.mlt

Version 0
Region RAM 0c000000 800000 0!
Region ROM 00000000 200000 1!
Section fixed_vectors 0 1 0 1 1 0 1 0 0c000020!
Section data 0 1 1 1 1 1 0 0 800000 BSS!
Section BSS 0 4 0 1 0 1 0 1 heap1 heap1!
Section Heap1 0 8 0 0 0 0 0 0!
Section Reserved_bootmon 20000 1 0 0 1 1 1 1 0 0 rom_vectors rom_vectors!
Section Rom_vectors 0 8 0 1 0 1 0 1 text text!
Section text 0 1 0 1 0 1 0 1 fini fini!
Section fini 0 4 0 1 0 1 0 1 rodata rodata!
Section Rodata 0 4 0 1 0 1 0 1 rodata1 rodata1!
Section rodata1 0 4 0 1 0 1 0 1 fixup fixup!
Section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table!
Section gcc_except_table 0 4 0 1 0 0 0 1 Data!

I do not know if the change is correct, but should not affect the subsequent development. Because if the memory layout in the generated project is incorrect, we can directly modify the. h file and the. mlt file.

The second question I encountered was:

From the serial port to send data to the PC, how also can not be sent out. It should be right from the time it was sent. It took 5 seconds to send a 10K time at a baud rate of 19200, but the PC didn't receive it and didn't know where it was going.

Carefully read the s3c44b0x documentation, TX0 and RX0 are reusable ports, I set the port function to tx0 and rx0, send normal.

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.