Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

uC/OS-III porting

Altera_Forum
Honored Contributor II
2,772 Views

Where can i find uC/OS-III Integration kit for nios2? 

It's too difficult for me :(
0 Kudos
14 Replies
Altera_Forum
Honored Contributor II
1,040 Views

I believe Altera plans to start on the uC/OS-III port this year. Aside from that, one of our software engineer's in porting it right now and is working closely with Micrium and Altera to do so. The uC/OS-III port itself is fairly simple. What we're spending most of the time on is porting individual Altera components to be uC/OS-III compatible. I can't give you a timeline but we may be able to provide the port to you when he's finished. According to Micrium, we are the first ones to port it. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

Thanks, I will wait for this.

0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

 

--- Quote Start ---  

I believe Altera plans to start on the uC/OS-III port this year. Aside from that, one of our software engineer's in porting it right now and is working closely with Micrium and Altera to do so. The uC/OS-III port itself is fairly simple. What we're spending most of the time on is porting individual Altera components to be uC/OS-III compatible. I can't give you a timeline but we may be able to provide the port to you when he's finished. According to Micrium, we are the first ones to port it. 

 

Jake 

--- Quote End ---  

 

 

Hello Jake, 

 

I'm also considering using uC/OS-III with NIOS II. 

 

Could you share with us the basic information what is required when porting Altera components to uC/OS-III? 

 

According to Micrium they "have the uC/OS-III port available for the Nios-II" and "All of our OS-II ports work for OS-III, there is just a small amount of massaging to do". 

 

So the porting the basic NIOS II CPU support seems to be easy, but what kind of other porting issues and problems are expected with SOPC and NIOS II EDS ... 

 

Best Regards, 

Jari
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

Basically, our software engineer has got uC/OS-III ported for NIOS II. He's made an OS component out of it so it shows up in the BSP editor as an option for the OS type along with "HAL" and uC/OS-II. That part wasn't so bad. It basically entailed: 

 

1 - The actual platform-specific code (which was basically identical to uC/OS-II) 

2 - Creating an OS component for SoPC builder using a "_sw.tcl" script. 

3 - Adding the new component to the "components.ipx" file so it showed up. 

 

Now what he's spent the vast majority of his time doing is porting all of the Altera components over to support uC/OS-III. This involves: 

1 - Creating a UCOSIII folder for some components with any specific code. Altera has got some code running in a java app somewhere behind the scenes that is forcing the folder names containing the source code for a component to match the name of the OS it supports (unless it's in the HAL folder in which case it's fine). So if you've got a software component or driver that has a UCOSII folder in it with source code. Chances are that has to be copied into a new folder named UCOSIII. 

2 - You have to specify for each component in the "components.ipx" file that it supports UC/OS-III. I know the "_sw.tcl" files allow you to specify what OS it supports but apparently that gets ignored completely. It has to be done in the ".ipx" file. 

3 - Most of his time has been spent porting the InterNiche TCP/IP stack over. There are some differences between uC/OS-II and uC/OS-III that require rewriting some of the InterNiche code. Basically dealing with the way they handle semaphores. 

 

That's the condensed version. Micrium's comment that the port is already complete is just a sales pitch. They were willing to do it for us if we wanted to pay them the NRE. 

 

Jake
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

 

--- Quote Start ---  

Basically, our software engineer has got uC/OS-III ported for NIOS II. He's made an OS component out of it so it shows up in the BSP editor as an option for the OS type along with "HAL" and uC/OS-II. 

--- Quote End ---  

 

 

Can you share this component?
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

Thanks, Jake, for your quick answer! 

 

I was also afraid that the Micrium's statement about the NIOS II port status was a sales pitch. Thanks for confirming it! This would give some perspective to their other "sales pitch" talk, too ... 

 

I've only done some quick evaluation with uC/OS-II, so I haven't looked that deep into the components to see what Altera's tools are actually requiring. Your explanation gave me some valuable information what to expect. 

 

Too bad that also the InterNiche stack requires some patching. I was also planning to use it. 

 

It looks like that using uC/OS-III at this moment requires quite a lot of hacking, which needs to be scheduled in the project. 

 

Although I would very much like to use uC/OS-III's round-robin scheduling feature from the beginning in the project, it might make more sense to first use uC/OS-II and wait until Altera/InterNiche/Micrium could put their act together and provide the official support for uC/OS-III ... 

 

But if you're able to share (even using private messages :-) any of the stuff you guys have done, I would appreciate it very much and would be willing to share my modifications with you, too. And hopefully many others in the Altera community feel the same way ... 

 

Best Regards, 

Jari
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

Is there any more info on when does Altera plan to release the uC/OS-III support. 

Is it integrated in Qsys ?
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

Its a bit of topic but has anyone a link that shows what changed between II and III? 

 

thank you  

karsten
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

There is a comparison table at the end of the document. 

http://micrium.com/download/whitepaper_what_is_osiii.pdf
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

This was what i was looking for . 

Thank you  

karsten
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

I have been working on porting the uC/OS-III to the NIOS-II. I have received a porting package from Micrium with successsfully builds, however, we are encountering excessive CPU Usage levels (100% usage) which appears to be related to the "tick task" or thread safe newlib configuration. 

Has anyone encountered this behavior during your porting work and what have you done to resolve the issue.
0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

Micrium gave me several files which when added to NIOS installed a template for a Hello World MicroOSIII. 

 

After installing them I do have the option to select Hello World MicroOSIII from the New Create from template, however when creating the BSP the make project script bombs out ==> 

 

INFO: Creating BSP settings file... 

INFO: nios2-bsp-create-settings --sopc C:/VSDRRSW/a5gtd7k3_fpga_bup_qsys.sopcinfo --type ucosiii --settings ./settings.bsp --bsp-dir . --script c:/rtn/altera/10.1/nios2eds/sdk2/bin/bsp-set-defaults.tcl --cpu-name cpu  

INFO: Initializing SOPC project local software IP 

INFO: [Info] <b>C:/VSDRRSW/*</b> matched 10 files in 0.00 seconds 

INFO: [Info] <b>C:/VSDRRSW/*/*_sw.tcl</b> matched 2 files in 0.01 seconds 

INFO: [Info] <b>C:/VSDRRSW/ip/**/*_sw.tcl</b> matched 0 files in 0.00 seconds 

INFO: [Info] <b>C:/ip/**/*_sw.tcl</b> matched 0 files in 0.00 seconds 

INFO: Finished initializing SOPC project local software IP. Total time taken = 2 seconds 

INFO: Searching for BSP components with category: driver_element 

INFO: Searching for BSP components with category: software_package_element 

INFO: Found Flash Memory: ext_flash for CPU: cpu 

INFO: Loading drivers from ensemble report.  

INFO: Finished loading drivers from ensemble report. 

INFO: Tcl message: "STDIO character device is jtag_uart" 

INFO: Tcl message: "System timer device is sys_clk_timer" 

INFO: Tcl message: "Default linker sections mapped to onchip_ram" 

INFO: Tcl message: "Bootloader located at the reset address." 

INFO: Tcl message: "Application ELF not allowed to contain code at the reset address." 

INFO: Tcl message: "The alt_load() facility is disabled." 

INFO: Default memory regions will not be persisted in BSP Settings File. 

INFO: Generated file "C:\VSDRRSW\software\HelloOSIII_bsp\settings.bsp

INFO: BSP settings file was created at location "C:\VSDRRSW\software\HelloOSIII_bsp\settings.bsp". 

INFO: Generating BSP files... 

INFO: Generating BSP files in "C:\VSDRRSW\software\HelloOSIII_bsp

INFO: Default memory regions will not be persisted in BSP Settings File. 

INFO: Generated file "C:\VSDRRSW\software\HelloOSIII_bsp\settings.bsp

severe: crt0.s source code not located in installed cpu module driver. 

severe: crt0.s source code not located in installed cpu module driver. 

severe: nios2-bsp-create-settings failed. 

nios2-bsp: nios2-bsp-create-settings failed 

nios2-bsp ucosiii . C:/VSDRRSW/a5gtd7k3_fpga_bup_qsys.sopcinfo --cpu-name cpu failed 

 

I have been bouoncing between the OSII and OSIII scripts and files but cannot seem to locate what is causing this to appear when I create OSIII but not OSII Hello World. 

 

Anyone know what is wrong? 

0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

 

--- Quote Start ---  

Micrium gave me several files which when added to NIOS installed a template for a Hello World MicroOSIII. 

 

After installing them I do have the option to select Hello World MicroOSIII from the New Create from template, however when creating the BSP the make project script bombs out ==> 

 

INFO: Creating BSP settings file... 

INFO: nios2-bsp-create-settings --sopc C:/VSDRRSW/a5gtd7k3_fpga_bup_qsys.sopcinfo --type ucosiii --settings ./settings.bsp --bsp-dir . --script c:/rtn/altera/10.1/nios2eds/sdk2/bin/bsp-set-defaults.tcl --cpu-name cpu  

INFO: Initializing SOPC project local software IP 

INFO: [Info] <b>C:/VSDRRSW/*</b> matched 10 files in 0.00 seconds 

INFO: [Info] <b>C:/VSDRRSW/*/*_sw.tcl</b> matched 2 files in 0.01 seconds 

INFO: [Info] <b>C:/VSDRRSW/ip/**/*_sw.tcl</b> matched 0 files in 0.00 seconds 

INFO: [Info] <b>C:/ip/**/*_sw.tcl</b> matched 0 files in 0.00 seconds 

INFO: Finished initializing SOPC project local software IP. Total time taken = 2 seconds 

INFO: Searching for BSP components with category: driver_element 

INFO: Searching for BSP components with category: software_package_element 

INFO: Found Flash Memory: ext_flash for CPU: cpu 

INFO: Loading drivers from ensemble report.  

INFO: Finished loading drivers from ensemble report. 

INFO: Tcl message: "STDIO character device is jtag_uart" 

INFO: Tcl message: "System timer device is sys_clk_timer" 

INFO: Tcl message: "Default linker sections mapped to onchip_ram" 

INFO: Tcl message: "Bootloader located at the reset address." 

INFO: Tcl message: "Application ELF not allowed to contain code at the reset address." 

INFO: Tcl message: "The alt_load() facility is disabled." 

INFO: Default memory regions will not be persisted in BSP Settings File. 

INFO: Generated file "C:\VSDRRSW\software\HelloOSIII_bsp\settings.bsp

INFO: BSP settings file was created at location "C:\VSDRRSW\software\HelloOSIII_bsp\settings.bsp". 

INFO: Generating BSP files... 

INFO: Generating BSP files in "C:\VSDRRSW\software\HelloOSIII_bsp

INFO: Default memory regions will not be persisted in BSP Settings File. 

INFO: Generated file "C:\VSDRRSW\software\HelloOSIII_bsp\settings.bsp

severe: crt0.s source code not located in installed cpu module driver. 

severe: crt0.s source code not located in installed cpu module driver. 

severe: nios2-bsp-create-settings failed. 

nios2-bsp: nios2-bsp-create-settings failed 

nios2-bsp ucosiii . C:/VSDRRSW/a5gtd7k3_fpga_bup_qsys.sopcinfo --cpu-name cpu failed 

 

I have been bouoncing between the OSII and OSIII scripts and files but cannot seem to locate what is causing this to appear when I create OSIII but not OSII Hello World. 

 

 

 

--- Quote End ---  

 

 

 

the problem has been found. a folder ucos-iii-nios_ii was in the same directory as the spocinfo file. it does not come into play when type is ucosii but when type is ucosiii then extra items appear to be found and the created bsp is corrupted. moving the folder ucos-iii-nios_ii out of the same directory as the spocinfo file eliminates the failure to create the bsp. 

 

0 Kudos
Altera_Forum
Honored Contributor II
1,040 Views

Hello, I also want to use the uC/OS-III with NIOS. I have the uC/OS-III Source but I don‘t know how to start a project with it. Someone here who could get me the files to install the template for a uC/OS-III hello world project (like the person above)?

0 Kudos
Reply