Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


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 ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.0 is available for immediate download. MIT licensed, and including RISC-V and ARMv8-M (Cortex-M33) demos.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers





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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner