1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00

Merge pull request #7626 from hydra/bf-move-memory-section-initialisation

Move memory section initialisation earlier into the init sequence.
This commit is contained in:
Michael Keller 2019-04-14 21:26:34 +12:00 committed by GitHub
commit 5a67eb8c1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 16 deletions

View file

@ -226,22 +226,6 @@ dispatchEntry_t activateDshotTelemetryEntry =
void init(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
#ifdef USE_FAST_RAM
/* Load FAST_RAM variable intializers into DTCM RAM */
extern uint8_t _sfastram_data;
extern uint8_t _efastram_data;
extern uint8_t _sfastram_idata;
memcpy(&_sfastram_data, &_sfastram_idata, (size_t) (&_efastram_data - &_sfastram_data));
#endif
#ifdef USE_HAL_DRIVER
HAL_Init();
#endif