1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 00:35:34 +03:00

Merge pull request #4275 from DieHertz/itcm-ram-loading-f7

Added ITCM-RAM loading
This commit is contained in:
Paweł Spychalski 2019-02-02 19:17:55 +01:00 committed by GitHub
commit 961af06f96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -134,6 +134,8 @@ LoopMarkHeapStack:
cmp r2, r3
bcc MarkHeapStack
bl CopyFastCode
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */

View file

@ -240,6 +240,17 @@
* @{
*/
void CopyFastCode(void)
{
#ifdef USE_ITCM_RAM
/* Load functions into ITCM RAM */
extern uint8_t tcm_code_start;
extern uint8_t tcm_code_end;
extern uint8_t tcm_code;
memcpy(&tcm_code_start, &tcm_code, (size_t) (&tcm_code_end - &tcm_code_start));
#endif
}
/**
* @brief Setup the microcontroller system
* Initialize the Embedded Flash Interface, the PLL and update the