Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


STR9 Flash pb, no restart after power cycle

Posted by damien h on September 4, 2008
Hi everybody,

I have some trouble to program my STR9 with my USB Olimix JTAG and OpenOCD (r717)

(dev board : E912 Olimex with STR912F44, JTAG : Olimex ARM-USB-OCD, i boot always from bank 0, bank1 is used for data only)

I have no problem for debug, everything works perfectly (including FreeRTOS ;-)

If I load an image, i can execute, do a reset and continue to use my device. But when i loose my power supply, the software CAN'T restart.

Is somebody who have successfully used OpenOCD - Olimex JTAG to burn a STR912 flash ?
Is somebody who have already experienced this kind of events.

Is it something wrong in my linker file ?

Any idea welcome.
Thanks in advance.


_HEAPSIZE = 40000;

flash (rx) : ORIGIN = 0x00000000, LENGTH = 512K
ram (rw) : ORIGIN = 0x04000000, LENGTH = 96K

.text :
*(.text .text.*)
*(.glue_7t .glue_7)
} >flash =0
. = ALIGN(4);

/* .rodata section which is used for read-only data (constants) */

.rodata :
*(.rodata .rodata.*)
} >flash
. = ALIGN(4);

_etext = .;
PROVIDE (etext = .);

/* .data section which is used for initialized data */

.data : AT (_etext)
__data_start = .;
*(.data .data.*)
. = ALIGN(4);
*(.fastrun .fastrun.*)
} >ram
. = ALIGN(4);

_edata = .;
PROVIDE (edata = .);

/* .bss section which is used for uninitialized data */

.bss :
__bss_start = .;
__bss_start__ = .;
*(.bss .bss.*)
. = ALIGN(4);
} >ram
. = ALIGN(4);
__bss_end__ = .;

_end = .;
PROVIDE(end = .);

.heap (NOLOAD) :
__heap_start__ = .;
_heap_start = .;
. = MAX(__heap_start__ + _HEAPSIZE , .);
} >ram
__heap_end__ = __heap_start__ + SIZEOF(.heap);
_heap_end = __heap_start__ + SIZEOF(.heap);


. = ALIGN(32 / 8);
_end = .;
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
PROVIDE (end = .);

RE: STR9 Flash pb, no restart after power cycle

Posted by Stefano Oliveri on September 4, 2008
Hi Damien,

I had the same problem on STR912+Eclipse+OpenOCD. I use the same linker file, but I found that the problem was in the startup file - startup.s.

I added the following three code lines just before the _start assembly label:

.section .init, "ax"

ldr pc, =NextInst

This solve my problem by placing the _start function in the right segment.

I hope this should help you.


RE: STR9 Flash pb, no restart after power cycle

Posted by damien h on September 4, 2008
Hi Stephano,

it's clear, You have completely right....
Thank you very much for this help


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists