Giter Site home page Giter Site logo

How to Compile A Program ? about cynq HOT 5 CLOSED

IBNU1 avatar IBNU1 commented on May 24, 2024
How to Compile A Program ?

from cynq.

Comments (5)

IBNU1 avatar IBNU1 commented on May 24, 2024 2

Thanks so much, got it working.

from cynq.

lleon95 avatar lleon95 commented on May 24, 2024 1

Alright,

Are you compiling it using?

g++ -o test test.cpp `pkg-config --cflags --libs cynq`

the pkg-config --cflags --libs cynq captures all the flags required for linking. It usually adds: -lcynq

from cynq.

lleon95 avatar lleon95 commented on May 24, 2024

Hi @IBNU1

Can you share the steps you have followed to reproduce the issue?

Cheers,
Leon

from cynq.

IBNU1 avatar IBNU1 commented on May 24, 2024

Sure @lleon95 , I followed the standard installation instructions and ran the example program from the buildir which ran fan. Then in a seperate directory under root I typed up this code to use my own IP. All of this was being done on a Kria Kv260 board.


`#include <cynq/cynq.hpp>
#include <cstdint>
#include <cynq/accelerator.hpp>
#include <cynq/datamover.hpp>
#include <cynq/hardware.hpp>
#include <cynq/memory.hpp>
#include <iostream>
#include <memory>
#include <string>


// Configure the FPGA
int main(){
using namespace cynq;
auto kArch = HardwareArchitecture::UltraScale;
auto platform = IHardware::Create(kArch, "euler_test.bit");
int x1 = 1;
int y1 = 2;
int x2 = 4;
int y2 = 5;
// Extract the accelerator (IP Core) and DMA
// Addresses are given by the design
const uint64_t accel_addr = 0xb0000000; //get this value from the the Vivado program
auto accel = platform->GetAccelerator(accel_addr);
int test_output = 0;
printf("The Value of the output data is %d",test_output);
return 0;
}
`

I then tried to compile this code by entering GCC test.cpp and it returned me the above error.

from cynq.

lleon95 avatar lleon95 commented on May 24, 2024

Perfect :) Glad it worked.

from cynq.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.