This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: STM32 ROM .bin does not start


Hello Sergei,

at first: I got some progress!

Hm. Your quoted .ldi, .h mlt files look good to use the internal CPU's
resources only, but, what says arm-eabi-objdump for the final eCos ELF
build? Are there 0x0800_0000 and 0x2000_0000 origins only in the ELF?

As I have never used arm-eabi-objdump before, I can not answer at the moment...


Where are placed .data, .bss, startup stack segments, etc. You can
compare the dumps of the sections for working ELFs and for the got
ones with your tweaks those mlt files.

Good idea, I'll do so tomorrow.


Of course a working JTAG engine
would be so helpful for digging until we can not drive a LED.

If the responsible HW engineer would not have been too stingy woth the pins, I could do so. It was me :-(



Using the USART1 is not possible, but I can flash a LED while using some thread-synchronisation.


What I did:
Looking at the latest _rom-ldi from CVS (currently I am still using eCos 3.0), there is a difference I don't understand:
all the ROM areas are marked as "flash".


I simply switched "ram" to the upper half of "sram", dito with "rom" and "flash".

_rom.ldi
*******************************
MEMORY
{
sram : ORIGIN = 0x20000000, LENGTH = 0x00007D00
flash : ORIGIN = 0x08000000, LENGTH = 0x00040000
rom : ORIGIN = 0x08040000, LENGTH = 0x00040000
ram : ORIGIN = 0x20007D00, LENGTH = 0x00007D00-CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE
}
SECTIONS
{
SECTIONS_BEGIN
SECTION_rom_vectors (flash, 0x08000000, LMA_EQ_VMA)
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)
SECTION_sram (sram, 0x20000400, FOLLOWING (.got))
SECTION_data (ram, 0x20007D00, FOLLOWING (.sram))
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 + 1024*64;


_rom.h
*******************************
#define CYGMEM_REGION_sram (0x20000000)
#define CYGMEM_REGION_sram_SIZE (0x00007D00)
#define CYGMEM_REGION_sram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)


#define CYGMEM_REGION_flash (0x08000000)
#define CYGMEM_REGION_flash_SIZE (0x00040000)
#define CYGMEM_REGION_flash_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)


#define CYGMEM_REGION_ram (0x20007D00)
#define CYGMEM_REGION_ram_SIZE (0x00007D00-CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE)
#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)


#define CYGMEM_REGION_rom (0x08040000)
#define CYGMEM_REGION_rom_SIZE (0x00040000)
#define CYGMEM_REGION_rom_ATTR (CYGMEM_REGION_ATTR_R)


Now I'll try to set up a new .ldi for flash only without those work-arounds.


Nevertheless:
Can anyone explain me what the changes since 3.0 are meant for? Why is everything lying in the internal flash now?



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]