Intel® SoC FPGA Embedded Development Suite
Support for SoC FPGA Software Development, SoC FPGA HPS Architecture, HPS SoC Boot and Configuration, Operating Systems
494 Discussions

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

MF28
Beginner
2,362 Views

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

0 Kudos
13 Replies
EBERLAZARE_I_Intel
2,335 Views

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?


0 Kudos
MF28
Beginner
2,326 Views

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.

0 Kudos
EBERLAZARE_I_Intel
2,289 Views

Hi,


Apologies for the late response. I am still working on this issue.


0 Kudos
EBERLAZARE_I_Intel
2,247 Views

Hi,


Can you provide the project file for me to replicate the issue?


0 Kudos
MF28
Beginner
2,230 Views

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:
ErrorMessage.jpg

 

 

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.

0 Kudos
EBERLAZARE_I_Intel
2,210 Views

Hi,


Thanks for the file, I will check them from my side.


0 Kudos
EBERLAZARE_I_Intel
2,189 Views

Hi,


I've checked there are no issue with the design files in Quartus, this seems to be an issue with the makefile.


We have an example for Timer, could you try this one and see if you are seeing the same issue there?:

https://github.com/altera-opensource/intel-socfpga-hwlib/tree/master/examples/CVAV


After that, you could make the makefile as the example as how it works with the timer.


0 Kudos
MF28
Beginner
2,172 Views

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

0 Kudos
MF28
Beginner
2,163 Views

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 ?

0 Kudos
EBERLAZARE_I_Intel
2,121 Views

Hi,


Do you have any further questions?


0 Kudos
MF28
Beginner
2,116 Views

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!

0 Kudos
EBERLAZARE_I_Intel
2,108 Views

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!


0 Kudos
Reply