pulp-platform / pulpino

An open-source microcontroller system based on RISC-V
http://www.pulp-platform.org
Other
874 stars 296 forks source link

Running fpga application(led_demo) c code using ri5cy-gnu-toolchain. #324

Closed sunil3690 closed 4 years ago

sunil3690 commented 4 years ago

hi, i am running application c code(led_demo) on pulpino using ri5cy-gnu toolchain. a new folder, in which the C program will be copied, has to be created in the path sw/apps. The files are managed by using CMake that exploits the CMakeLists.txt files to organize the applica- tion folders. In each of these a CMakeLists.txt has to be created and structured like the following example: my c code folder name led_demo main.c add_application(led_demo main.c) in which led_demo is the name used when we run the application and main.c is the name of the program. Also the CMakeLists.txt in the sw/apps has to be modified including the line add_subdirectory,

i am facing an error while executing "make main" comand

root@reva-Extensa-M200-H110:~/pulpino/sw/build_demo/led_demo# make main cc main.c -o main main.c:12:24: fatal error: string_lib.h: No such file or directory compilation terminated.

: recipe for target 'main' failed make: *** [main] Error 1 please can anyone help the issue thaks in advance
aignacio commented 4 years ago

I guess you're not including this dir inside your toolchain rules... (pls check -Isw/libs/string_lib/inc)

sunil3690 commented 4 years ago

Thank you very much for your reply I will try it

On Mon, Oct 21, 2019, 11:52 AM Ânderson Ignacio da Silva < notifications@github.com> wrote:

I guess you're not including this https://github.com/pulp-platform/pulpino/tree/master/sw/libs/string_lib/inc dir inside your toolchain rules... (pls check -Isw/libs/string_lib/inc)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pulp-platform/pulpino/issues/324?email_source=notifications&email_token=ANAORJPRVPQADJVD7L5IYFLQPVDCBA5CNFSM4JCYVEJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBZGAYI#issuecomment-544366689, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAORJJSAKRI6VZZ6YMGTATQPVDCBANCNFSM4JCYVEJQ .

sunil3690 commented 4 years ago

Thanks you so much it's working.

On Mon, Oct 21, 2019, 12:27 PM Sunil Rathod sunilrathod3690@gmail.com wrote:

Thank you very much for your reply I will try it

On Mon, Oct 21, 2019, 11:52 AM Ânderson Ignacio da Silva < notifications@github.com> wrote:

I guess you're not including this https://github.com/pulp-platform/pulpino/tree/master/sw/libs/string_lib/inc dir inside your toolchain rules... (pls check -Isw/libs/string_lib/inc)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pulp-platform/pulpino/issues/324?email_source=notifications&email_token=ANAORJPRVPQADJVD7L5IYFLQPVDCBA5CNFSM4JCYVEJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBZGAYI#issuecomment-544366689, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAORJJSAKRI6VZZ6YMGTATQPVDCBANCNFSM4JCYVEJQ .

aignacio commented 4 years ago

pls consider close the issue

sunil3690 commented 4 years ago

hi i am running pulpino on FPGA board selected as Zybo not externally connected.

set the environment variable BOARD. In the tcsh script file as steven BOARD "Zybo" also i did not specify the BOAD PART and BOARD NUMBER it will take default XILINX_PART "xc7z020clg484-1" XILINX_BOARD "em.avnet.com:zynq:zed:c" inside the environment variable set "RISCY_RV32F"

and set the vivado toolchain PATH and Xilinx SDK PATH as

export PATH=/root/pulpino/ri5cy_gnu_toolchain/install/bin:$PATH export LD_LIBRARY_PATH=/root/pulpino/Xilinx/Vivado/2019.1/lib/lnx64.o export PATH=/root/pulpino/Xilinx/Vivado/2019.1/bin:$PATH export PATH=/root/pulpino/Xilinx/SDK/2019.1/bin:$PATH export PATH=/root/pulpino/Xilinx/SDK/2019.1/gnu/microblaze/lin/bin:$PATH export PATH=/root/pulpino/Xilinx/SDK/2019.1/gnu/armr5/lin/gcc-arm-none-eabi/bin:$PATH export PATH=/root/pulpino/Xilinx/SDK/2019.1/gnu/microblaze/linux_toolchain/lin64_le/bin:$PATH export PATH=/root/pulpino/Xilinx/DocNav:$PATH

After this i type "make all" targated to "cmake_configure.riscvfloat.gcc.sh http://cmake_configure.riscvfloat.gcc.sh" in the fpga directory i am getting an error as root@sunil-Inspiron-3542:~/pulpino/fpga# make all make -C ips/xilinx_fp_fma/ clean all make[1]: Entering directory '/root/pulpino/fpga/ips/xilinx_fp_fma' rm -rf ip/ mkdir -p ip rm -rf xilinx_fp_fma.xpr rm -rf xilinx_fp_fma.hw rm -rf xilinx_fp_fma.data rm -rf xilinx_fp_fma.runs rm -rf xilinx_fp_fma.srcs rm -rf xilinx_fp_fma.cache rm -rf component.xml rm -rf vivado.jou rm -rf vivado.log rm -rf vivado.str rm -rf xgui vivado -mode batch -source tcl/run.tcl

** Vivado v2019.1 (64-bit) SW Build 2552052 on Fri May 24 14:47:09 MDT 2019 IP Build 2548770 on Fri May 24 18:01:18 MDT 2019 ** Copyright 1986-2019 Xilinx, Inc. All Rights Reserved.

source tcl/run.tcl

if { ![info exists ::env(XILINX_PART)] } {

set ::env(XILINX_PART) "xc7z020clg484-1"

}

if { ![info exists ::env(XILINX_BOARD)] } {

set ::env(XILINX_BOARD) "em.avnet.com:zynq:zed:c"

}

set partNumber $::env(XILINX_PART)

set boardName $::env(XILINX_BOARD)

create_project xilinx_fp_fma . -part $partNumber

ERROR: [Common 17-53] User Exception: Project already exists on disk, please use '-force' option to overwrite: /root/pulpino/fpga/ips/xilinx_fp_fma/xilinx_fp_fma.ip_user_files INFO: [Common 17-206] Exiting Vivado at Mon Oct 21 16:41:39 2019... Makefile:4: recipe for target 'all' failed make[1]: [all] Error 1 make[1]: Leaving directory '/root/pulpino/fpga/ips/xilinx_fp_fma' Makefile:33: recipe for target 'ips/xilinx_fp_fma/ip/xilinx_fp_fma.dcp' failed make: [ips/xilinx_fp_fma/ip/xilinx_fp_fma.dcp] Error 2

please let me know the issue. Thank you also please let know how to Prepare the SD card and the ZedBoard for booting via SD card and Extract the content of the rootfs.tar archive and put it on the second partition of the SD card

OR

it will enough to direct run the "Running applications on PULPino" please can help the issues Thank you

On Tue, Oct 22, 2019 at 1:06 PM Ânderson Ignacio da Silva < notifications@github.com> wrote:

pls consider close the issue

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pulp-platform/pulpino/issues/324?email_source=notifications&email_token=ANAORJLEDKAL4WAVXL6QWTTQP2UPJA5CNFSM4JCYVEJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB4ZYPY#issuecomment-544840767, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAORJLA7IH7FU5LCECMRKTQP2UPJANCNFSM4JCYVEJQ .

sunil3690 commented 4 years ago

i am unable to rectifying the following error please help issues please mention the steps regarding the solution

U-Boot 2015.01-dirty (Nov 13 2019 - 09:18:31)

Board: Xilinx Zynq I2C: ready DRAM: ECC disabled 512 MiB MMC: zynq_sdhci: 0 SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB In: serial Out: serial Err: serial Board: Xilinx Zynq Net: Gem.e000b000 Error: Gem.e000b000 address not set.

Hit any key to stop autoboot: 0 Device: zynq_sdhci Manufacturer ID: 27 OEM: 5048 Name: SD04G Tran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 3.7 GiB Bus Width: 4-bit reading uEnv.txt Unable to read file uEnv.txt Copying Linux from SD to RAM... reading uImage 3479944 bytes read in 335 ms (9.9 MiB/s) reading devicetree.dtb 10264 bytes read in 16 ms (626 KiB/s)

Booting kernel from Legacy Image at 02080000 ...

Image Name: Linux-3.18.0-xilinx Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3479880 Bytes = 3.3 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK

Flattened Device Tree blob at 02000000

Booting using the fdt blob at 0x2000000 Loading Kernel Image ... OK Loading Device Tree to 1ed1e000, end 1ed23817 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0 Linux version 3.18.0-xilinx (root@sunil-Inspiron-3542) (gcc version 4.9.1 (Sourcery CodeBench Lite 2014.11-30) ) #1 SMP PREEMPT Wed Nov 13 09:9 CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache Machine model: xlnx,zynq-7000 cma: Reserved 16 MiB at 0x1f000000 Memory policy: Data cache writealloc PERCPU: Embedded 10 pages/cpu @5efd1000 s8768 r8192 d24000 u40960 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 Kernel command line: console=ttyPS1,115200 ip=on root=/dev/mmcblk0p2 rw earlyprintk PID hash table entries: 2048 (order: 1, 8192 bytes) Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 496192K/524288K available (4695K kernel code, 241K rwdata, 1620K rodata, 216K init, 219K bss, 28096K reserved, 0K highmem) Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xffe00000 (2048 kB) vmalloc : 0x60800000 - 0xff000000 (2536 MB) lowmem : 0x40000000 - 0x60000000 ( 512 MB) pkmap : 0x3fe00000 - 0x40000000 ( 2 MB) modules : 0x3f000000 - 0x3fe00000 ( 14 MB) .text : 0x40008000 - 0x40633168 (6317 kB) .init : 0x40634000 - 0x4066a000 ( 216 kB) .data : 0x4066a000 - 0x406a67e0 ( 242 kB) .bss : 0x406a67e0 - 0x406dd738 ( 220 kB) Preemptible hierarchical RCU implementation. Dump stacks of tasks blocking RCU-preempt GP. RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2 NR_IRQS:16 nr_irqs:16 16 L2C-310 erratum 769419 enabled L2C-310 enabling early BRESP for Cortex-A9 L2C-310 full line of zeros enabled for Cortex-A9 L2C-310 ID prefetch enabled, offset 1 lines L2C-310 dynamic clock gating enabled, standby mode enabled L2C-310 cache controller enabled, 8 ways, 512 kB L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76360001 slcr mapped to 60804000 zynq_clock_init: clkc starts at 60804100 Zynq clock init sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 3298534883328ns timer #0 at 60806000, irq=43 Console: colour dummy device 80x30 Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) CPU: Testing write buffer coherency: ok CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 Setting up static identity map for 0x472838 - 0x472890 CPU1: Booted secondary processor CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 Brought up 2 CPUs SMP: Total of 2 processors activated. CPU: All CPU(s) started in SVC mode. devtmpfs: initialized VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 regulator-dummy: no parameters NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations cpuidle: using governor ladder cpuidle: using governor menu hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. hw-breakpoint: maximum watchpoint size is 4 bytes. zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x60880000 GPIO IRQ not connected XGpio: /amba_pl/gpio@51000000: registered, base is 874 GPIO IRQ not connected XGpio: /amba_pl/gpio@51000000: dual channel registered, base is 842 GPIO IRQ not connected XGpio: /amba_pl/gpio@51030000: registered, base is 810 GPIO IRQ not connected XGpio: /amba_pl/gpio@51020000: registered, base is 778 VCCPINT: 1000 mV vgaarb: loaded SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb media: Linux media interface: v0.10 Linux video capture interface: v2.00 pps_core: LinuxPPS API ver. 1 registered pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti < giometti@linux.it> PTP clock support registered EDAC MC: Ver: 3.0.0 Advanced Linux Sound Architecture Driver Initialized. Switched to clocksource arm_global_timer NET: Registered protocol family 2 TCP established hash table entries: 4096 (order: 2, 16384 bytes) TCP bind hash table entries: 4096 (order: 3, 32768 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP: reno registered UDP hash table entries: 256 (order: 1, 8192 bytes) UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) NET: Registered protocol family 1 RPC: Registered named UNIX socket transport module. RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available futex hash table entries: 512 (order: 3, 32768 bytes) jffs2: version 2.2. (NAND) (SUMMARY) �ک 2001-2006 Red Hat, Inc. fuse init (API version 7.23) msgmni has been set to 1001 io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330 dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16 xuartps e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 59, base_baud = 3125000) is a xuartps xuartps e0001000.serial: ttyPS1 at MMIO 0xe0001000 (irq = 82, base_baud = 3125000) is a xuartps console [ttyPS1] enabled xdevcfg f8007000.devcfg: ioremap 0xf8007000 to 6081e000 [drm] Initialized drm 1.1.0 20060810 brd: module loaded loop: module loaded CAN device driver interface e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k e1000e: Copyright(c) 1999 - 2014 Intel Corporation. libphy: XEMACPS mii bus: probed xemacps e000b000.ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54 ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci-pci: EHCI PCI platform driver ULPI transceiver vendor/product ID 0x0451/0x1507 Found TI TUSB1210 ULPI transceiver. ULPI integrity check: passed. zynq-ehci zynq-ehci.0: Xilinx Zynq USB EHCI Host Controller zynq-ehci zynq-ehci.0: new USB bus registered, assigned bus number 1 zynq-ehci zynq-ehci.0: irq 53, io mem 0x00000000 zynq-ehci zynq-ehci.0: USB 2.0 started, EHCI 1.00 hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected usbcore: registered new interface driver usb-storage mousedev: PS/2 mouse device common for all mice i2c /dev entries driver zynq-edac f8006000.memory-controller: ecc not enabled Xilinx Zynq CpuIdle Driver started sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman sdhci-pltfm: SDHCI platform and OF driver helper sdhci-arasan e0100000.sdhci: No vmmc regulator found sdhci-arasan e0100000.sdhci: No vqmmc regulator found mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA ledtrig-cpu: registered to indicate activity on CPUs usbcore: registered new interface driver usbhid usbhid: USB HID core driver TCP: cubic registered NET: Registered protocol family 17 can: controller area network core (rev 20120528 abi 9) NET: Registered protocol family 29

can: raw protocol (rev 20120528)

can: broadcast manager protocol (rev 20120528 t)

can: netlink gateway (rev 20130117) max_hops=1

Registering SWP/SWPB emulation handler

mmc0: new high speed SDHC card at address 0007 mmcblk0: mmc0:0007 SD04G 3.70 GiB mmcblk0: p1 p2 drivers/rtc/hctosys.c: unable to open rtc device (rtc0) Sending DHCP and RARP requests ...... timed out! IP-Config: Reopening network devices... Sending DHCP and RARP requests ...... timed out! IP-Config: Auto-configuration of network failed ALSA device list: No soundcards found. EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240) EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240) EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) VFS: Mounted root (ext4 filesystem) on device 179:2. devtmpfs: mounted Freeing unused kernel memory: 216K (40634000 - 4066a000) EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered Starting logging: OK Initializing random number generator... random: dd urandom read with 5 bits of entropy available done. Starting network... ip: RTNETLINK answers: File exists Starting sshd: OK

Welcome to Buildroot buildroot login: root # #

I am not able to login using buildroot Thanks Sunil

On Mon, Oct 21, 2019, 12:27 PM Sunil Rathod sunilrathod3690@gmail.com wrote:

Thank you very much for your reply I will try it

On Mon, Oct 21, 2019, 11:52 AM Ânderson Ignacio da Silva < notifications@github.com> wrote:

I guess you're not including this https://github.com/pulp-platform/pulpino/tree/master/sw/libs/string_lib/inc dir inside your toolchain rules... (pls check -Isw/libs/string_lib/inc)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pulp-platform/pulpino/issues/324?email_source=notifications&email_token=ANAORJPRVPQADJVD7L5IYFLQPVDCBA5CNFSM4JCYVEJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBZGAYI#issuecomment-544366689, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANAORJJSAKRI6VZZ6YMGTATQPVDCBANCNFSM4JCYVEJQ .