This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use DMTimer and Interrupt in Beaglebone black



Hi,

I'm trying to use DMTimer to generate timer interrupt.

Furthermore, I would like to make a program that uses a timer interrupt, call a function that I made periodically.

So,I tried to compile AM335X_StarterWare_02_00_01_01/examples/beaglebone/dmtimer/dmtimerCounter.c first, but it did not work. I use Beagleboneblack with OS(Ubuntu 13.04, Kernel 3.8.13)

The results were as follows:

$gcc dmtimer.o dmtimer_2.o dmtimerCounter.o interrupt.o uartStdio.o ascii.o consoleUtils.o -o dmtimerCounter
interrupt.o: In function `IntMasterIRQEnable':
interrupt.c:(.text+0x39c): undefined reference to `CPUirqe'
interrupt.o: In function `IntMasterIRQDisable':
interrupt.c:(.text+0x3a8): undefined reference to `CPUirqd'
interrupt.o: In function `IntMasterFIQEnable':
interrupt.c:(.text+0x3b4): undefined reference to `CPUfiqe'
interrupt.o: In function `IntMasterFIQDisable':
interrupt.c:(.text+0x3c0): undefined reference to `CPUfiqd'
interrupt.o: In function `IntMasterStatusGet':
interrupt.c:(.text+0x3cc): undefined reference to `CPUIntStatus'
uartStdio.o: In function `UARTStdioInit':
uartStdio.c:(.text+0x4): undefined reference to `UARTConsoleInit'
uartStdio.o: In function `UARTPutc':
uartStdio.c:(.text+0x522): undefined reference to `UARTConsolePutc'
uartStdio.o: In function `UARTGetc':
uartStdio.c:(.text+0x534): undefined reference to `UARTConsoleGetc'
collect2: error: ld returned 1 exit status

*dmtimer is AM335X_StarterWare_02_00_01_01/drivers/dmtimer.c

*dmtimer_2 is  AM335X_StarterWare_02_00_01_01/platform/beaglebone/dmtimer.c

So, I tried to compile cpu.c(AM335X_StarterWare_02_00_01_01/system_config/armv7a/gcc/cpu.c).

But, it doesn't work. The following error came out.

$ gcc -c cpu.c
/tmp/ccEZw0Ls.s: Assembler messages:
/tmp/ccEZw0Ls.s:31: Error: invalid swi expression
/tmp/ccEZw0Ls.s:31: Error: value of 458752 too large for field of 2 bytes at 4

I don't know what to do next. Could anyone tell me what should I do?

Regards,

Wataru