Forum Discussion

MF28's avatar
MF28
Icon for New Contributor rankNew Contributor
4 years ago

Using SoC Interrupts, Timer, ... MakeFile Error / Question

Hello!

I am trying to use the interrupts from FPGA to HPS (for example with the buttons of the Cyclone V Board etc).

At first I was not able to get the compilation with the makefile to work, since I forgot, that I would need to compile the .c files of the .h files (alt_interrupt.h, ...) as well.

I dont know how to write the makefile in order to automatically take the .c files from the direction where the SoC Embedded is installed.
So instead I copied all the necessary C files to my project folder.
When I now execute the makefile, it throws the error:

C:\intelFPGA_lite\18.1\embedded\host_tools\cygwin\tmp\ccqTRJ6G.s: Assembler messages:
C:\intelFPGA_lite\18.1\embedded\host_tools\cygwin\tmp\ccqTRJ6G.s:91: Error: Thumb encoding does not support an immediate here -- `msr CPSR_c,#(0x12|0x80|0x40)'
make: *** [alt_interrupt.o] Error 1

How can I fix this? Or is there another way to compile everything?
I can not find any examples or something like this.

Are there any examples on how to use either timer or interrupts with the SoC Embedded libraries?

I also attached my makefile.

I use:
Quartus Version 18.1
Embedded Version 18.1
Windows 11
DE10-Standard FPGA Board

13 Replies

  • Hi,


    Are you using your own design or an example design that you get from somewhere?


    Also, did you face any Errors in Quartus /Platform Designer/Qsys during compilation?


    • MF28's avatar
      MF28
      Icon for New Contributor rankNew Contributor

      Hi!
      For the FPGA I am using my own design which is based on the GHRD and the provided soc_system file.
      The design is working fine and I wanted to now add Interrupts etc. to it. Here is where the errors appear.

      I have not faced any errors or anything suspicious in Quartus / Qsys etc. during compilation. Also creating the header files etc. worked always fine. I do not think that it is an error that is somehow connected to the Quartus project. The error occurs when I use the SoC Embedded alt_interrupt , ... files for my c-code. The error appears when cross-compiling on Windows and also when compiling directly on Linux.

      As I said I was able to compile my c code before without interrupts but when I want to add the .h and .c files needed for the interrupts and timers the provided error message is thrown. I am also not even using the libraries yet, I just imported them and this already is not working.

      But I am not able to find any examples on how to use interrupts with these files online.

  • MF28's avatar
    MF28
    Icon for New Contributor rankNew Contributor

    Hello!

    I attached a ZIP-File which includes files which result in the said error when trying to compile them via the Makefile. The given error message is the following:

    I guess there are no examples available where the Interrupts are used?
    Even though the keys and switches of the FPGA are declared as Interrupts in the GHRD.

    I also attached the Platform Designer file. However the error of course is happening when compiling the C Code.

    • MF28's avatar
      MF28
      Icon for New Contributor rankNew Contributor

      Hello!
      I will try the example as soon as possible and give feedback about it.
      BR

  • MF28's avatar
    MF28
    Icon for New Contributor rankNew Contributor

    Hello again!

    I now tested it with these tutorials.

    When using the ARMCC Examples I of course get the error, that there is no ARM-DS5 license present.
    This makes sense since I don't have a license and there are no "free" licenses available anymore like the community license in the past.

    However this does not matter since I always use GNU as a compiler.
    With this there are two outcomes:

    Compiling with cross_compile:
    arm-linux-gnueabihf-

    I get the same error as before


    Compiling with cross_compile:
    arm-altera-eabi-

    The code is compiled and i get a .axf file

    As far as I know for the .axf file I need to use Uboot etc right?
    I can NOT launch it directly from the LXDE shell when I have it running on the FPGA can I ?

    • MF28's avatar
      MF28
      Icon for New Contributor rankNew Contributor

      Hello!
      Sorry for the late answer, I was looking into a lot of stuff.
      Right now I don't have any more questions. Thank you very much for all the help!
      I think I now understand everything a lot better!

  • Hi,


    Glad your issue have been addressed, if you have further question, you can just open a new forum case.


    Thank you for using Intel Forum Support. To strive for continuous improvement in our support, please take a few minutes to complete a survey if you happens to receive one. Have a nice day!