2025-05-21 12:29 AM - edited 2025-05-21 12:31 AM
Although I have expanded an external flash storage for pictures and fonts.Due to the fact that touchgfx generates a large amount of code, the stm32h523cct6 flash is insufficient.
So can I use the address for 0xc000000 flash and address for 0x8000000 flash?I attempted to burn the program separately into these two flash areas. The burning was successful, but the program was not running normally. Do I need to modify or add other configurations? Or is this operation of mine illegal?
2025-05-23 4:55 AM
Hello @XiaoenLee ,
You can use the previously shared linker file.
You’ll also need to tag the object files or libraries appropriately and modify the scatter file (linker script for MDK-ARM) to recognize and place them accordingly.
You can force the attribute in the cpp file of the library like so:
__attribute__((section("SecureFlashSection")))
If the library is precompiled, you can add the section in the linker file :
touchgfx_core_wchar16.o (.text, .data) ;
If your linker doesn’t see that .o directly, you can use a Library Member Specification in ARM linker like this :
touchgfx_core_wchar16.lib(touchgfx_core_wchar16.o) (.text, .data)
Or use a wildcard for safety :
touchgfx_core_wchar16.lib(*) (.text, .data)
Regards,
2025-05-26 2:17 AM
This still seems not to work.As before, the program can be burned into stm32, but it cannot be executed normally. In dubug, the program will jump to an unknown address.
2025-06-03 5:36 AM - edited 2025-06-03 5:37 AM
Hello @XiaoenLee ,
So now your program jumps to an unknown address? But this was also the case before?
In that case, then you should first fix that before trying to enable 2 flashes.
Are you able to make a simple program work?
Are you able to make other compiler work?
Regards,
2025-06-04 11:14 PM
Everything is normal if the program is run with only one flash area, but it is abnormal when the program is run with two flash areas that are not consecutive addresses.
I think the address of the flash area where the program needs to be run must be consecutive. We cannot use "The address for 0xc000000 flash" and "the address for 0x8000000 flash" together because the CPU cannot address to another area.
2025-06-11 7:11 AM
Hello @XiaoenLee ,
It seems that the maximum memory for the STM32H523cc is 256Kb of flash:Perhaps the non-secure and secure actually use the same physical memory but the address is different based on if you set it as secure or not?
Regards,
2025-06-12 12:59 AM
I think so too. So I need to replace it with a larger non-flash memory chip.
2025-06-12 1:53 AM - edited 2025-06-12 1:53 AM
Hello @XiaoenLee ,
I don't understand what you want to replace.
Perhaps you could use the STM32H523ce which only difference seem to be the memory size. Perhaps the change is easy to do or try to optimize your code to fit in 256Kb.
Regards,