[ECOS] Re: STM32 ROM .bin does not start

Bernhard Gebert bernhard_gebert@web.de
Sun Jan 3 12:57:00 GMT 2010


Hello John,

thank you for the hints.

Now I modified the _rom.ldi and _rom.h, they look quite similar to those 
of the AT91SAM7S256 now.

_rom.h:
*****************************************
#define CYGMEM_REGION_ram (0x20000000)
#define CYGMEM_REGION_ram_SIZE 
(0x00010000-CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
#define CYGMEM_REGION_rom (0x08000000)
#define CYGMEM_REGION_rom_SIZE (0x00080000)
#define CYGMEM_REGION_rom_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))

_rom.ldi:
*****************************************
MEMORY
{
    ram  : ORIGIN = 0x20000000, LENGTH = 
0x00010000-CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE
    rom : ORIGIN = 0x08000000, LENGTH = 0x00080000
}
SECTIONS
{
    SECTIONS_BEGIN
    SECTION_rom_vectors (rom, 0x08000000, LMA_EQ_VMA)
    SECTION_RELOCS (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_text (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_fini (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_rodata (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_rodata1 (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_fixup (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_gcc_except_table (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_eh_frame (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_got (rom, ALIGN (0x8), LMA_EQ_VMA)
    SECTION_data (ram, 0x20000400, FOLLOWING (.got))
    SECTION_bss (ram, ALIGN (0x8), LMA_EQ_VMA)
    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
    SECTIONS_END
}

hal_vsr_table = 0x08000000;   // Sould residue at the beginning of the 
internal FLASH now?
hal_virtual_vector_table = hal_vsr_table + 128*4;
hal_startup_stack = 0x20000000 + 1024*32;   // The µC includes 645 kb 
RAM, so set it to 32k

I also deleted the RAM relocation from SROM to SRAM in hal_reset_vsr().

But, still no success.

Brg,
Bernhard


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



More information about the Ecos-discuss mailing list