Beginner's Example


(Balaji V) #1

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.


#2

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.


(Balaji V) #3

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


#4

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.


(Balaji V) #5

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


#6

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


(Balaji V) #7

Thanks for the reply sir!

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


#8

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


(Ivan @ PlatformIO) #9

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!


(Michael Zaidman) #10

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