mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Added FAST_RAM_INITIALIZED (#5733)
* Added FAST_RAM_INITIALIZED for those who really want it * Added the white crow of KISSFCV2F7 * Made initialized data LMAs robust * Fixed indirection when initializing fast memory
This commit is contained in:
parent
8e152f3259
commit
f18448e8dc
6 changed files with 65 additions and 9 deletions
|
@ -265,10 +265,18 @@ void init(void)
|
|||
{
|
||||
#ifdef USE_ITCM_RAM
|
||||
/* Load functions into ITCM RAM */
|
||||
extern unsigned char tcm_code_start;
|
||||
extern unsigned char tcm_code_end;
|
||||
extern unsigned char tcm_code;
|
||||
memcpy(&tcm_code_start, &tcm_code, (int)(&tcm_code_end - &tcm_code_start));
|
||||
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_INITIALIZED variable intializers into FAST 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue