- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Folks,
I am stuck in a problem since last week
Does anybody have a hint where can I find the header file that contains these declarations: UART_MAX_LEN, log_buf
Compiler is giving error about about UART_MAX_LEN undeclared, similarly log_buf, they both happen to appear in a function int_write in src/utils/alt_retarget_gnu.c.
I have used the linker script :"host_tools\mentor\gnu\arm\baremetal\arm-altera-eabi\lib\cycloneV-dk-ram-hosted.ld" to access some of the host's functionality to print.
My compiler output:
../src/utils/alt_retarget_gnu.c:88:20: error: 'UART_MAX_LEN' undeclared (first use in this function)
../src/utils/alt_retarget_gnu.c:88:20: note: each undeclared identifier is reported only once for each function it appears in
../src/utils/alt_retarget_gnu.c:93:14: error: 'log_buf' undeclared (first use in this function)
P.S. Project is attached with preloader for reproduction of error.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May I know which version of Quartus and SoC EDS software are you using?
Btw have you tried running a simple bare metal application on your board?
Here is the link to get you started:
https://www.intel.com/content/www/us/en/programmable/documentation/lro1424280108409.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using 16.0 Version (Quartus, NIOS II SBT, SoC EDS) on Windows. I have tried with latest version 18.1 on Ubuntu 18.04 and Windows as well. All of the them produces the same errors. I have again attached the compiler output screenshot.
I have tried running simple applications, and they are working but I have no clue what's is getting wrong in this project. I just want to setup an HPS and FPGA on Cyclone V DE1-SoC Board with following functions:
-->The HPS must be able to use the LED and button that are directly connected to the HPS PORTION of the device [DE1-SoC Board]. Pressing the button should toggle the LED.
-->The HPS must be able to access the LEDs connected to the FPGA PORTION of the device and will be responsible for creating a strobing light effect on the upper 5 LEDs.
The program is not so long but it uses the printf function. The linker Image file is set to use the "cycloneV-dk-ram-hosted.ld" to access some of the host's functionality to print on the console.
I will be thankful if you can elaborate the function of alt_retarget_gnu.c file. I am not able to find it in the documentation. What is really going wrong in the compilation process??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You may find the alt_retarget_gnu.c file here in your Quartus Installation file:
"\intelFPGA\18.1\embedded\ip\altera\hps\altera_hps\hwlib\src\utils"
The C file contains minimal re target support to make printf function over UART for the GNU compiler.
Can you check your C file contains the UART_MAX_LEN, log_buf declarations?
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know where the UART_MAX_LEN and log_buf are used in the source file but my question is: HOW SHOULD I DECLARE THEM? I dont know the functionality of both of these. There is nothing written in the documentation about them. Could you elaborate a little bit or point me to the documentation where it is written. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sir/Madam, where you able to solve it? I'm facing the same very problem with UART_MAX_LEN not being declared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there anyone from Intel to answer my query? I am stuck in it since a month.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
May I know where did you get the De1-soc bare metal application from? And which HWlib are you using?
I have checked your hps folder, it seems that it is missing some header files, e.g hwlib.h which is included in alt_retarget_gnu.c.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can take a look at my header files folder, it contains hwlib.h as well;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I got the bare-metal application from here: https://github.com/sahandKashani/SoC-FPGA-Design-Guide/tree/master/DE1_SoC/DE1_SoC_demo.
I did following to include the HWlib in my project;
1- I used INCLUDE option of compiler to add the HPS HWlib HEADER FILES in my code.
2- I copied the HPS HWlib SOURCE FILES in my DS-5 project directory from altera/16.0/embedded/ip/altera/hps/altera_hps/hwlib/src.
Can you please describe how to add the HWlib to my project correctly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Based on my knowledge, there should be some errors that mentioned some libraries are not included in the eclipse (DS-5)?
I think it displays at the bottom of the screen of the eclipse. Did you notice any errors there?
Even in our HWlibs examples that is in our installation folders (\embedded\examples\software) does sometimes report these missing libraries/headers, but they can be ignored. Because the files are added after running the application.
I suggest you could try our examples first to run a simple application and let me know if these examples results in the same error:
https://www.intel.com/content/www/us/en/programmable/support/support-resources/design-guidance/bare-metal-developer.html
Examples at number 4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you have encounter any issue in our examples, let me know.
Regards.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page