2021-06-16 01:11 AM
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
2021-06-17 02:58 AM
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
2021-06-17 03:06 AM
@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"
2021-06-17 03:07 AM
do you have any solution for me, please?
2021-06-17 03:15 AM
in app project preferences C/C++ General -> path and symbols -> references tab , need to be set for all project configuration
2021-06-17 03:29 AM
Once i tick the reference i want, how do i tell the linker what is what, any name convention i should know about?
2021-06-17 03:47 AM
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
2021-06-17 03:59 AM
In true, a can't understand you. Second bank flash and second hex file this is independent things, One project one hex file.
2021-06-17 05:28 AM
thanks @Rados?aw , ill give it a try
2021-06-17 06:12 AM
> 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.
2021-06-17 06:19 AM
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.