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:
commit
5a67eb8c1e
6 changed files with 31 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue