Nuclei-Software / nuclei-sdk

Nuclei RISC-V Software Development Kit
https://doc.nucleisys.com/nuclei_sdk
Apache License 2.0
117 stars 50 forks source link

board: Add support for Longan Nano variants (fixes #16) #18

Closed tuupola closed 3 years ago

tuupola commented 3 years ago

Currently there is two known versions of Longan Nano. The official version has GD32VF103CBT6 which has 128kB flash and 32kB sram. Apparently some Aliexpress sellers also make version with GD32VF103C8T6 which has 64kB flash and 20kB sram. This is also sometimes referred as the Longan Nano Lite.

This PR adds a new variable VARIANT which enables user to choose between board variants. When VARIANT is not passed build system assumes the official version of the board.

$ make SOC=gd32vf103 BOARD=gd32vf103c_longan_nano all
$ make SOC=gd32vf103 BOARD=gd32vf103c_longan_nano VARIANT=lite all

This is currently tested only with the official board. I do not have the Lite board available. However linking does fail as expected with when VARIANT=lite is chosen with a memory heavy application.

fanghuaqi commented 3 years ago

Could you also update the related doc here:

You can add description about the lite version board, and how to select this lite version using VARIANT variable.

RomanBuchert commented 3 years ago

I have also a PR for longan nano docs in my local pipeline. May we merge them first to prevent conflicts?

fanghuaqi commented 3 years ago

Hi @RomanBuchert ,OK, waiting for @tuupola to add one line for VARIANT variable declaration.

Thanks Huaqi

tuupola commented 3 years ago

Added some basic docs for the VARIANT variable.

fanghuaqi commented 3 years ago

@tuupola Could you make a force push(git push -f) to the branch to avoid merge commit.

You can run following commands:

git reset --hard c9c08ee
git pull --rebase upstream master
git cherry-pick 04b1bba

The upstream changed to your remote name for this upstream repo

Thanks Huaqi

tuupola commented 3 years ago

@fanghuaqi Done.

fanghuaqi commented 3 years ago

Hi @tuupola @RomanBuchert , I just released platform-nuclei 1.0.11 using nuclei-sdk 0.3.0 release, which introduced support for gd32vf103c_longan_nano board support, if you like to take a try with it, it could be a good choice, and also in our new Nuclei Studio IDE(will be released soon), this new board will also be support.

Thanks Huaqi