2024-01-25 10:45 PM
When a new project is being created using Touch GFX, the project folder contains a sub-folder ExtMeM_Boot. This folder contains the source files and includes of the bootloader and its dependencies. A pre-built binary is also included (bootloader.bin) which is called by the linker script. The board that I'm using is a STM32H750 Dev - Kit.
My requirement is I need to perform some modifications to the bootloader program (main.c) and rebuild it to generate binary. Is there a method to build the bootloader program simultaneously with the main application or should I move all the contents and its dependencies to new project or is there any other standard method.
Thankyou.
2024-01-29 06:04 AM
Hello @markd ,
Yes, you can easily apply your modification to the main.c file and generate the project. You just need to open the STM32CubeIDE project that is available at the folder with the same name which is created by TouchGFX. You can also open the main project in Keil μVision or IAR Embedded Workbench.
I hope this helps you, don't hesitate to ask more questions
2024-01-29 09:06 PM
Hello @Mohammad MORADI ESFAHANIASL
Thank you for your reply, I actually want to build the bootloader program which is located in the ExtMem_Boot, while being the in the same project. I attached an image below.
You may have answered it already, I have some trouble understanding it.
BR
2024-01-30 01:20 AM
hi @iTTy
It seems in a forum post you have done manipulations to your bootloader, how did you built and program it
2024-01-30 01:42 AM
Hi @markd,
I'm still working on it; anyway, I partitioned the MCU memory reserving first 2 sectors of Bank1 to the BL editing both application and BL linker scripts (accordingly).
Then, I developed the BL as a stand-alone application programming it to its reserved area.
The same for the final application.
In my case Firmware always starts from BL; if no code is received before a given timeout, it check the HASH of the application section (attached to the code in another reserved location) and if it is correct jump to the application.
Otherwise, received code is flashed, its HASH is checked and if it is correct BL jumps to the application.
Was this your question?
2024-01-30 02:07 AM
Hi @iTTy
My question is when once you change something in BL program, how do you build it and flash it.
In the below image i have marked the "main.c" of the bootloader. The same open project contains the application main file as well which is the file usually built and programed. A pre complied binary of the bootloader is already given, but I want to rebuild the bootloader program and generate the new binary file
2024-01-30 02:17 AM
I'm handling the BL as a totally independent project: it has its own folder, .ioc and so on. When I modify it, I just build and flash it with a programmer.
I'm working in another way.
2024-02-07 02:11 AM - edited 2024-02-07 02:11 AM
Oh I see, I apologize for my confusion.
Bootloaders are usually handled as separate projects from the application. If you have the IAR Embedded Workbench, then there is already a project ready to be worked on. If you don't have IAR, then you need to create an STM32CubeIDE project and add the files in the gcc, Inc and Src folders and then use the Makefile to generate the .bin file.
I don't think you can develop both Bootloader and Application under one project, at least I don't know about it.
Best regards,