cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling application to run not from the start of the flash

IFInc.1
Associate II

Hello

I have an steval-stwinkt1 board, that i am trying to enable support for DFU mode.

I flashed costume boot loader firmware on to the the start of the flash (0x8000000) that lets you load into another firmware that was uploaded by the DFU mode or to stay in the current program to flash new firmware throw the USB.

i used this st tutorial- https://www.youtube.com/watch?v=n_LDXOQHerU

I tried the .dfu package that comes with the STM32Cube and i saw that the program ran successfully so i assume that the bootloader works.

but when i try to make my own DFU package from my software the software never loads and i get hard fault. i moved the software according to the ST totorial & some research i done to 0x800C000 by changin the following lines:

in the FLASH.ld file:

FLASH    (rx)    : ORIGIN = 0x8000000,   LENGTH = 2048K

to:

FLASH    (rx)    : ORIGIN = 0x800C000,   LENGTH = 2048K

and in the stm32l4r9xx.h changed FLASH_BASE to:

#define FLASH_BASE            (0x0800C000UL)

to make the dfu package i use dfu-tool (i use linux) and use this command:

dfu-tool convert dfuse software.bin software.dfu

what do i need to change to make my software works when i load the dfu package?

thanks

itay

6 REPLIES 6
IFInc.1
Associate II

does some one know what did i miss?

Piranha
Chief II

> in the stm32l4r9xx.h changed FLASH_BASE

That is hardware definition file. Don't change anything there!

so where do i change the code to make the application run from 0x0800C000, both the main code and the vector table?

changed it from 0x00 to 0xc000 to have the correct offset (i think)

then flashed it to the MCU using dfu-util and got:

Downloading to address = 0x0800c000, size = 53864
Download	[=========================] 100%        53864 bytes
Download done.
File downloaded successfully

but on the mcu after restart the program dose not start correctly ( i have PWM signal that sould come on but it dose not)

i tried to flash both the DFU file and from the .bin file directly- both didnt work

IFInc.1
Associate II

up