BSP for HiFive1?

Do we have any BSP for HiFive1, sth equivalent to CMSIS for ARM? I’ve just tried Freedom Studio example and found out it uses uOS++ (C++?) which I am not a big fan.

equivalent to CMSIS for ARM

µOS++ is exactly this, a modern C++ version of CMSIS. actually it was initially called CMSIS++, but for legal reasons the CMSIS name was dropped.

It has dual APIs, C & C++, so if you are not confortable with C++, you can use the C API.

And it is highly layered, with separate architecture/device/board definitions.

1 Like

can you tell me a bit more about µOS++? Just found your github.io page, looks interesting, but I have some questions.

Do the “official” SiFive BSPs in Freedom Studio are based on µOS++ ?
Does µOS++ work with GNU MCU Eclipse in a way that you can directly create project using different uOS++ configurations?
On your start page there is picture showing a lwIP xPack. Does this exist?

Who is actually contributing to / using µOS++

I don’t know what you mean by “official”. For now the Freedom Studio SiFive project templates create projects that use a limited set of µOS++ xPacks.

The RISC-V xPacks are preliminary and might require more work.

It was planned to add support for RTOSes (FreeRTOS and µOS++ RTOS), but SiFive cancelled further GNU MCU Eclipse developments, so I do not have a date, it might come after all new ARM xPacks developments will be in place.

I’m currently working on making µOS++ more modular, based on xPacks, aiming to include various modules in a generic GNU MCU Eclipse project template.

For now the POSIX layer has generic support for file systems, files, directories, character devices, tty devices and block devices. The first concrete implementation includes Chan FAT FS, which works very nice.

Support for network stacks is preliminary, the classes are there but the concrete implemetation over lwIP is not ready.

The idea behind the POSIX layer is to allow uniform acces to all files, devices, networks, etc, using the generic read()/write() POSIX calls.

µOS++ is used in projects ranging from Cortex-M0 to Cortex-M7 and proved quite reliable. I am the maintainer and major contributor.

1 Like

Well, that’s basically what I ment with „official“. Maybe a more precise formulation would be „be part of the SiFive distribution“.

I noticed when installing GNU MCU Eclipse instead of Freedom studio I don’t get project templates for e.g the HiFive1. Can they be added to MCU Eclipse?

please follow the install steps as documented, and you’ll get all plug-ins.

https://gnu-mcu-eclipse.github.io

the easiest way is to use the EPP distribution

BTW, if I remember right, in the latest GNU MCU Eclipse release, the SiFive templates use slightly newer xPacks than in Freedom Studio.

Using the same xPacks, you can also create and build SiFive projects outside Eclipse:

https://www.npmjs.com/package/@sifive/templates

1 Like

It was a while ago when I installed GNU MCU Eclipse. I retried it now based on your advice. It worked out of the box with my HiFive1 including debugging with OpenOCD.

Now I will try to find out if µOS++ is useful for me.

If you appreciate the advantages of using C++, you might find it useful.

Also please note that major rework is planned soon for µOS++, to make the RTOS components more modular and to get rid of the cmsis names in headers.

1 Like

Maybe it is going a bit of topic now and there may be a better place outside this forum to discuss further.
I did some experiments now beyond the HiFive example projects and I’m wondering how xpm/xPacks and MCU Eclipse relate to each other.

I tried to build a project using xPacks from scratch (actually I want to use it not with SiFive chips, but with a different RISC-V implementation). It works with xpm/xmake from the command line but I have no idea how I get MCU eclipse “understanding” that my project is an xpm/xmake based project.

You caught me here :frowning:

Integration into Eclipse is still work in progress, I plan to have a build plug-in that will use exactly the JSONs used by xpm/xmake; for the moment the workaround is to add the source folders to Eclipse, as for regular CDT projects.

For non-RISC-V topics, you can use the GME support forum.

1 Like