📄 scatter_load.c
字号:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "type.h"
#include "Option.h"
#include "2460slib.h"
//===================================================================
#if (USE_SCATTER_LOAD==1)
void ScatterMemcpy (volatile uint32* d, volatile uint32* s, uint32 l)
{
volatile uint32 i;
for (i=0,l/=4 ; i<l ; i++)
d[i] = s[i];
}
void ScatterMemset (volatile uint32* d, uint32 v, uint32 l)
{
volatile uint32 i;
for (i=0,l/=4 ; i<l ; i++)
d[i] = v;
}
void ScatterLoad (void)
{
extern uint32 Load$$DRAM$$Base, Image$$DRAM$$Base, Image$$DRAM$$Length, Image$$DRAM$$ZI$$Base, Image$$DRAM$$ZI$$Length;
if (&Load$$DRAM$$Base != &Image$$DRAM$$Base)
ScatterMemcpy(&Image$$DRAM$$Base, &Load$$DRAM$$Base, (uint32)&Image$$DRAM$$Length);
if ((uint32)&Image$$DRAM$$ZI$$Length != 0)
ScatterMemset(&Image$$DRAM$$ZI$$Base, 0, (uint32)&Image$$DRAM$$ZI$$Length);
return;
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -