First, I’m a Dabbler, Tinkerer in Microcontrollers, I don’t have any aspirations
to become a whiz coder or programmer, I know just enough to get into trouble ~ :o)
Therefore I only have some basic tools, I use Win7 (good grief !) and 32 bit at that.
So I bought a couple of Longan Nano’s to try after seeing the Demo on Seeed.
I installed Visual Studio Code, of which PlatformIO is a plugin for it.
Then installed PlatformIO, but it won’t run without Python, so I installed it also.
Having never used Python before (Win7 & basic tools only remember)
nothing was working, my setup doesn’t like Python.
So virtually everything in the gd32v Tools and Utils packages was useless to me.
Nothing I had on my machine previously even detected the the Longan Nano
in Boot - DFU mode or otherwise, so without Flashing tools I was at a dead-end.
Then I found something that did ) and in the most unlikely of places.
It was an STM Tool, ’ Flash Loader Demo or Demonstrator ’ I had used the STM-Link
Util and DfuSeDemo many times before but they didn’t even detect the L-Nano.
I was using an FTDI serial dongle (not the USB-C connector) this is the same sort
of thing you would use with an Arduino, I used the 3v3, R0, T0, Gnd pins on the
end, top of the L-Nano board, (not JT pins on the bottom).
Simply connect to the same pins on the FTDI dongle (note: 3v3 not 5v) and use
T0-R0 and R0-T0 changeover between them.
You need to hold the L-Nano Boot button when you plug into the USB for Flashing.
Once inserted you let the button go.
Now I had a Tool that could upload something onto the L-Nano at last.
A very Spartan tool, Select ComX (yours), hit Next, (sees Target) hit Next, shows
memory map, hit Next, Select Download to device, Download from File button, there
are 3 choices of File in a drop-down at bottom, *.s19, *.Hex or *.Bin, select .bin.
Select File (badapple_demo.bin) and upload to the L-Nano, done !
If Flash Loader Demo detects a new COM and you still can’t connect, you may have
to remove - re-insert the USB while holding down the L-nano Boot Button also.
I downloaded the L-Nano Demo ’ badapple_demo.bin ’ from the Sipeed site > Here ~
I Flashed the badapple_demo.bin onto the L-Nano no probs, then put the other two files
logo.bin and bmp.bin onto a small SD Card and inserted it (power off).
Badapple Demo will let you know if the SD Card is missing with an onscreen prompt.
Logo.bin is the Sipeed Logo, bmp.bin holds all of the bmp files for the video.
Badapple Demo was now running.
It would be very useful if Seeed could supply, e.g a two or three frame Video as a raw
file, just to see the actual formatting of how the BMP files are used on the L-Nano.
The suggested Python BMP tools don’t work for me either at the moment, unfortunately.
So now that part was all working, what next ?
As I can’t get PlatformIO working, I wanted to explore the L-Nano a little further.
Just by coincidence there is a little known / used programming language called FORTH.
It’s been around since the 60’s.
Most C, C++ users put their hands over their ears and run away at the mere mention of
it I’ve heard )
It is quite different I will admit, and does take a bit to get used to, quite a bit.
But it is very small and very powerful, if you take the time to learn and use it.
And you don’t need any TOOLs, Forth runs directly off the Chip it is loaded onto.
There is no compiler as such, Forth compiles itself as you go, it’s completely
self contained ’ on Chip '.
Forth comes in many flavors, usually for specific hardware or chips.
As it happens there’s a new (experimental) version called Mecrisp Quintus, just
released that has a specific version for the GD32VF device, support and others also.
There’s even some demo files you can play with on the Terminal. You need a terminal
running (using the same FTDI dongle as above) to communicate and use with FORTH.
It will run standalone once programmed, for advanced users, as there are things
required, like a back door, to resume a Terminal connection etc.
You can upload to the L-Nano (unpacked) mecrisp-quintus-gd32vf103cb.bin, just as above.
There are no Library files like Arduino as such (there’s a couple), you make your
own usually, so it’s bare metal mostly. It may not be for everyone, but I like it.
And I can only get a Blinky running, a smidgen more, while sorting out PlatformIO etc.
Mecrisp Quintus V0.25 on SourceForge here > https://sourceforge.net/projects/mecrisp/files/
If you are not a programmer you will get a blinky (supplied) running fairly easily but
probably not a lot more, but you will get access to all of the other pins / ports if
you feel like experimenting with the GD32VF103 or L-Nano board.
So it would be good to see if anyone else had some other Tools or Methods for
programming this Longan Nano other than the recommended, which may not work
for everyone either.