Beginner's Example

Hi SiFive team!
I am new to SiFive’s HiFive01. I have worked on Arduinos and Arduino IDE for years.I find it difficult to use Freedom Studio with HiFive01 board.I cant even find any examples, like blinking led, temperature sensor output in terminal.

Please give me some examples and give me some functions like arduino’s

pinMode(pin,OUTPUT);
pinMode(pin,INPUT);
digitalWrite(pin,OUTPUT);
digitalRead(pin,OUTPUT);

Thanks in advance.

If you’re willing to try using Rust instead of C you can check out this repo for all of those and some more.

NOTE: I’m not trying to “sell” Rust here, when I started playing around with the Hifive1/revB board I found the C code and their whole framework extremely confusing. I found out about the Rust side of things and never looked back (even as a Rust noob). Others might see things differently of course.

1 Like

So, there is No way to use Freedom Studio- HiFive01- C programming language …
:roll_eyes:

I’m sure there is. I got some basics working but the setup process and issues I faced were just offputting. It also seemed extremely heavy.

IIRC the freedom SDK (not the studio) had some examples in it that mostly worked ok.

How are you using HiFive01??
Please i dont know anyone who knows about HiFive, Guide me please??

You can get example projects in Freedom Studio.
Go to File > New > Freedom E SDK Software Project

Or you can view my tutorial video at https://youtu.be/zp-xVC4vuoA

Thanks for the reply sir!

Can u please sent me the bare metal code.
Thanks a lot

If you have downloaded the Freedom Studio
You can find software examples in
<FreedomStudio directory>\SiFive\freedom-e-sdk-v201908\software

and metal code in
<FreedomStudio directory>\SiFive\freedom-e-sdk-v201908\freedom-metal

1 Like

Hi,

Please take a look at [PlatformIO](https://platformio.org]. It has an extension for VSCode which is easy for use. See demos PlatformIO SiFive dev/platform 1.0.0: IP Core emulation and debugging without hardware!

1 Like

You are probably looking for the Arduino IDE for Windows. It comes with essential Arduino libraries ported to Hifive1 (Rev. A) board. https://github.com/westerndigitalcorporation/cinco

The example projects in the IDE are using bare metal (no OS), so it is hard to run anything. Here is FreeRTOS guide:

For linux/MAC systems, you need may need to edit PATH, "" to “/”, and .exe extensions in the project files. See: