cancel
Showing results for 
Search instead for 
Did you mean: 

Creating .hex file from two banks memory of STM32H753

FBern.2
Associate II

Hello,

I have a problem with my .HEX file generated with KEIL 5.

In STM32H753 there are two banks memory:

FIRST BANK MEMORY : 0x08000000-0x080FFFFF

SECOND BANK MEMORY : 0x08100000-0x081FFFFF

My project has this structure:

0x08000000-0x08060000=> My own Boot

0x08060000-0x081FFFFF => My own app

When I obtain .bin file of my project (it was been converted from .hex file) the file is always 1 Mb and it contains the code of FIRST BANK MEMORY.

How can I obtain both .hex file? from first and second bank memory?

thank you.

best regards.

Fabio

22 REPLIES 22
Radosław
Senior II

No, of course not, app project need to be referenced to bootloader project, so it will be build when app project is build. But still you can just copy bin file, or include bin file direcly

@Rados?aw​ That would be perfect, i am going to search for info about how to "app project need to be referenced to bootloader project"

we dont need to firmware by ourselves, lets talk

do you have any solution for me, please?

Radosław
Senior II

in app project preferences C/C++ General -> path and symbols -> references tab , need to be set for all project configuration

Once i tick the reference i want, how do i tell the linker what is what, any name convention i should know about?0693W00000BbFOLQA3.png0693W00000BbFOzQAN.png

we dont need to firmware by ourselves, lets talk
Radosław
Senior II

You mix two things, and answer depends on your needs, Add in linker settings path to folder containing bin file, linker will search this file like library files.

This bin file can be anyware, copy to app project, use boot project location etc. Referencing project is usefull in developing stage, when you need always include latest version of bootloader.

In linker script you need insert:

TARGET(binary)

INPUT(boot.bin)

OUTPUT_FORMAT(default)

you need to create section ale place in correct place in momory in this section:

.boot_section :

{

boot.bin

} > BOOT_MEMORY

In true, a can't understand you. Second bank flash and second hex file this is independent things, One project one hex file.

thanks @Rados?aw​ , ill give it a try

we dont need to firmware by ourselves, lets talk
TDK
Guru

> one project for boot and one project for app.

> I can't find .hex file of second bank. I find only one .hex file (FIRST BANK). Where is the second .hex file?

The HEX file is generated when you compile the corresponding project. If you have two projects, you should have two HEX files within the corresponding Debug/Release directory.

If it's only outputting an ELF file, you can enable conversion to HEX and/or BIN in the project properties somewhere.

If you feel a post has answered your question, please click "Accept as Solution".

Sorry but i have only one project for my own app. This project start from 0x50000 to 0x200000. Project generates only one .hex file that It's represents First bank flash Memory (0-100000). The second Bank flash Memory (100000-200000) Is not present in .hex file. Why this? I have enable . hex file also for other flash Bank Memory? Let me know please.