Есть плата BeagleBone(белая) с отладчиком на борту (XDS100v2).
Процессор XAM3359.
Среда Win7, CCS v6.2 компилятор GCC gcc-arm-none-eabi-4_9-2015q3.
ПО собираю из исходников AM335X_StarterWare_02_00_01_01,
пытаюсь вызвать программное прерывание, но не происходит перевода на обработчик.
программа запускается из DDR (gel делает инит переферии и т.п.), таблица векторов располагается в RAM 0x4030FC00.
при вызове asm volatile("swi #458752");
процессор переходит по адресу 0x4030FC08, там он должен загрузить адрес подпрограммы SVC_Handler
но заместо этого возвращается на сл. команды после вызова swi #458752.
При этом IRQHandler, AbortHandler работают.
Код
main(){
while(1) asm volatile("swi #458752");
}
while(1) asm volatile("swi #458752");
}
Код
SVC_Handler:
b SVC_Handler
b SVC_Handler
Код
/******************************************************************************
** INTERNAL VARIABLE DEFINITIONS
*******************************************************************************/
const unsigned int AM335X_VECTOR_BASE = 0x4030FC00;
static unsigned int const vecTbl[14]=
{
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF014, /* Opcode for loading PC with the contents of [PC + 0x14] */
0xE24FF008, /* Opcode for loading PC with (PC - 8) (eq. to while(1)) */
0xE59FF010, /* Opcode for loading PC with the contents of [PC + 0x10] */
0xE59FF010, /* Opcode for loading PC with the contents of [PC + 0x10] */
(unsigned int)Entry,
(unsigned int)UndefInstHandler,
(unsigned int)SVC_Handler,
(unsigned int)AbortHandler,
(unsigned int)IRQHandler,
(unsigned int)FIQHandler
};
** INTERNAL VARIABLE DEFINITIONS
*******************************************************************************/
const unsigned int AM335X_VECTOR_BASE = 0x4030FC00;
static unsigned int const vecTbl[14]=
{
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF018, /* Opcode for loading PC with the contents of [PC + 0x18] */
0xE59FF014, /* Opcode for loading PC with the contents of [PC + 0x14] */
0xE24FF008, /* Opcode for loading PC with (PC - 8) (eq. to while(1)) */
0xE59FF010, /* Opcode for loading PC with the contents of [PC + 0x10] */
0xE59FF010, /* Opcode for loading PC with the contents of [PC + 0x10] */
(unsigned int)Entry,
(unsigned int)UndefInstHandler,
(unsigned int)SVC_Handler,
(unsigned int)AbortHandler,
(unsigned int)IRQHandler,
(unsigned int)FIQHandler
};