ContributionsMost RecentMost LikesSolutionsRe: Riscfree compilation error with message ".bss not within region onchip_mem" Hi Rolando, yes, you're right. When the path to Matlab is removed, I can compile with make instead of gmake. I wonder if compiling with gmake is problematic since it is used in Linux systems? This is to avoid having to manage environment variables every time I need Risfree or Matlab. One last question: are you getting the same warnings "File '/app/build/Debug/compile_commands.json' was not created in the build. Your workbench will not know all include paths and preprocessor defines." (my post 07-08-2025)? Thank you for your help and thorough testing. Regards, Thierry Re: Riscfree compilation error with message ".bss not within region onchip_mem" Hi Rolando, thank you for your time. From your last post I understand that using gmake is normal with this version of Riscfree. My problem is that gmake exists only in the Matlab directory on my PC. I checked this point. There is no other gmake.exe files anywhere else on my hard drive. My os is Windows so this program would be normally installed in the riscfree directory (instead of /usr/bin/ for Linux). Could you please check point? I would like to make sure that the installation of riscfree is not corrupted. Best regards, Thierry Re: Riscfree compilation error with message ".bss not within region onchip_mem" Hi Rolando, it is good news that you were able to build the application using the Macnica application note. I tried to do the same thing and can detail where our paths seem to diverge. I follow very scrupulously the tutorial up to the end of 4.5.1. The only difference is that I am using Riscfree v23.4.1 instead of v22.2.2. Everything seems normal until the "Finish" command to create the project in Risfree. Warnings are displayed in "Problems" tab with the informations below (by category): Description: File '/app/build/Debug/compile_commands.json' was not created in the build. Your workbench will not know all include paths and preprocessor defines. Resource: app Location: de.marw.cmake.cdt.language.settings.providers.CompileCommandsJsonParser Type: CMAKE_EXPORT_COMPILE_COMMANDS Parser Problem Despite these warnings, I tried to build the application ("Build Project" command). As you can see below, the project is build (with no errors) with gmake not cmake. I do not understand why. 08:58:03 **** Build of configuration Debug for project app **** "C:\\PROGRA~1\\MATLAB\\R2020b\\bin\\win64\\gmake.exe" -j all [ 1%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/alt_log_macro.S.obj [ 3%] Building ASM object bsp/CMakeFiles/hal2_bsp.dir/HAL/src/machine_trap.S.obj ... [ 96%] Building C object CMakeFiles/hello.elf.dir/hello.c.obj [ 97%] Linking C executable hello.elf [ 97%] Built target hello.elf [100%] Creating hello.elf.objdump. [100%] Reporting memory available for stack + heap in hello.elf. hello.elf * 125.44 KB - Program size (code + initialized data). * 23.36 KB - Free for stack + heap. [100%] Built target niosv-stack-report [100%] Built target create-objdump 08:58:10 Build Finished. 0 errors, 0 warnings. (took 7s.9ms) I join the app and bsp. You might want to check if the behavior is the same in your case. Thank, Thierry Re: Riscfree compilation error with message ".bss not within region onchip_mem" Hi Rolando, an unofficial tutorial explains how to import a Nios V project into Riscfree for versions that do not yet offer the automatic import option (https://malt.zendesk.com/hc/en-us/articles/9280647796761-Nios-V-Project-Development-Procedure-Using-Ashling-RiscFree-IDE , part 4.5.1). I was not able to follow this procedure, it may not exactly match the version I am using. I would use the last version of Riscfree but it seems it has a bug : https://community.intel.com/t5/Nios-V-II-Embedded-Design-Suite/RiscFree-v25-1-1-no-longer-finds-BSP-and-compiler-headers-files/m-p/1676846#M53545 without a clear workaround. Regards, Thierry Re: Riscfree compilation error with message ".bss not within region onchip_mem" Hi Rolando, I have attached the app and bsp directories that I generated (located in the "soft2" directory) so you can verify their accuracy. The next step is to import the project into Riscfree. The version of Riscfree I am using (v23.4.1, 3rd Nov 2023 installed with Quartus 23.1.1) does not implement the "Import Nios V CMake Project" option that is used in the application note 985. Could you please tell me exactly how to import the project with this version of Riscfree? Best regards, Thierry Re: Riscfree compilation error with message ".bss not within region onchip_mem" Hi Rolando, thanks for your help. Regarding the .bss section, I have no idea of the needed size. I am attaching an archive file of my software directory (after performing a build clean). You might find some interesting informations inside. For completeness I join also the .sopcinfo file (in DE10_LITE_Qsys.zip file) from which the bsp (hal_bsp) was generated. Regarding the gmake issue, I already have placed the Matlab path at the end of the PATH variable, but the behavior remains unchanged. I do not see a gmake.exe file in the Quartus installation tree directories. So, even though the Quartus variable takes precedence, no program is found. I deleted the gmake.exe file from Matlab directory. Riscfree throws an error saying that gmake is no longer available. Best regards, Thierry Riscfree compilation error with message ".bss not within region onchip_mem" Hi, I'm working on a DE10 Lite board project integrating a NiosV/m microprocessor. The development tools are Quartus Prime Lite v23.1.1. The hardware has been correctly generated and also the BSP. The software application is a simple "hello world" program hello.c. My problem concerns compilation with RiscFree. The compilation aborts at the link stage with the message "address 0x4022284 of hello.elf section '.bss' is not within region 'onchip_mem'". In the hardware system an on-chip memory is used as unique memory for data and the program with addresses between 0x400_0000 and 0x402_7fff. Furthermore I noticed that the compilation process corresponds to a gmake command that RiscFree found in a Matlab directory (Matlab is installed on my PC). I tried to find the same gmake program in the Quartus suite installation directory, but it does not exist (so it is not planned that riscfree will use it?). I do not know if these two problems are related. Here are some screenshots to help you understand. A part of the hardware system designed with Platform Designer, mainly NiosV/m and on-chip memory Address mapping BSP editor: Drivers view Compilation aborts: gmake.exe is mentionned at the last line Compilation aborts: message indicating that .bss is not within region 'onchip_mem' Thank you very much in advance for your help Thierry Re: Build Error on Ashling RiscFree 2025.1 Hi, I have the same problem but I do not see a solution in the tutorial on Macnica web site. Could you please explicit how to solve the build errors? I developped the hardware system with Quartus Prime Lite Edition 24.1 and RiscFree v25.1.1. Generating the app and bsp projects from niosV-shell command has worked normally. No problem either for importing projects into RiscFree. For clarity, I am adding a screenshot showing the result of a build. Surprisingly an hello.elf file is generated in a app/build/default directory (but nothing in app/build/debug). I also tried to debug the project. An error arises (please see 2nd screenshot) indicating that the debug probe is not avalaible for debug session. The debug probe is USB-Blaster that I used to download the sof file and it is working normally. Thank you very much in advance for your help. Thierry Re: adc alt_sys_init.c build error Hi, the same problem exists under Quartus Prime Lite 21.1.1 in Linux edition. Regards. Re: Nios II automatic ISR pre-emption Hi, thank you for your reply. I do not use custom drivers in my project, only devices from the standard library (mainly pio and timer). I have verified that each of them declare both "isr_preemption_supported" property TRUE and "supported_interrupt_apis" property "enhanced_interrupt_api". If I correctly understand the documentation, the ISR preemption should be automatically enabled. Incidentally if it is true I do not understand why the documentation, section "9.2.3.3. Managing Pre-Emption", indicates that "Automatic pre-emption is only available if you enable it in the BSP settings". Does it mean an action in BSP settings is necessary? In order to verify if isr preemption is enabled I have launched a simple program: - a periodic interruption is generated thanks to the HAL facility (alt_alarm_start()) with priority 0 and makes leds blinking each second. - another interruption source is a push-button, with priority 1 (lower than the periodic one). The push-button ISR is only an infinite loop: if isr preemption is enabled the leds must continue to blink even if the push-button is pressed because the periodic isr has higher priority. I my case the leds stop to blink after the push-button is pressed. The infinite loop in the push-button isr deadlocks the system: an isr with low priority masks another one with a higher priority. So, my problem is to understand why isr preemption is not automatically enabled, or how to enable it. Thank you for your suggestions and help. Best regards