Tag Archives: Program life

Adding a reference in the system-user.dtsi file cannot modify the device tree file pl.dtsi

Project Scenario:
when creating a petalinux system using Xilinx’s petalinux tool, modify the device tree file pl.dtsi by adding a reference to the system-user.dtsi file


Problem description:
cannot modify pl.dtsi configuration through system-user.dtsi


/include/ "system-conf.dtsi"
/{
};
 
&amba_pl{
    axidma_chrdev: axidma_chrdev@0 {
            compatible = "xlnx,axidma-chrdev";
            dmas = <&axi_dma_0 0 &axi_dma_0 1>;
            dma-names = "tx_channel", "rx_channel";
    };
};
 
&axi_dma_0{
    dma-channel@40400000 {
        xlnx,device-id = <0x0>;
    };
    dma-channel@40400030 {
        xlnx,device-id = <0x1>;
    };
}

Reason analysis:
system-user. Dtsi file format error, space between dma and {!!!


Solutions:
modify the code format, create system.dtb, use the following statement to reverse generate DTS file, found that part of the pl configuration has been successfully modified!

dtc -I dtb -O dts -o system.dts system.dtb

Modified code:


/include/ "system-conf.dtsi"
/{
};
 
&amba_pl {
    axidma_chrdev: axidma_chrdev@0 {
            compatible = "xlnx,axidma-chrdev";
            dmas = <&axi_dma_0 0 &axi_dma_0 1>;
            dma-names = "tx_channel", "rx_channel";
    };
};
 
&axi_dma_0 {
    dma-channel@40400000 {
        xlnx,device-id = <0x0>;
    };
    dma-channel@40400030 {
        xlnx,device-id = <0x1>;
    };
}

Results in system. DTS:

Mac – build. Net development environment

1。安装openssl

brew update
brew install openssl

2. Install.net core SDK

sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib /usr/local/share/dotnet/shared/Microsoft.NETCore.App/1.0.2/System.Security.Cryptography.Native.dylib 

3. Go to install vs code
install c# extension: open vs code, press command+p and enter

ext install csharp

Test

4.

mkdir HelloWorld
cd HelloWorld
dotnet  new
dotnet restore
dotnet run

effect

Project HelloWorld (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling HelloWorld for .NETCoreApp,Version=v1.0

Compilation succeeded.
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:01.4283528


Hello World!

5. Open the newly created HelloWorld with vs code, install the plug-in according to the prompts, the final effect is

Updating C# dependencies...
Platform: darwin, x86_64

Downloading package 'OmniSharp for OSX' (24653 KB) .................... Done!
Downloading package '.NET Core Debugger (macOS/x64)' (43967 KB) .................... Done!

Installing package 'OmniSharp for OSX'
Installing package '.NET Core Debugger (macOS/x64)'

Finished
Failed to spawn 'dotnet --info'
Warning: project.json is no longer a supported project format for .NET Core applications. Update to the latest version of .NET Core (https://aka.ms/netcoredownload) and use 'dotnet migrate' to upgrade your project (see https://aka.ms/netcoremigrate for details).

resources http://www.cnblogs.com/gk0124/p/6066857.html

http://blog.csdn.net/x_studying/article/details/52730913