2020-06-13 11:51 AM
Compiler optimization for speed on STM32H747HI-DISCO board destroys accessing external flash in memory mapped mode. Works fine without optimization but I get a hardfault as soon as I try to access memory from 0x90000000 after memory mapped mode is switched on.
Does anybody knbow why it happens? I'll appreciate hints for work around too :)
Best Regards;
Anton
2020-06-13 07:33 PM
Experiencing a bug only when optimizing the code usually indicates there is a bug in the code that simply isn't a problem when unoptimized. Could be any number of things. Assuming uninitialized memory in zero. A race condition failing due to the increased code speed. Debug the hard fault, find out where it's occurring exactly and what's causing it.
2020-06-14 06:51 AM
From a firmware code perspective CubeMX, HAL, BSP and C++ on a dual core H7 is probably the worst possible combination in a STM32 world! ;) The amount of flaws in that pile of non-working bloatware developed by brainless code monkeys is so overwhelming that it's much easier and faster to develop all the necessary code on your own.