Running from ram improvements #37
                
     Merged
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR replaces the use of FlashAdapter_program with a direct call to memcpy for copying the binary to RAM. The previous approach was a abuse of FlashAdapter_program function, while this version offers a cleaner and more maintainable solution.
It removes the cppcheck configuration for the IMUtility submodule.
It also cleans up the linker scripts to make them easier to use.
AXI-SRAM and DTCMRAM loses the most recent writes after a system reset.
This can lead to code/data corruption if not handled properly.
More details on this problem are available here:
https://community.st.com/t5/stm32-mcus-products/axi-sram-losing-last-few-writes-across-reset/td-p/363788/highlight/true
Workarounds Used
We currently apply a couple of workarounds that have proven to be effective in practice. However, they might not represent a permanent or universal fix. The approach will likely evolve as we continue testing and refining the solution.
For DTCM, where we store the restart_info data, we write an extra byte before reset that we expect to be corrupted.
For AXISRAM, we reserve an extra 4 bytes in the linker script, which we also expect to be corrupted after reset.
Some examples of how corrupted data looks after a restart:
32 bytes aliment (Not OK)
16 bytes aliment (Not OK)
16 bytes aliment with 4 byte extra at the end (OK)
8 bytes aliment with 4 byte extra at the end (OK)