How to build the C simulator of rocket chip - riscv

I get the following error when build the C simulator:
~/rocket-chip/emulator$ make
make: *** No rule to make target /home/rocket-chip/emulator/generated-src/Top.DefaultConfig.prm, needed by /home/rocket-chip/emulator/generated-src/consts.DefaultConfig.h. Stop.

As described in the Rocket Chip README.md, you need to update submodules after cloning the repo:
cd /home/rocket-chip
git submodule update --init --recursive
After this completes, the C emulator should build. Note that you must have the RISC-V tools installed as well; follow the steps in README.md for details.

Related

ESP32: gn.py: Could not find checkout in any parent of the current path. This must be run inside a checkout

complying an ESP32 project using the MATTER protocol from the github project: Connectedhomeip (https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/esp32)
im using ubuntu 20.02, tried using python 3.8 and 3.9 no difference to error.
i followed the following instructions from the above link, the instruction as pasted below
Building the Example Application
Building the example application requires the use of the Espressif ESP32 IoT Development Framework and the xtensa-esp32-elf toolchain for ESP32 modules or the riscv-esp32-elf toolchain for ESP32C3 modules.
The VSCode devcontainer has these components pre-installed, so you can skip this step. To install these components manually, follow these steps:
Clone the Espressif ESP-IDF and checkout v4.4 release
$ mkdir ${HOME}/tools
$ cd ${HOME}/tools
$ git clone https://github.com/espressif/esp-idf.git
$ cd esp-idf
$ git checkout v4.4
$ git submodule update --init
$ ./install.sh
Install ninja-build
$ sudo apt-get install ninja-build
Currently building in VSCode and deploying from native is not supported, so make sure the IDF_PATH has been exported(See the manual setup steps above).
Setting up the environment
$ cd ${HOME}/tools/esp-idf
$ ./install.sh
$ . ./export.sh
$ cd {path-to-connectedhomeip}
To download and install packages.
$ source ./scripts/bootstrap.sh
$ source ./scripts/activate.sh
If packages are already installed then simply activate them.
$ source ./scripts/activate.sh
Target Set
To set IDF target, run set-target with one of the commands.
$ idf.py set-target esp32
$ idf.py set-target esp32c3
Configuration Options
To build the default configuration (sdkconfig.defaults) skip to building the demo application.
To build a specific configuration (as an example m5stack):
$ rm sdkconfig
$ idf.py -D 'SDKCONFIG_DEFAULTS=sdkconfig_m5stack.defaults' build
Note: If using a specific device configuration, it is highly recommended to
start off with one of the defaults and customize on top of that. Certain
configurations have different constraints that are customized within the
device specific configuration (eg: main app stack size).
To customize the configuration, run menuconfig.
$ idf.py menuconfig
Select ESP32 based Device Type through Demo->Device Type. The device types that are currently supported include ESP32-DevKitC (default), ESP32-WROVER-KIT_V4.1, M5Stack and ESP32C3-DevKitM.
To build the demo application.
$ idf.py build
After building the application, to flash it outside of VSCode, connect your device via USB. Then run the following command to flash the demo application onto the device and then monitor its output. If necessary, replace /dev/tty.SLAB_USBtoUART(MacOS) with the correct USB device name for your system(like /dev/ttyUSB0 on Linux). Note that sometimes you might have to press and hold the boot button on the device while it's trying to connect before flashing. For ESP32-DevKitC devices this is labeled in the functional description diagram.
$ idf.py -p /dev/tty.SLAB_USBtoUART flash monitor
When use >>idf.py to build the project i get the follow error
>>idf.py build
Executing action: all (aliases: build)
Running ninja in directory /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build
Executing "ninja all"...
ninja: warning: bad deps log signature or version; starting over
[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32
-- Found Python3: /home/csir/.espressif/python_env/idf5.0_py3.8_env/bin/python3.8 (found version "3.8.10") found components: Interpreter
-- Project sdkconfig file /home/csir/connectedhomeip/examples/all-clusters-app/esp32/sdkconfig
Loading defaults file /home/csir/connectedhomeip/examples/all-clusters-app/esp32/sdkconfig.defaults...
-- App "chip-all-clusters-app" version: TE8/rc2-7-gf32685f35-dirty
-- Adding linker script /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_system/ld/esp32/sections.ld.in
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script /home/csir/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Components: QRCode app_trace app_update asio bootloader bootloader_support bt chip cmock coap console cxx driver efuse esp-tls esp32 esp32_mbedtls esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_hw_support esp_lcd esp_local_ctrl esp_netif esp_phy esp_pm esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py fatfs freemodbus freertos hal heap http_parser idf_test ieee802154 iperf json led_strip log lwip main mbedtls mdns mqtt newlib nvs_flash openssl openthread partition_table pcap perfmon pid_ctrl protobuf-c protocol_examples_common protocomm pthread qrcode screen-framework sdmmc soc spi_flash spidriver spiffs tcp_transport tcpip_adapter tft tinyusb ulp unity usb vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: /home/csir/connectedhomeip/examples/common/QRCode /home/csir/esp/esp-idf/components/app_trace /home/csir/esp/esp-idf/components/app_update /home/csir/esp/esp-idf/components/asio /home/csir/esp/esp-idf/components/bootloader /home/csir/esp/esp-idf/components/bootloader_support /home/csir/esp/esp-idf/components/bt /home/csir/connectedhomeip/examples/all-clusters-app/esp32/third_party/connectedhomeip/config/esp32/components/chip /home/csir/esp/esp-idf/components/cmock /home/csir/esp/esp-idf/components/coap /home/csir/esp/esp-idf/components/console /home/csir/esp/esp-idf/components/cxx /home/csir/esp/esp-idf/components/driver /home/csir/esp/esp-idf/components/efuse /home/csir/esp/esp-idf/components/esp-tls /home/csir/esp/esp-idf/components/esp32 /home/csir/connectedhomeip/examples/all-clusters-app/esp32/third_party/connectedhomeip/config/esp32/components/esp32_mbedtls /home/csir/esp/esp-idf/components/esp_adc_cal /home/csir/esp/esp-idf/components/esp_common /home/csir/esp/esp-idf/components/esp_eth /home/csir/esp/esp-idf/components/esp_event /home/csir/esp/esp-idf/components/esp_gdbstub /home/csir/esp/esp-idf/components/esp_hid /home/csir/esp/esp-idf/components/esp_http_client /home/csir/esp/esp-idf/components/esp_http_server /home/csir/esp/esp-idf/components/esp_https_ota /home/csir/esp/esp-idf/components/esp_https_server /home/csir/esp/esp-idf/components/esp_hw_support /home/csir/esp/esp-idf/components/esp_lcd /home/csir/esp/esp-idf/components/esp_local_ctrl /home/csir/esp/esp-idf/components/esp_netif /home/csir/esp/esp-idf/components/esp_phy /home/csir/esp/esp-idf/components/esp_pm /home/csir/esp/esp-idf/components/esp_ringbuf /home/csir/esp/esp-idf/components/esp_rom /home/csir/esp/esp-idf/components/esp_serial_slave_link /home/csir/esp/esp-idf/components/esp_system /home/csir/esp/esp-idf/components/esp_timer /home/csir/esp/esp-idf/components/esp_websocket_client /home/csir/esp/esp-idf/components/esp_wifi /home/csir/esp/esp-idf/components/espcoredump /home/csir/esp/esp-idf/components/esptool_py /home/csir/esp/esp-idf/components/fatfs /home/csir/esp/esp-idf/components/freemodbus /home/csir/esp/esp-idf/components/freertos /home/csir/esp/esp-idf/components/hal /home/csir/esp/esp-idf/components/heap /home/csir/esp/esp-idf/components/http_parser /home/csir/esp/esp-idf/components/idf_test /home/csir/esp/esp-idf/components/ieee802154 /home/csir/esp/esp-idf/examples/common_components/iperf /home/csir/esp/esp-idf/components/json /home/csir/esp/esp-idf/examples/common_components/led_strip /home/csir/esp/esp-idf/components/log /home/csir/esp/esp-idf/components/lwip /home/csir/connectedhomeip/examples/all-clusters-app/esp32/main /home/csir/esp/esp-idf/components/mbedtls /home/csir/esp/esp-idf/components/mdns /home/csir/esp/esp-idf/components/mqtt /home/csir/esp/esp-idf/components/newlib /home/csir/esp/esp-idf/components/nvs_flash /home/csir/esp/esp-idf/components/openssl /home/csir/esp/esp-idf/components/openthread /home/csir/esp/esp-idf/components/partition_table /home/csir/esp/esp-idf/examples/common_components/pcap /home/csir/esp/esp-idf/components/perfmon /home/csir/esp/esp-idf/examples/common_components/pid_ctrl /home/csir/esp/esp-idf/components/protobuf-c /home/csir/esp/esp-idf/examples/common_components/protocol_examples_common /home/csir/esp/esp-idf/components/protocomm /home/csir/esp/esp-idf/components/pthread /home/csir/esp/esp-idf/examples/common_components/qrcode /home/csir/connectedhomeip/examples/common/screen-framework /home/csir/esp/esp-idf/components/sdmmc /home/csir/esp/esp-idf/components/soc /home/csir/esp/esp-idf/components/spi_flash /home/csir/connectedhomeip/examples/common/m5stack-tft/repo/components/spidriver /home/csir/esp/esp-idf/components/spiffs /home/csir/esp/esp-idf/components/tcp_transport /home/csir/esp/esp-idf/components/tcpip_adapter /home/csir/connectedhomeip/examples/common/m5stack-tft/repo/components/tft /home/csir/esp/esp-idf/components/tinyusb /home/csir/esp/esp-idf/components/ulp /home/csir/esp/esp-idf/components/unity /home/csir/esp/esp-idf/components/usb /home/csir/esp/esp-idf/components/vfs /home/csir/esp/esp-idf/components/wear_levelling /home/csir/esp/esp-idf/components/wifi_provisioning /home/csir/esp/esp-idf/components/wpa_supplicant /home/csir/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build
[7/1126] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
otadata,data,ota,0xf000,8K,
phy_init,data,phy,0x11000,4K,
ota_0,app,ota_0,0x20000,1500K,
ota_1,app,ota_1,0x1a0000,1500K,
ot_storage,data,58,0x317000,8K,
*******************************************************************************
[261/1126] Performing configure step for 'bootloader'
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/csir/connectedhomeip/examples/all-clusters-app/esp32/sdkconfig
-- Adding linker script /home/csir/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/csir/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/csir/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script /home/csir/esp/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: /home/csir/esp/esp-idf/components/bootloader /home/csir/esp/esp-idf/components/bootloader_support /home/csir/esp/esp-idf/components/efuse /home/csir/esp/esp-idf/components/esp32 /home/csir/esp/esp-idf/components/esp_common /home/csir/esp/esp-idf/components/esp_hw_support /home/csir/esp/esp-idf/components/esp_rom /home/csir/esp/esp-idf/components/esp_system /home/csir/esp/esp-idf/components/esptool_py /home/csir/esp/esp-idf/components/freertos /home/csir/esp/esp-idf/components/hal /home/csir/esp/esp-idf/components/log /home/csir/esp/esp-idf/components/bootloader/subproject/main /home/csir/esp/esp-idf/components/bootloader/subproject/components/micro-ecc /home/csir/esp/esp-idf/components/newlib /home/csir/esp/esp-idf/components/partition_table /home/csir/esp/esp-idf/components/soc /home/csir/esp/esp-idf/components/spi_flash /home/csir/esp/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build/bootloader
[270/1126] Performing build step for 'bootloader'
[1/1] cd /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build/bootloader/esp-idf/esptool_py && /home/csir/.espressif/python_env/idf5.0_py3.8_env/bin/python /home/csir/esp/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build/bootloader/bootloader.bin
Bootloader binary size 0x6360 bytes. 0xca0 bytes (11%) free.
[585/1125] Performing configure step for 'chip_gn'
FAILED: esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-configure
cd /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build/esp-idf/chip && /home/csir/depot_tools/gn --root=/home/csir/connectedhomeip/config/esp32 gen --check --fail-on-unused-args /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build/esp-idf/chip && /usr/bin/cmake -E touch /home/csir/connectedhomeip/examples/all-clusters-app/esp32/build/esp-idf/chip/chip_gn-prefix/src/chip_gn-stamp/chip_gn-configure
gn.py: Could not find checkout in any parent of the current path.
This must be run inside a checkout.
[586/1125] Building C object esp-idf/esp_serial_slave_link/CMakeFiles/__idf_esp_serial_slave_link.dir/essl_spi.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
I can see that the problem is in the file ~/depot_tools/gn.py
with the line 50: bin_path = gclient_paths.GetBuildtoolsPlatformBinaryPath()
gclient_paths.GetBuildtoolsPlatformBinaryPath() returns "none"
what should the value be?
Some hours ago I had exactly the same problem.
In my case, I didn't run $ source ./scripts/bootstrap.sh because I didn't worked, but I clone the whole git again in my home folder, lauched the command and (after almost an hour) run idf.py set-target esp32 and idf.py build and it finally worked.
I followed more or less the following steps from this issue in Matter repo and it helped a lot:
https://github.com/project-chip/connectedhomeip/issues/15562#issuecomment-1057750597
Hope this works for you!

How do I run a project's example using Cargo?

I'm trying to run the example code from this project. Following the instructions on the Cargo docs, I did the following:
git clone https://github.com/basiliscos/rust-procol-ftp-client
cd rust-procol-ftp-client
cargo run
cargo test
cargo test should also have compiled the example according to the Rust docs.
Although cargo test executes successfully, when I change into the target/debug directory, I don't find an executable for ftp-get (which is the example code). The target/debug/examples directory is also empty.
What is the best way to go about running this example?
You can run a specific example with:
cargo run --example name_of_example
where name_of_example is the base filename (without .rs)
or to run it in release mode:
cargo run --release --example name_of_example
To pass arguments to the example:
cargo run --example name_of_example -- arguments go here
cargo run will automatically build (or rebuild) the program first if it's out of date.
Try the following:
cd rust-procol-ftp-client
cargo build --examples
./target/debug/examples/ftp-get

why fabric release 1.1.0 could not make?

From fabric makefile ,I wanna compile the orderer and peer ,It throws the error
friendsdeMacBook-Pro:fabric friends$ make orderer
make: *** No rule to make target `build/bin/orderer', needed by `orderer'. Stop.
friendsdeMacBook-Pro:fabric friends$
I changed the official makefile a little, my changed Makefile file:
changed Makefile
After taking a git clone of https://github.com/hyperledger/fabric check which branch or tag you are in before invoking make commands.
$ git clone of https://github.com/hyperledger/fabric
$ git checkout v1.1.0
$ make release

eBPF (bcc) on centos

It's possible deploy bcc --> https://iovisor.github.io/bcc/
... on centos /redhat SO?
someone knows what's the problem to compile bcc tools from centos? (all dependencies are installed), but when I execute the last step:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
Returns:
[root#ebpf build]# cmake -DCMAKE_INSTALL_PREFIX=/usr ..
-- Latest recognized Git tag is v0.3.0
-- Git HEAD is 007d28c534e1a98e6017ac9f4c8cb1c0f5244388
-- Revision is 0.3.0-007d28c5 CMake Error at CMakeLists.txt:22 (find_package): Could not find a package configuration file provided
by "LLVM" with any of the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If
"LLVM" provides a separate development package or SDK, be sure it
has been installed.
-- Configuring incomplete, errors occurred! See also "/root/bcc/build/CMakeFiles/CMakeOutput.log".
for llvm issue. just run below CLI:
cp /usr/share/llvm/cmake/LLVM-Config.cmake /usr/share/llvm/cmake/llvm-config.cmake

Makefile.inc: No such file or directory

I don't have much experience with makefiles, but I am trying to compile and run the program "hdf5ToMds.c" found on this Github repository: https://github.com/MDSplus/mdsplus/tree/alpha/hdf5
My steps towards using the Makefile.in in the folder were as follows:
autoscan
mv configure.scan configure.ac
aclocal
autoheader
autoconf
./configure
make
Now when I run the make I get the error:
Makefile:1: Makefile.inc: No such file or directory
make: *** No rule to make target 'Makefile.inc'. Stop.
Am I missing something obvious? I'm not very familiar with this whole process of getting the code from Github and having to make it. I do have the entire repository cloned, just in case that's relevant.

Resources