public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS]Redboot for FSL TWRK70F120M with Linux kernel booting
@ 2012-03-14  4:40 Linh Nguyễn
  2012-03-14  7:44 ` Ilija Kocho
  0 siblings, 1 reply; 10+ messages in thread
From: Linh Nguyễn @ 2012-03-14  4:40 UTC (permalink / raw)
  To: eCos Discussion

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

Hi all,

Does anyone successful porting Redboot for TWRK70F120M hardware board?
I have edited HAL of TWRK60N512 to use as TWRK70F120M. It can run but
I don't now how to add SDRAM of K70 into linker file and use it.
Attached files are linker file that I edited to use SDRAM, I have
initialized PLL0 and PLL1 then DDR registers. I can access SDRAM by
hard address (like 0x70001000). But when I load a binary file into
SDRAM, it shown the warrning as bellow:
<code>
RedBoot> load -r -v -h 10.207.215.87 -m tftp -b 0x70008000 Image
Specified address (0x70008000) is not believed to be in RAM - continue (y/n)? y
</code>

If you have any ideas about the problems, please let me know :).
If anyone have ported Redboot to K70 or successful in using SDRAM
please share me :).

I'm looking forward to hearing from you.
Thank all of you.

[-- Attachment #2: mlt_kinetis_flash_sram2s_rom.h --]
[-- Type: text/x-chdr, Size: 1120 bytes --]

// eCos memory layout

#ifndef __ASSEMBLER__
#include <cyg/infra/cyg_type.h>
#include <stddef.h>

#endif
#define CYGMEM_REGION_sram (0x20000000 - CYGHWR_HAL_KINETIS_SRAM_BANK_SIZE)
#define CYGMEM_REGION_sram_SIZE (CYGHWR_HAL_KINETIS_SRAM_BANK_SIZE)
#define CYGMEM_REGION_sram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)

#define CYGMEM_REGION_ram (0x20000000)
#define CYGMEM_REGION_ram_SIZE (CYGHWR_HAL_KINETIS_SRAM_BANK_SIZE-CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)

#define CYGMEM_REGION_flash (0x00000000)
#define CYGMEM_REGION_flash_SIZE (CYGHWR_HAL_KINETIS_FLASH_SIZE)
#define CYGMEM_REGION_flash_ATTR (CYGMEM_REGION_ATTR_R)

#define CYGMEM_REGION_dram (0x70000000)
#define CYGMEM_REGION_dram_SIZE (0x08000000)
#define CYGMEM_REGION_dram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)

#ifndef __ASSEMBLER__
extern char CYG_LABEL_NAME (__heap1) [];
#endif
#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
#define CYGMEM_SECTION_heap1_SIZE (CYGMEM_REGION_ram+CYGMEM_REGION_ram_SIZE - (size_t) CYG_LABEL_NAME (__heap1))



[-- Attachment #3: mlt_kinetis_flash_sram2s_rom.ldi --]
[-- Type: application/octet-stream, Size: 1849 bytes --]

// eCos memory layout

#include <pkgconf/hal.h>
#include <cyg/infra/cyg_type.inc>

MEMORY
{
    dram : ORIGIN = 0x70000000, LENGTH = 0x08000000
    sram  : ORIGIN = 0x20000000 - CYGHWR_HAL_KINETIS_SRAM_BANK_SIZE, LENGTH = CYGHWR_HAL_KINETIS_SRAM_BANK_SIZE
    ram  : ORIGIN = 0x20000000, LENGTH = CYGHWR_HAL_KINETIS_SRAM_BANK_SIZE-CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE
    flash : ORIGIN = 0x00000000, LENGTH = CYGHWR_HAL_KINETIS_FLASH_SIZE
}

SECTIONS
{
    SECTIONS_BEGIN
    SECTION_rom_vectors (flash, 0x00000000, LMA_EQ_VMA)
    USER_SECTION(kinetis_misc, flash, ALIGN (0x8), LMA_EQ_VMA)

    // Kinetis FLASH configuration field. Must be present at 0x00000400
    // Warning: Omitting FLASH configuration field or moving it to
    //          other location may lock Kinetis controller.
    // See src/kinetis_mis.c for definition

    .flash_conf 0x00000400 : { KEEP (*(.flash_conf)) } > flash

    SECTION_RELOCS (flash, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_text (flash, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_fini (flash, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_rodata (flash, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_rodata1 (flash, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_fixup (flash, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_gcc_except_table (flash, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_eh_frame (flash, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_got (flash, ALIGN (0x8), LMA_EQ_VMA)
    USER_SECTION (code_sram, sram, 0x20000000 - CYGHWR_HAL_KINETIS_SRAM_BANK_SIZE (NOLOAD), LMA_EQ_VMA)
    SECTION_data (ram, 0x20000400, FOLLOWING (.got))
    SECTION_sram (ram, ALIGN (0x8), FOLLOWING (.data))
    SECTION_bss (ram, ALIGN (0x8), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}

hal_vsr_table = (0x20000000);
hal_virtual_vector_table = hal_vsr_table + 128*4;
hal_startup_stack = (0x20000000 + CYGHWR_HAL_KINETIS_SRAM_BANK_SIZE);

[-- Attachment #4: Type: text/plain, Size: 148 bytes --]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-03-21  2:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-14  4:40 [ECOS]Redboot for FSL TWRK70F120M with Linux kernel booting Linh Nguyễn
2012-03-14  7:44 ` Ilija Kocho
2012-03-14  8:08   ` Linh Nguyễn
2012-03-14  9:28     ` Ilija Kocho
2012-03-15  4:04       ` Linh Nguyễn
2012-03-15 15:57         ` Ilija Kocho
2012-03-15 17:02           ` Linh Nguyễn
2012-03-16 11:08             ` Ilija Kocho
2012-03-16 17:25               ` Linh Nguyễn
2012-03-21  2:27       ` Linh Nguyễn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).