Forum Discussion

Mohammed_Lami's avatar
Mohammed_Lami
Icon for Occasional Contributor rankOccasional Contributor
3 years ago

Can't use C libraries to read images or excel files in Cyclone V project

I am struggling in using the libraries of C-language in the ARM development studio IDE version 2021.1 (Intel edition). Let me demonstrate the working environment as follow:

1) Hardware: "ARM Cyclone V SoC FPGA development kit".

2) Software: licensed copy of the ARM development studio IDE version 2021.1 (Intel edition).

3) Windows 10 OS.

4) JTAG connection between the FPGA kit and the PC.

5) Coding: "C".

6) Compiler: ARM6.

7) I am trying to utilize the "stb_image.h" library to read an image in the attached project.

After building the project, the error message is prompted in the console view, please refer to the snapshot below.

I am wondering please, why the system didn't find the header file although it is uploaded to the project files? This problem also happened with other types of C-libraries, to read an excel file for example, any idea please?

24 Replies

  • Hi,


    In your calendar.c, can you define as below and re-try:


    #include <stdio.h>

    #include <stdlib.h>

    #define STB_IMAGE_IMPLEMENTATION

    #include "stb_image.h"

    #define STBI_NO_SIMD


    • Mohammed_Lami's avatar
      Mohammed_Lami
      Icon for Occasional Contributor rankOccasional Contributor

      Dear sir, thanks for your suggestion

      However, I am afraid its not the root of the problem, please refer to the snapshot below.

      Regards

      Mohammed Lami

  • Hi,


    • Please replace the .h files with below .h files:

    https://github.com/nothings/stb


    • Do make clean.


    • Place the 3 files same directory your Makefile.


    • Include as below in calendar.c

    #include <stdio.h>

    #include <stdlib.h>

    #define STB_IMAGE_IMPLEMENTATION

    #include "stb_image.h"

    #define STBI_NO_SIMD


    • Then Build Project


    Please refer below if you face the issue mentioned in my previous respond:

    https://developer.arm.com/documentation/dui0496/m/Linker-Errors-and-Warnings/List-of-the-armlink-error-and-warning-messages

    https://developer.arm.com/documentation/dui0474/latest


    • Mohammed_Lami's avatar
      Mohammed_Lami
      Icon for Occasional Contributor rankOccasional Contributor

      Hi

      I followed your steps strictly. I think the compiler read the "stb" library successfully. But I got another kind of error as you can see below:

      According to the ARM website that you shared, the problem is in the scatter file. However, the project is imported from the workspace of the DS software and it doesn't have a scatter file. Secondly, even if there is a scatter file, what kind of modification should be made on it? thanks for your support

  • Hi,


    Regarding the error, I suggest that you go into the ARM website/support forum section for that specific issue.


    I hope we have help to solve most of the issue that you faced, pardon us if we are unable to support the current issue.


    • Mohammed_Lami's avatar
      Mohammed_Lami
      Icon for Occasional Contributor rankOccasional Contributor

      Hi

      Okay I will move to ARM support, thanks for your support. You can close this issue now.

      Regards

  • Hi,


    I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


    p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer.