cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
eccol
Observer
Observer
2,403 Views
Registered: ‎06-26-2018

Petalinux 2018.2 build crash - xparameters.h cut off

Hi people,

 

I m following the "xilinx: ug1209 - Embedded design tutorial (July 31, 2018)."

 

I got to Chapter 6, in which 2 GPIOs and a timer are added into the PL of the Zynq Ultrascale+ MPSoC.

By the time I get to the building of petalinux (actually, quite in the end of the build process), the build crashes.

The log displays the following information:

NOTE: recipe fsbl-2018.2+gitAUTOINC+6e82c0183b-r0: task do_compile: Failed
ERROR: Task (/local-data/ecl2rng/PetaLinux/components/yocto/source/aarch64/layers/meta-xilinx-tools/recipes-bsp/fsbl/fsbl_git.bb:do_compile) failed with exit code '1'
ERROR: pmu-firmware-2018.2+gitAUTOINC+6e82c0183b-r0 do_compile: pmu-firmware compile failed.
ERROR: pmu-firmware-2018.2+gitAUTOINC+6e82c0183b-r0 do_compile: Function failed: do_compile (log file is located at /local-data/ecl2rng/workspace/xilinx-zcu102-zu9-es2-rev1.0-2018.2/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.2+gitAUTOINC+6e82c0183b-r0/temp/log.do_compile.16809)
ERROR: Logfile of failure stored in: /local-data/ecl2rng/workspace/xilinx-zcu102-zu9-es2-rev1.0-2018.2/build/tmp/work/zcu102_zynqmp-xilinx-linux/pmu-firmware/2018.2+gitAUTOINC+6e82c0183b-r0/temp/log.do_compile.16809
NOTE: recipe pmu-firmware-2018.2+gitAUTOINC+6e82c0183b-r0: task do_compile: Failed
ERROR: Task (/local-data/ecl2rng/PetaLinux/components/yocto/source/aarch64/layers/meta-xilinx-tools/recipes-bsp/pmu-firmware/pmu-firmware_git.bb:do_compile) failed with exit code '1'
NOTE: recipe linux-xlnx-4.14-xilinx-v2018.2+gitAUTOINC+ad4cd988ba-r0: task do_compile: Succeeded
NOTE: Tasks Summary: Attempted 3088 tasks of which 2255 didn't need to be rerun and 2 failed.
ERROR: Failed to build project

 

 

So... 2 tasks failed.

Interestingly enough, the system has an specific file in which it stores the information related to the failure, more specifically:

pmu-firmware/2018.2+gitAUTOINC+6e82c0183b-r0/temp/log.do_compile.16809

 

Opening this file, i can see the following:

make -C psu_pmu_0/libsrc/csudma_v1_2/src -s libs  "SHELL=/bin/sh" "COMPILER=mb-gcc" "ARCHIVER=mb-ar" "COMPILER_FLAGS=  -O2 -c -mcpu=v9.2 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mxl-soft-mul" "EXTRA_COMPILER_FLAGS=-ffunction-sections -fdata-sections -Wall -Wextra"
Compiling csudma
In file included from ../../../include/xil_printf.h:12:0,
                 from ../../../include/xil_io.h:65,
                 from xcsudma_hw.h:62,
                 from xcsudma.h:123,
                 from xcsudma_intr.c:55:
../../../include/xparameters.h:1:0: error: unterminated #ifndef
 #ifndef XPARAMETERS_H   /* prevent circular inclusions */

In file included from ../../../include/xil_cache.h:78:0,
                 from xcsudma.h:127,
                 from xcsudma_intr.c:55:
../../../include/xparameters.h:1:0: error: unterminated #ifndef
 #ifndef XPARAMETERS_H   /* prevent circular inclusions */

make[1]: *** [Makefile:25: xcsudma_intr.o] Error 1
In file included from ../../../include/xil_printf.h:12:0,
                 from ../../../include/xil_io.h:65,
                 from xcsudma_hw.h:62,
                 from xcsudma.h:123,
                 from xcsudma_selftest.c:55:
../../../include/xparameters.h:1:0: error: unterminated #ifndef
 #ifndef XPARAMETERS_H   /* prevent circular inclusions */

This is not the entire error message, it goes on for several pages, but all the problems seem to be derived from the fact that the xparameters.h file has a non-terminated #ifndef ...

And checking the xparameters.h file (in ./components/plnx_workspace/pmu-firmware/pmu- firmware_bsp/psu_pmu_0/include/xparameters.h), i can see that it was indeed chopped off (the #endif is missing).

#ifndef XPARAMETERS_H   /* prevent circular inclusions */
#define XPARAMETERS_H   /* by using protection macros */


/* Definitions for PMU Microblaze */
#define XPAR_MICROBLAZE_ADDR_TAG_BITS 0
#define XPAR_MICROBLAZE_ALLOW_DCACHE_WR 1
#define XPAR_MICROBLAZE_ALLOW_ICACHE_WR 1
#define XPAR_MICROBLAZE_ASYNC_INTERRUPT 1
#define XPAR_MICROBLAZE_BASE_VECTORS 0xffd00000
#define XPAR_MICROBLAZE_BRANCH_TARGET_CACHE_SIZE 0
#define XPAR_MICROBLAZE_CACHE_BYTE_SIZE 8192
#define XPAR_MICROBLAZE_DATA_SIZE 32
#define XPAR_MICROBLAZE_DCACHE_ADDR_TAG 0
#define XPAR_MICROBLAZE_DCACHE_ALWAYS_USED 0
#define XPAR_MICROBLAZE_DCACHE_BASEADDR 0x00000000
#define XPAR_MICROBLAZE_DCACHE_BYTE_SIZE 8192
#define XPAR_MICROBLAZE_DCACHE_DATA_WIDTH 0
#define XPAR_MICROBLAZE_DCACHE_FORCE_TAG_LUTRAM 0
#define XPAR_MICROBLAZE_DCACHE_HIGHADDR 0x3FFFFFFF
#define XPAR_MICROBLAZE_DCACHE_LINE_LEN 4
#define XPAR_MICROBLAZE_DCACHE_USE_WRITEBACK 0
#define XPAR_MICROBLAZE_DCACHE_VICTIMS 0
#define XPAR_MICROBLAZE_DDR_RESERVE_EA 0x7FFFFFFF
#define XPAR_MICROBLAZE_DDR_RESERVE_SA 0x7FF00000
#define XPAR_MICROBLAZE_DEBUG_ENABLED 1
#define XPAR_MICROBLAZE_DIV_ZERO_EXCEPTION 0
#define XPAR_MICROBLAZE_DYNAMIC_BUS_SIZING 0
#define XPAR_MICROBLAZE_ECC_USE_CE_EXCEPTION 0
#define XPAR_MICROBLAZE_EDGE_IS_POSITIVE 0
#define XPAR_MICROBLAZE_ENABLE_DISCRETE_PORTS 1
#define XPAR_MICROBLAZE_ENDIANNESS 1
#define XPAR_MICROBLAZE_FAULT_TOLERANT 1
#define XPAR_MICROBLAZE_FPU_EXCEPTION 0
#define XPAR_MICROBLAZE_FREQ 180000000
#define XPAR_MICROBLAZE_FSL_EXCEPTION 0
#define XPAR_MICROBLAZE_FSL_LINKS 0
#define XPAR_MICROBLAZE_ICACHE_ALWAYS_USED 0
#define XPAR_MICROBLAZE_ICACHE_BASEADDR 0x00000000
#define XPAR_MICROBLAZE_ICACHE_DATA_WIDTH 0
#define XPAR_MICROBLAZE_ICACHE_FORCE_TAG_LUTRAM 0
#define XPAR_MICROBLAZE_ICACHE_HIGHADDR 0x3FFFFFFF
#define XPAR_MICROBLAZE_ICACHE_LINE_LEN 4
#define XPAR_MICROBLAZE_ICACHE_STREAMS 0
#define XPAR_MICROBLAZE_ICACHE_VICTIMS 0
#define XPAR_MICROBLAZE_ILL_OPCODE_EXCEPTION 1
#define XPAR_MICROBLAZE_INTERRUPT_IS_EDGE 0
#define XPAR_MICROBLAZE_LOCKSTEP_SELECT 0
#define XPAR_MICROBLAZE_LOCKSTEP_SLAVE 0
#define XPAR_MICROBLAZE_MMU_DTLB_SIZE 4
#define XPAR_MICROBLAZE_MMU_ITLB_SIZE 2
#define XPAR_MICROBLAZE_MMU_PRIVILEGED_INSTR 0
#define XPAR_MICROBLAZE_MMU_TLB_ACCESS 3
#define XPAR_MICROBLAZE_MMU_ZONES 16
#define XPAR_MICROBLAZE_NUMBER_OF_PC_BRK 1
#define XPAR_MICROBLAZE_NUMBER_OF_RD_ADDR_BRK 1
#define XPAR_MICROBLAZE_NUMBER_OF_WR_ADDR_BRK 1
#define XPAR_MICROBLAZE_OPCODE_0X0_ILLEGAL 1
#define XPAR_MICROBLAZE_PC_WIDTH 32
#define XPAR_MICROBLAZE_PSU_DEVICE PSSa
#define XPAR_MICROBLAZE_PSU_EP 1
#define XPAR_MICROBLAZE_PVR 0
#define XPAR_MICROBLAZE_PVR_USER1 0x00
#define XPAR_MICROBLAZE_PVR_USER2 0x00000000
#define XPAR_MICROBLAZE_RESET_MSR 0x00000000
#define XPAR_MICROBLAZE_SCO 0
#define XPAR_MICROBLAZE_TRACE 1
#define XPAR_MICROBLAZE_UNALIGNED_EXCEPTIONS 1
#define XPAR_MICROBLAZE_USE_BARREL 1
#define XPAR_MICROBLAZE_USE_BRANCH_TARGET_CACHE 0
#define XPAR_MICROBLAZE_USE_CONFIG_RESET 0
#define XPAR_MICROBLAZE_USE_DCACHE 0
#define XPAR_MICROBLAZE_USE_DIV 0
#define XPAR_MICROBLAZE_USE_EXTENDED_FSL_INSTR 0
#define XPAR_MICROBLAZE_USE_EXT_BRK 0
#define XPAR_MICROBLAZE_USE_EXT_NM_BRK 0
#define XPAR_MICROBLAZE_USE_FPU 0
#define XPAR_MICROBLAZE_USE_HW_MUL 0
#define XPAR_MICROBLAZE_USE_ICACHE 0
#define XPAR_MICROBLAZE_USE_INTERRUPT 1
#define XPAR_MICROBLAZE_USE_MMU 0
#define XPAR_MICROBLAZE_USE_MSR_INSTR 1
#define XPAR_MICROBLAZE_USE_PCMP_INSTR 1
#define XPAR_MICROBLAZE_USE_REORDER_INSTR 1
#define XPAR_MICROBLAZE_USE_STACK_PROTECTION 1
#define XPAR_MICROBLAZE_G_USE_EXCEPTIONS 1
#define XPAR_MICROBLAZE_IS_CACHE_COHERENT 0
#define XPAR_MICROBLAZE_PMU_BOARD_INTERFACE custom

/******************************************************************/

#define XPAR_CPU_CORE_CLOCK_FREQ_HZ XPAR_MICROBLAZE_FREQ

/******************************************************************/


#define XPAR_PSU_PSS_REF_CLK_FREQ_HZ 33330000U

#define PSU_PMU 1U
#define XPS_BOARD_ZCU102


/* Number of Fabric Resets */
#define XPAR_NUM_FABRIC_RESETS 1

#define STDIN_BASEADDRESS 0xFF000000
#define STDOUT_BASEADDRESS 0xFF000000

/******************************************************************/

/* Platform specific definitions */
 
/* Definitions for sleep timer configuration */

The portion of the xparameters.h showed above actually matches the xparameters.h file that I have in an SDK project containing the PMU BSP... but somehow the rest of the file was chopped off.

I d appreciate any tips on what could have gone wrong...

 

8 Replies
stephenm
Moderator
Moderator
2,328 Views
Registered: ‎09-12-2007

the xparameters.h is generated during the bsp creation. Each driver has a tcl file that will populate the xparameters.h. Open file, populate, close file. It could be that one driver tcl is hanging, and thus not closing and manifesting it what you are seeing.

Do you see the same issue if you do a
petalinux-build -c pmufw

This would reduce the tasks in bitbake, that could be causing an issue.

Also, can you try create a workspace in SDK with the HDF used in petalinux and create the PMUFW here?

harvinderdabas
Observer
Observer
2,287 Views
Registered: ‎07-06-2018

 
0 Kudos
Reply
harvinderdabas
Observer
Observer
2,276 Views
Registered: ‎07-06-2018

 
0 Kudos
Reply
shabbirk
Moderator
Moderator
2,249 Views
Registered: ‎12-04-2016

Hi @harvinderdabas

 

Can you please share your HDF that is causing this compilation error? Let me try to reproduce this at my end to further debug

 

 

Best Regards

Shabbir

0 Kudos
Reply
shabbirk
Moderator
Moderator
2,245 Views
Registered: ‎12-04-2016

Hi @harvinderdabas

 

Also, can you please try making these changes and rebuild?

mkdir project-spec/meta-user/recipes-bsp/pmu/

vi project-spec/meta-user/recipes-bsp/pmu/pmu-firmware_%.bbappend

YAML_SERIAL_CONSOLE_STDOUT = "psu_uart_1"

YAML_SERIAL_CONSOLE_STDIN = "psu_uart_1"

 

 

0 Kudos
Reply
shabbirk
Moderator
Moderator
2,232 Views
Registered: ‎12-04-2016

Hi @harvinderdabas

Follow this below template flow instead of BSP flow

petalinux-create --type project --template zynqMP --name test
cd test
petalinux-config --get-hw-description=../HW_DIR (PATH to your HDF)
petalinux-build

This worked at my end with your HDF and no build errors observed. Give a try at your end and let me know


0 Kudos
Reply
mubinusm
Xilinx Employee
Xilinx Employee
1,914 Views
Registered: ‎09-02-2018

Hi @harvinderdabas,

 

sw_standalone_v6_7::generate : ERROR: psu_cortexa53 does not support axi_timer_0

 

Error specified above would be invoked, only if BSP setting is updated to set the value of "sleep_timer" parameter to the "axi_timer".  By default value of "sleep_timer" parameter will be "none". are you changing the BSP settings for "sleep_timer"?. 

I am able to build the fsbl application through SDK flow with edt_zcu102_wrapper.hdf in ug1209 tutorial.

 

Thanks,

Mubin

0 Kudos
Reply
creep007
Newbie
Newbie
1,854 Views
Registered: ‎09-10-2018

Hi,

        I met the same problem. While testing UG1209 design1 using SDK2018.2, Petalinux 2018.2 build crash due to xparameters.h cut off.

        I also tried the template way like this below.

petalinux-create --type project --template zynqMP --name test
cd test
petalinux-config --get-hw-description=../HW_DIR (PATH to your HDF)
petalinux-build

       The build succeed. I got BOOT.bin and image.ub. I compared my images with the prebuilt_image in ug1209 design1. My image.ub is only 13MB while the prebuilt image.ub is 84MB. When I tried to boot zcu102 with SD card using my two images, the linux kernel hang like this. Can you help to see what happened?

Xilinx Zynq MP First Stage Boot Loader 
Release 2018.2   Sep 10 2018  -  17:04:46
NOTICE:  ATF running on XCZU9EG/silicon v4/RTL5.1 at 0xfffea000
NOTICE:  BL31: Secure code at 0x0
NOTICE:  BL31: Non secure code at 0x8000000
NOTICE:  BL31: v1.4(release):xilinx-v2018.1-4-g93a69a5a
NOTICE:  BL31: Built : 09:02:07, Sep 10 2018
PMUFW:  v1.0


U-Boot 2018.01 (Sep 10 2018 - 17:02:50 +0800) Xilinx ZynqMP ZCU102 rev1.0

I2C:   ready
DRAM:  1.7 GiB
usb dr_mode not found
EL Level:       EL2
Chip ID:        zu9eg
MMC:   sdhci@ff170000: 0 (SD)
SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
*** Warning - bad CRC, using default environment

In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Board: Xilinx ZynqMP
Bootmode: LVL_SHFT_SD_MODE1
Net:   ZYNQ GEM: ff0e0000, phyaddr ffffffff, interface rgmii-id
eth0: ethernet@ff0e0000
U-BOOT for xilinx-zcu102-2018.2

ethernet@ff0e0000 Waiting for PHY auto negotiation to complete......................................... TIMEOUT !
Hit any key to stop autoboot:  0 
Device: sdhci@ff170000
Manufacturer ID: 9f
OEM: 5449
Name: SD8GB 
Tran Speed: 25000000
Rd Block Len: 512
SD version 1.0
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
13404700 bytes read in 1213 ms (10.5 MiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'kernel@1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x10000104
     Data Size:    6960366 Bytes = 6.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
     Hash algo:    sha1
     Hash value:   cee1447c3c906ed4ddaecbae9566eef930c3a261
   Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'ramdisk@1' ramdisk subimage
     Description:  petalinux-user-image
     Type:         RAMDisk Image
     Compression:  gzip compressed
     Data Start:   0x106ab82c
     Data Size:    6409311 Bytes = 6.1 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha1
     Hash value:   e3876e935b2640ef34c9d172ed7b3fe01dc7f2c1
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@system-top.dtb' configuration
   Trying 'fdt@system-top.dtb' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x106a36f8
     Data Size:    32879 Bytes = 32.1 KiB
     Architecture: AArch64
     Hash algo:    sha1
     Hash value:   5961a6b13995aa0129a3f18501e16dcf417787d4
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x106a36f8
   Uncompressing Kernel Image ... OK
   Loading Ramdisk to 079e3000, end 07fffc5f ... OK
   Loading Device Tree to 00000000079d7000, end 00000000079e206e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.0-xilinx-v2018.2 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP Mon Sep 10 17:06:06 CST 2018
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] Machine model: xlnx,zynqmp
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000005d400000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] percpu: Embedded 21 pages/cpu @ffffffc06ff76000 s46488 r8192 d31336 u86016
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 441984
[    0.000000] Kernel command line: earlycon clk_ignore_unused
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Memory: 1475736K/1793024K available (9980K kernel code, 644K rwdata, 3128K rodata, 512K init, 2168K bss, 55144K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a40000   (  9984 KB)
[    0.000000]     .rodata : 0xffffff8008a40000 - 0xffffff8008d60000   (  3200 KB)
[    0.000000]       .init : 0xffffff8008d60000 - 0xffffff8008de0000   (   512 KB)
[    0.000000]       .data : 0xffffff8008de0000 - 0xffffff8008e81200   (   645 KB)
[    0.000000]        .bss : 0xffffff8008e81200 - 0xffffff800909f2b0   (  2169 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf01880000   (    24 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc070000000   (  1792 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU event tracing is enabled.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arch_timer: cp15 timer(s) running at 99.99MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x170f8dc196, max_idle_ns: 440795203664 ns
[    0.000003] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511099ns
[    0.008249] Console: colour dummy device 80x25
[    0.012507] console [tty0] enabled
[    0.015874] bootconsole [cdns0] disabled
0 Kudos
Reply