U bekijkt momenteel de Netherlands versie van de site.
Wilt u overschakelen naar uw lokale site?
17 MIN LEESTIJD

RISC-V

Build a RISC-V LED sign

Tam Hanna takes the GigaDevice RISC-V microcontroller for a spin and creates a gadget that displays impolite messages in large red letters.

Credit: www.gigadevice.com

Buckle in kids, this isn’t a project for the fainthearted or novice electronic tinkerer. Before B we can deal with the RISC-V hardware, we need to deal with our software development environment. Visit www.nucleisys.com/download.php and right-click Nuclei Studio IDE > Linux x86-64 to start the download – the servers are not particularly fast, so the process will take a bit of time. After that, untar the archive and start it in a terminal, as follows:

$ cd ~/Downloads/NucleiStudio

$ ./install.sh

$ ./NucleiStudio

Nuclei Studio asks for a workspace folder – the default can be accepted. Once started, click File > New > New Nuclei RISC-V C/C++ Project to make the IDE pop up an alert about missing packages. In addition to that, the Nuclei package management window also shows up.

It is a little inconveniently designed, as the dialog only downloads one component at a time – tick multiple boxes and the download is refused.

Select one of the items shown in the screenshot (below) and click the Download button next to the combo box marked Save To User Path. After the download is complete, proceed to the next package – repeat until all packages shown are available.

The IDE indicates downloaded packages by displaying a green light in the status column of the package management dialog.

Get yourself the right packages for this RISC-V board.
We suggest you use the GigaDevice GD32VF103 RVSTAR board.

After all components are downloaded successfully, select the option File > New > New Nuclei RISC-V C/C++ Project to start the project generator. The assistant asks you to select a project configuration – we recommend the one in the screenshot (above).

Click Next to proceed to the project configuration. GigaDevice keeps an open ecosystem and permits the use of various real-time operating systems. Most of the options can be taken as they are – the only important choice involves the project example field, where the string ‘Helloworld @app-nsdk_helloworld’ should be selected. Assign a name to the project, too.

Also, be careful that the string 2K is found in both the heap size and the stack size windows – scooting around the dialog and going back and forth a little can delete these values. After clicking the Finish button, Nuclei Studio generates the project structure.

NMSIS contains generic software libraries and is not of significant interest. Relevant files can be found in the SOC folder – gd32vf103/Board contains files intended for the large evaluation board, while gd32vf103/Common contains hardware drivers.

If you’re used to classic development environments, you’ll get a surprise when switching to microcontrollers – the driver code required for peripherals is usually part of the project. Look at gd32vf103_gpio.h – it contains declarations required for accessing the GPIO unit.

When working with GigaDevice MCUs, have the firmware reference library to hand. Go to https:// gd32mcu.com/en/download/0?kw=GD32VF1 and click the GD32VF103 Firmware Library link – when done, extract the archive to access the sample code.

Ontgrendel dit artikel en nog veel meer met
Je kunt genieten:
Geniet volledig van deze editie
Direct toegang tot 600+ titels
Duizenden oude edities
Geen contract of verplichting
ABONNEER NU
30 dagen proberen, dan gewoon €11,99 / maand. Op elk moment opzeggen. Alleen nieuwe abonnees.


Meer informatie
Pocketmags Plus
Pocketmags Plus

Dit artikel komt uit...


View Issues
Linux Format
Summer 2023
IN DE WINKEL BEKIJKEN

Andere artikelen in dit nummer


Linux Format
Linux Format
The #1 open source mag Future Publishing Limited,
WELCOME
MEET THE TEAM
We’re not avoiding the office, we’re building our own and taking it with us, but what’s the oddest place you’ve found yourself doing work?
Freeeedom!
We’re all avoiding the office these days (just
REGULARS AT A GLANCE
The Red Hat paywall
Red Hat announces source code of RHEL will only be available to paying customers, who can’t redistribute it.
Lemmy numbers spike after Reddit ban
A ban on subreddits helped promote alternative Lemmy with a general boost to federated platforms.
100% free GNU Linux-libre
Bye-bye binary blobs – build a truly free system.
CLONE WARS
“Red Hat’s changes to the way it distributes
DOWN TO THE WIRE
Ashok Sidipotu is a senior software engineer at
Animated JPEGs
FFmpeg has now merged JPEG-XL support. Is this the next step to widespread adoption of the format?
Wine comes to Mac OS
Apple’s Game Porting Toolkit is based on CrossOver’s code.
A wild desktop appears!
Kera Desktop touts itself as an easy and exciting way to enjoy your favourite OS.
Distro watch
What’s behind the free software sofa?
WHAT A NUMBER!
Italo Vignoli is one of founders of LibreOffice
BE KIND PEOPLE!
Jon Masters has been involved with Linux for
Kernel Watch
Jon Masters keeps up with all the latest happenings in the Linux kernel, so you don’t have to
Answers
Got a burning question about open source or the kernel? Whatever your level, email it to answers@linuxformat.com
Mailserver
WRITE TO US Do you have a burning
CudaText
ADVANCED TEXT EDITOR
QMPlay2
MEDIA PLAYER
Mixxx
DJ SOFTWARE
Unison
FILE SYNCHRONISER
SSH-audit
SSH CONFIG ANALYSER
NormCap
COPY TEXT
Gromit-MPX
ON-SCREEN ANNOTATION
Open Fodder
SHOOT-’EM-UP
Empty Clip
RPG
LocalSend
FILE TRANSFER
Jellyfin
MEDIA SERVER
REVIEWS
WD Red Pro 20TB
High-capacity NAS OptiNAND on a platter impresses Shane Downing.
OpenSUSE 15.5
Nate Drake revisits the first Linux distro he ever used and finds that, like a fine wine, OpenSUSE has only improved with age.
Thunderbird 115
Nate Drake takes a sneak peek at the upcoming Thunderbird and finds it still comfortably ruling the roost.
Debian 12 Bookworm
Nate Drake burrows into Debian 12 (Bookworm) and is dazzled by the array of new features, including support for non-free firmware.
Roots of Pacha
Reinventing the wheel sounds like a dream to Management – they’ve sent Andrea Shearon back in time to reap the rewards!
ROUNDUP
Computer-aided design
WE COMPARE TONS OF STUFF SO YOU DON’T HAVE TO!
FREE ALL YOUR FILES
FREE ALL YOUR FILES
It’s time to stop Big Tech being in control of your online documents. Let Jonni Bidwell show you how with Nextcloud and Collabora Office.
Pi USER
Going over the Pi Pico BASICs
Relive your spaghetti code days on your Pi Pico!
I/O Learning HAT
Les Pounder wants to automate his home because his new office is too far away from the coffee machine. Maybe now he can.
Sovol SV06
Denise Bertacchi wonders what if an Ender and a Prusa MK3 had a baby?
NeoPixel URL control
Les Pounder thinks of NeoPixels as LED candy. They taste awful but look phenomenal. Will they taste better with a slice of Pi?
Set up a game development system
DEVELOPMENT
IN DEPTH
Bootstrap your LINUX career
Discover how Linux certification can help you. Stuart Burns explains the why and the how, with a few pro tips thrown in for good measure.
EVOLUTION OF CODING
Mike Bedford reveals how the programming languages of the ’50s morphed into today’s most used languages.
TUTORIALS
Multi-protocol transfer
Shashank ‘Proficient With SMB, SSH, SCP and More’ Sharma never has to rely on thumb drives to move data across different machines…
Take and organise notes with ease
Nick Peers reveals how to put your thoughts and ideas in order with the note-taking app to rule them all.
Build a static project website on GitHub
Matt Holder investigates static site generators, what they are useful for and why they are better than CMS in some situations.
Add a little funk to mathematical plots
Always one looking to spice up his life, Ferenc Deák tries out a new function-plotting tool that’s packing a Pascal-like language.
Build your own hardware firewall
Worried about intruders and hack attacks? Nik Rawlinson shows how to take charge of network security with the BSD-based pfSense firewall.
CODING ACADEMY
Code your own Python text adventure
Nate Drake guides you through creating your own interactive text adventure with Python. This time, we LOOK at items…
Rediscover speed with the Redis revolution
REDIS
ADVERTISEMENT
GO COMPARE
go.compare
Linux Format
www.linuxformat.com www.magazinesdirect.com/LIN/B93G www.techradar.com/pro/linux
Magazines direct
www.magazinesdirect.com
Magazines Direct
magazinesdirect.com
BACK ISSUES
www.magazinesdirect.com
Magazines direct
www.magazinesdirect.com/linux-format
Techradar
techradar.com
Code club
www.codeclub.org.uk
EFF
EFF.ORG
THE BRAIN TUMOUR CHARITY
thebraintumourcharity.org
Chat
X
Pocketmags ondersteuning