// ***************** startup.c ****************************************** // SBC-DBG sample program for ARMCortex-A9. // The program demonstrates program running at Elcore dsp core. // // (c) OJSC ELVEES, multicore.ru // // ******************************************************************* #include "startup.h" // Адрес начала программы DSP-ядра extern int Start_DSP; // входные параметры - числа, которые DSP складывает extern volatile int InA; extern volatile int InB; // результат extern volatile int OutC; int main() { int InputA=5; int InputB=2; int OutputC; DCSR(0) = 0; SR(0) = 0; PC(0)=((unsigned int)&Start_DSP - 0x3a600000)>>2;//(unsigned int)&PRAM)>>2; A0(0)=((unsigned int)&InA - 0x3a400000)>>2;//(unsigned int)&XRAM)>>2; A1(0)=((unsigned int)&InB - 0x3a400000)>>2;//(unsigned int)&XRAM)>>2; A2(0)=((unsigned int)&OutC- 0x3a400000)>>2;//(unsigned int)&XRAM)>>2; InA=InputA; InB=InputB; DCSR(0) = 0x4000; while( !(QSTR_DSP & (1<<3)) ) ; OutputC=OutC; while(1); }