Altera_Forum
Honored Contributor
8 years agobaremetal application development in C++
I'm looking for information on how to develop a Cyclone V SoC HPS baremetal application as a C++ project. I have found numerous C only examples and have followed the Getting Started tutorial from AlteraWiki. I then tried to use the concepts learned to create a simple C++ UART project using the "Creating a Bare-metal HwLibs Project Manually" section in the Getting Started tutorial. I copied the H/W library file alt_16550_uart.c to my project and added the applicable# include "alt_16550_uart.h" within the extern "C" {} to my main.cpp file. When I tried to build the project I get the following error:
armcc --cpu=Cortex-A9 --apcs=/hardfp --arm -Dsoc_cv_av -DPRINTF_UART -I"C:\Users\alvarlj1\Documents\DS-5 Workspace\test_c_proj/src" -I"C:/intelFPGA/17.0/embedded\ip\altera\hps\altera_hps\hwlib\include" -I"C:/intelFPGA/17.0/embedded\ip\altera\hps\altera_hps\hwlib\include\soc_cv_av" -O0 -g --md --depend_format=unix_escaped --no_depend_system_headers --depend_dir="src" -c -o "src/main.o" "../src/main.cpp" "C:/intelFPGA/17.0/embedded\ip\altera\hps\altera_hps\hwlib\include/hwlib.h", line 42: Error: # 5: cannot open source input file "cstdbool": No such file or directory # include <cstdbool> ^ I looked for this file in the ARM compiler include folder and I see the other two C++ standard library files, cstddef and cstdint, but not the cstdbool file. I tried to start with a C project and my main.cpp and have the same problem. Looks like if "alt_16550_uart.h" or any other hw library file that uses "hwlib.h" is included in any .cpp file I get this error. I'm using ARM DS-5 Intel SoC FPGA Edition version 5.27.0 build number 5270014. Thank you, Luis Alvarez