Giter Site home page Giter Site logo

Comments (4)

robertofem avatar robertofem commented on August 17, 2024

I think I do not understand exactly what you are asking. Steps for compiling and testing are explained in any baremetal example like this one https://github.com/robertofem/CycloneVSoC-examples/tree/master/Baremetal-applications/Second_counter_PMU.

To build you need to type make from the Intel EDS console (the one installed when you install the Intel EDS tools) located in the project forlder, so the Makefile executes. To test you have to build the SD card as explained in https://github.com/robertofem/CycloneVSoC-examples/tree/master/SD-baremetal

Regarding the last sentence. You can run the baremetal app from preloader and from u-boot(it needs preloader). You can choose. I explain the 2 methods in previous link. So technically u-boot is not needed because you can run the app from preloader. But preloader is always needed I think. How do you run the baremetal app without preloader?? I dont know.

Regards

from cyclonevsoc-examples.

LukeC8 avatar LukeC8 commented on August 17, 2024

Sorry, now I see that my comment was so confusing. I'll try to reformulate the question:

My goal is: I would like to write a makefile that can build the simple HelloWorld code above and generate a file named baremetal.bin to be loaded by u-boot or preloader. The process to generate/build the preloader and u-boot I already understand and we can ignore it (sorry, was what I meant by my last sentence). So, to achieve this goal, I started to read your makefiles, but some steps I did not understand. For example, the linker script used, why it was necessary? How did you realize it?

Thank you very much for helping.

from cyclonevsoc-examples.

robertofem avatar robertofem commented on August 17, 2024

I dont remember quite well the process I followed to generate the makefile. I think I copied the makefile from some DMA example I found in Altera website. Then I modified it to generate both the files for running with uboot and preloader.
Regarding the linker script, it is necessary to distribute the available memory into regions so the compiler is able to compile C language and C library. For example you need stack memory to enter in functions and be able to come back, you need heap memory for when you use dynamic memory, etc. If you program directly in assembler I dont think you need it. The linker script I also copied it from the Altera example. I dont understand it at all. The only thing I did is I think to modify the size of the different memory regions in the first lines of the file.

Thanks for checking my repo
Regards

from cyclonevsoc-examples.

LukeC8 avatar LukeC8 commented on August 17, 2024

Thank you for the information.

Regards

from cyclonevsoc-examples.

Related Issues (8)

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.