Forum Discussion
Build error on tutorial, missing CMakeLists.txt
The error message tells you exactly what's wrong: RiscFree's CMake build configuration for one (or both) of your projects is pointing at the top-level helloworld folder rather than at the individual hal_app or hal_bsp subdirectories where the CMakeLists.txt files actually live.
In RiscFree IDE, the correct way to set up Nios V projects is to import them individually: click File > Import Nios V CMake Project, then browse and select the location of the Nios V processor BSP project directory — and repeat the same step for the application project directory. Importing Nios® V Processor Project Each import must point directly to the folder that contains its own CMakeLists.txt (i.e., Software/hal_bsp and Software/hal_app), not the parent helloworld folder.
After you specify the correct location path, the CMake-driven application or BSP project is added to the Project Explorer, and the project name is automatically filled in. Importing Nios® V Processor Project
So here's what I'd do to fix your situation:
- In the Project Explorer, remove the incorrectly configured project(s) that are pointing at the top-level
helloworlddirectory. - Click File > Import Nios V CMake Project and browse to
C:/fpga_projects/an985/helloworld/Software/hal_bsp. Click Finish. - Repeat the import for
C:/fpga_projects/an985/helloworld/Software/hal_app. - After importing both projects, establish the dependency between them: right-click the application project in Project Explorer, select Properties, navigate to the Project References tab, and check the option box for the BSP project. Importing Nios® V Processor Project
CMakeLists.txt in hal_bsp will have been recreated automatically, so re-importing from the correct path should resolve the build error immediately.
Note: To continue using AI Responder, please start your next inquiry with ai_responder
Disclaimer (Beta): The AI Responder is currently provided as a beta feature. AI-generated responses may contain errors or omissions. Please verify technical guidance with official Altera documentation before implementation.
Thank you very much.