I am doing a project fro the University and I have to do exactly what you are showing - control an SocKit Cyclon V board with software. I have done the steps I and II and everything is working fine. I get an error when I try to turn off the hps 2 fpga bridge before executing the "dd" command on the rbf file to program the fpga from the hps. My error is:
root@arrow_sockit:~# echo 0 > /sys/class/fpga-bridge/fpga2hps/enable
root@arrow_sockit:~# echo 0 > /sys/class/fpga-bridge/hps2fpga/enable
root@arrow_sockit:~# Unhandled fault: imprecise external abort (0x406) at 0x76fec000
Internal error: : 406 [#1] SMP ARM
Modules linked in: gpio_altera
CPU: 1 PID: 173 Comm: scroll_server Not tainted 3.13.0-00298-g3c7cbb9 #1
task: bf011400 ti: bf176000 task.ti: bf176000
PC is at altera_gpio_set+0x3c/0x80 [gpio_altera]
LR is at altera_gpio_set+0x2c/0x80 [gpio_altera]
pc : [<7f000318>] lr : [<7f000308>] psr: 60000093
sp : bf177e30 ip : 00000000 fp : bf177e54
r10: 80752800 r9 : bfb28f08 r8 : 00000001
r7 : 40000013 r6 : 00000001 r5 : bfbd5378 r4 : bfbd5310
r3 : c091a040 r2 : 00000000 r1 : 000001bc r0 : 40000013
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 3f16404a DAC: 00000015
Process scroll_server (pid: 173, stack limit = 0xbf176248)
Stack: (0xbf177e30 to 0xbf178000)
7e20: 7f0002dc 80785824 00000001 00000003
7e40: 0000009d bfbd5310 bf177e84 bf177e58 802be684 7f0002e8 8005bc68 804da408
7e60: 80785824 00000001 00000001 bf177f78 00000000 bfb86548 bf177e9c bf177e88
7e80: 802be988 802be5f0 bfb5935c 00000000 bf177ebc bf177ea0 803a9a74 802be958
7ea0: 803a9a1c bfb5935c bfb86940 0000000a bf177ee4 bf177ec0 803a8d70 803a9a28
7ec0: bf177eec 00000000 76fec000 802ecb38 bfb86540 0000000a bf177ef4 bf177ee8
7ee0: 802ecb60 803a8cfc bf177f44 bf177ef8 8015b64c 802ecb44 800fcefc 802b96d8
7f00: 00000020 800fb768 00000000 bfb86940 00000000 00000000 8005ab94 bf8f2300
7f20: 0000000a 76fec000 bf177f78 00000001 bf176000 0000000a bf177f74 bf177f48
7f40: 800fb7a8 8015b4f0 0000000c 00000022 00000000 00000000 bf8f2300 76fec000
7f60: 00000001 0000000a bf177fa4 bf177f78 800fbb88 800fb6fc 00000000 00000000
7f80: 00011098 0000000a 76fec000 00000004 8000ece4 00000000 00000000 bf177fa8
7fa0: 8000eac0 800fbb48 00011098 0000000a 00000004 76fec000 0000000a 00000000
7fc0: 00011098 0000000a 76fec000 00000004 00000000 00000000 76ff4000 00000000
7fe0: 00000000 7eb25b88 76f5d274 76f5d284 80000010 00000004 3fffd821 3fffdc21
[<7f000318>] (altera_gpio_set+0x3c/0x80 [gpio_altera]) from [<802be684>] (_gpiod_set_raw_value+0xa0/0x2a4)
[<802be684>] (_gpiod_set_raw_value+0xa0/0x2a4) from [<802be988>] (gpiod_set_raw_value+0x3c/0x54)
[<802be988>] (gpiod_set_raw_value+0x3c/0x54) from [<803a9a74>] (gpio_led_set+0x58/0x9c)
[<803a9a74>] (gpio_led_set+0x58/0x9c) from [<803a8d70>] (brightness_store+0x80/0x94)
[<803a8d70>] (brightness_store+0x80/0x94) from [<802ecb60>] (dev_attr_store+0x28/0x34)
[<802ecb60>] (dev_attr_store+0x28/0x34) from [<8015b64c>] (sysfs_write_file+0x168/0x1fc)
[<8015b64c>] (sysfs_write_file+0x168/0x1fc) from [<800fb7a8>] (vfs_write+0xb8/0x190)
[<800fb7a8>] (vfs_write+0xb8/0x190) from [<800fbb88>] (SyS_write+0x4c/0x80)
[<800fbb88>] (SyS_write+0x4c/0x80) from [<8000eac0>] (ret_fast_syscall+0x0/0x30)
Code: e5943060 e1a07000 e5932000 f57ff04f (e3a03001)
---[ end trace 72b1a3e9709ec1cf ]---
I have no idea what it means or what I have done wrong. Do you have any idea? I took the code from your repository so it should be working. Is there another way to go around this problem. I tried to boot Linux and then program the FPGA using the USB-Blaster port. Then the LEDs start to blink, but Linux freezes. Any help would be apreciated.
A big thank you for your effort on doing this tutorial. Until this moment I haven't found anything similar to it on the web. You are a good man!
Hello Howard,
I am doing a project fro the University and I have to do exactly what you are showing - control an SocKit Cyclon V board with software. I have done the steps I and II and everything is working fine. I get an error when I try to turn off the hps 2 fpga bridge before executing the "dd" command on the rbf file to program the fpga from the hps. My error is: root@arrow_sockit:~# echo 0 > /sys/class/fpga-bridge/fpga2hps/enable root@arrow_sockit:~# echo 0 > /sys/class/fpga-bridge/hps2fpga/enable root@arrow_sockit:~# Unhandled fault: imprecise external abort (0x406) at 0x76fec000 Internal error: : 406 [#1] SMP ARM Modules linked in: gpio_altera CPU: 1 PID: 173 Comm: scroll_server Not tainted 3.13.0-00298-g3c7cbb9 #1 task: bf011400 ti: bf176000 task.ti: bf176000 PC is at altera_gpio_set+0x3c/0x80 [gpio_altera] LR is at altera_gpio_set+0x2c/0x80 [gpio_altera] pc : [<7f000318>] lr : [<7f000308>] psr: 60000093 sp : bf177e30 ip : 00000000 fp : bf177e54 r10: 80752800 r9 : bfb28f08 r8 : 00000001 r7 : 40000013 r6 : 00000001 r5 : bfbd5378 r4 : bfbd5310 r3 : c091a040 r2 : 00000000 r1 : 000001bc r0 : 40000013 Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c5387d Table: 3f16404a DAC: 00000015 Process scroll_server (pid: 173, stack limit = 0xbf176248) Stack: (0xbf177e30 to 0xbf178000) 7e20: 7f0002dc 80785824 00000001 00000003 7e40: 0000009d bfbd5310 bf177e84 bf177e58 802be684 7f0002e8 8005bc68 804da408 7e60: 80785824 00000001 00000001 bf177f78 00000000 bfb86548 bf177e9c bf177e88 7e80: 802be988 802be5f0 bfb5935c 00000000 bf177ebc bf177ea0 803a9a74 802be958 7ea0: 803a9a1c bfb5935c bfb86940 0000000a bf177ee4 bf177ec0 803a8d70 803a9a28 7ec0: bf177eec 00000000 76fec000 802ecb38 bfb86540 0000000a bf177ef4 bf177ee8 7ee0: 802ecb60 803a8cfc bf177f44 bf177ef8 8015b64c 802ecb44 800fcefc 802b96d8 7f00: 00000020 800fb768 00000000 bfb86940 00000000 00000000 8005ab94 bf8f2300 7f20: 0000000a 76fec000 bf177f78 00000001 bf176000 0000000a bf177f74 bf177f48 7f40: 800fb7a8 8015b4f0 0000000c 00000022 00000000 00000000 bf8f2300 76fec000 7f60: 00000001 0000000a bf177fa4 bf177f78 800fbb88 800fb6fc 00000000 00000000 7f80: 00011098 0000000a 76fec000 00000004 8000ece4 00000000 00000000 bf177fa8 7fa0: 8000eac0 800fbb48 00011098 0000000a 00000004 76fec000 0000000a 00000000 7fc0: 00011098 0000000a 76fec000 00000004 00000000 00000000 76ff4000 00000000 7fe0: 00000000 7eb25b88 76f5d274 76f5d284 80000010 00000004 3fffd821 3fffdc21 [<7f000318>] (altera_gpio_set+0x3c/0x80 [gpio_altera]) from [<802be684>] (_gpiod_set_raw_value+0xa0/0x2a4) [<802be684>] (_gpiod_set_raw_value+0xa0/0x2a4) from [<802be988>] (gpiod_set_raw_value+0x3c/0x54) [<802be988>] (gpiod_set_raw_value+0x3c/0x54) from [<803a9a74>] (gpio_led_set+0x58/0x9c) [<803a9a74>] (gpio_led_set+0x58/0x9c) from [<803a8d70>] (brightness_store+0x80/0x94) [<803a8d70>] (brightness_store+0x80/0x94) from [<802ecb60>] (dev_attr_store+0x28/0x34) [<802ecb60>] (dev_attr_store+0x28/0x34) from [<8015b64c>] (sysfs_write_file+0x168/0x1fc) [<8015b64c>] (sysfs_write_file+0x168/0x1fc) from [<800fb7a8>] (vfs_write+0xb8/0x190) [<800fb7a8>] (vfs_write+0xb8/0x190) from [<800fbb88>] (SyS_write+0x4c/0x80) [<800fbb88>] (SyS_write+0x4c/0x80) from [<8000eac0>] (ret_fast_syscall+0x0/0x30) Code: e5943060 e1a07000 e5932000 f57ff04f (e3a03001) ---[ end trace 72b1a3e9709ec1cf ]---
I have no idea what it means or what I have done wrong. Do you have any idea? I took the code from your repository so it should be working. Is there another way to go around this problem. I tried to boot Linux and then program the FPGA using the USB-Blaster port. Then the LEDs start to blink, but Linux freezes. Any help would be apreciated. A big thank you for your effort on doing this tutorial. Until this moment I haven't found anything similar to it on the web. You are a good man!