Здравствуйте,
Давно читаю ваш форум, много полезного нашел именно здесь и вот пришло время зарегистрироваться.
3 день бьюсь с проблемой и всё сдаюсь, не могу я найти в чём проблема, прошу помощи у сообщества.
Имею:
STM32F100C8T6B
Openocd 0.6.1
Eclipse Indigo Service Release 1 Build id: 20110916-0149
Sourcery_CodeBench_Lite_for_ARM_EABI 4.7.2 2012.09-63
J-Link ARM V8 compiled Sep 20 2012 13:27:01
Все это под Linux 32b
Маленькие (до 9кб) проекты заливаются нормально и работают но стоит проекту стать больше, все не шьется
Сделал тестовый проект, с опцией -Xlinker --gc-sections весит 3к без 18к на нём и покажу
С --gc-sections проблем нету, а вот если убрать то есть
OpenOCD ругается:
Open On-Chip Debugger 0.6.1 (2012-11-20-13:03)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : J-Link initialization started / target CPU reset initiated
Info : J-Link ARM V8 compiled Sep 20 2012 13:27:01
Info : J-Link caps 0xb9ff7bbf
Info : J-Link hw version 80000
Info : J-Link hw type J-Link
Info : J-Link max mem block 9312
Info : J-Link configuration
Info : USB-Address: 0x0
Info : Kickstart power on JTAG-pin 19: 0xffffffff
Info : Vref = 3.287 TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 0 TRST = 0
Info : J-Link JTAG Interface ready
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06420041 (mfg: 0x020, part: 0x6420, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: stm32f1x.cpu -- clearing lockup after double fault
Polling target failed, GDB will be halted. Polling again in 100ms
Polling succeeded again
Info : accepting 'telnet' connection from 4444
auto erase enabled
Info : device id = 0x10016420
Info : flash size = 64kbytes
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x20002004
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x20002004
Warn : Block write error address 0x20002000, wcount 0xe
Error: error writing to flash at address 0x08000000 at offset 0x00000000
in procedure 'flash'
вот здесь выложил вывод openocd -d 3 тыц
Я понимаю что где-то у меня ошибка может в линкере или ещё где, но вот уже 3 день найти не могу,
Чтобы было удобней я весь проект закинул как в архиве так и каталогом вот сюды
Могу конечно и сюда запостить нужные файлы
linker
loewa@pcitisadmin1:/data0/loewa/elipse/test/prj$ cat ./STM32F10X_MD.ld
/*************************************************
* linker script for STM32F10x Medium Density Devices
************************************************/
ENTRY(Reset_Handler)
_Minimum_Stack_Size = 0x100;
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 64K
}
/* higher address of the user mode stack */
PROVIDE ( _estack = ALIGN(ORIGIN(RAM) + LENGTH(RAM) - 8 ,8) );
SECTIONS
{
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector))
. = ALIGN(4);
} > FLASH
.text :
{
__ctors_start__ = .;
KEEP(SORT(*)(.init_array)) /* eabi uses .init_array for static constructor lists */
__ctors_end__ = .;
__dtors_start__ = .;
__dtors_end__ = .;
. = ALIGN(4);
*(.text) /* remaining code */
*(.text.*)
*(.rodata) /* read-only data (constants) */
*(.rodata*)
*(.eh_frame_hdr)
*(.eh_frame)
*(.ARM.extab* .gnu.linkonce.armextab.*)
*(.gcc_except_table)
*(.eh_frame_hdr)
*(.eh_frame)
*(.glue_7)
*(.glue_7t)
. = ALIGN(4);
} > FLASH
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > FLASH
__exidx_end = .;
.text.align :
{
. = ALIGN(8);
_etext = .;
_sidata = _etext; /* start of initialized data label */
} > FLASH
.data : AT ( _sidata ) /* AT makes the LMA follow on in the binary image */
{
. = ALIGN(4);
_sdata = .; /* start of .data label */
KEEP( *(.data) )
KEEP( *(.data.*) )
. = ALIGN(4);
_edata = .; /* end of .data label */
} > RAM
/* .bss section - uninitialized data */
.bss :
{
. = ALIGN(4);
_sbss = .; /* start of .bss label (for startup) */
*(.bss)
*(.bss.*)
*(COMMON)
. = ALIGN(4);
_ebss = .; /* end of .bss label (for startup) */
_end = .; /* end of used ram (start of free memory, for malloc) */
__end = .; /* the same */
} > RAM
/*
* This is the user stack section
* This is just to check that there is enough RAM left for the User mode stack
* It should generate an error if it's full.
*/
._usrstack :
{
. = ALIGN(4);
_susrstack = .;
. = . + _Minimum_Stack_Size;
. = ALIGN(4);
_eusrstack = .;
} >RAM
PROVIDE( _heap = _ebss );
PROVIDE ( _eheap = ALIGN(ORIGIN(RAM) + LENGTH(RAM) - 8 ,8) );
/*
* after that it's only debugging information.
*/
/* remove the debugging information from the standard libraries */
DISCARD :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/*
* DWARF debug sections.
* Symbols in the DWARF debugging sections are relative to the beginning
* of the section so we begin them at 0.
*/
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
}
Жду помощи :smile3046: