The Icicle Kit does not provide (on-board) NAND Flash by default and therefore requires additional hardware, shown here:
Little Wing
is an extension board-set, composed of two separate units:
- MIKROE (interface board) PI 3 Click Shield
- MIKROE FLASH 5 Click: (1G-bit) Serial SLC NAND Flash Memory from Winbond
Note: These two boards are purchased separtely from the Icicle Kit.
- Requirements
- Setup
- Build Yocto Image
- Build HSS - First Pass
- Build HSS - Second Pass
- Program QSPI
- References
- Polarfire SoC Icicle Kit
- PI 3 Click Shield
- FLASH 5 Click: (1G-bit) Serial SLC NAND Flash Memory from Winbond
- x3 micro-USB Cables
- Window Host Computer
- Linux Host Computer
This project was tested using using:
- Windows 10 host (Libero and Softconsole)
- Linux Host
Ubuntu 22.04.3 LTS
(Yocto)
Connect up the hardware as shown.
Icicle-Kit Power ==
OFF
Depending on your Linux-Host PC, this step can take anywhere from 1 to 4 hours to complete.
- Building Yocto Linux for NAND flash
Follow the steps found here for Meta-Polarfire-SOC-Yocto-BSP (GitHub): https://github.com/polarfire-soc/meta-polarfire-soc-yocto-bsp
Basic summary of steps on a Linux Host.
Note: This was tested using: Ubuntu 22.04.3 LTS
mkdir yocto-dev && cd yocto-dev
repo init -u https://github.com/polarfire-soc/polarfire-soc-yocto-manifests.git -b main -m default.xml
repo sync
repo rebase
source ./meta-polarfire-soc-yocto-bsp/polarfire-soc_yocto_setup.sh
MACHINE=icicle-kit-es-nand bitbake core-image-minimal-mtdutils
The output folder can be found here:
../build/tmp-glibc/deploy/images/icicle-kit-es-nand/
In this folder, the required file to be used in step n
is:
core-image-minimal-mtdutils-icicle-kit-es-nand.nand.mtdimg
- Windows 10 Host
- SoftConsole v2022.2+
HSS is the first stage bootloader for the PolarFire SOC. It was tested using SoftConsole V2022.2 on a Windows 10 Host PC. Familiarity with Softconsole is assumed.
-
Download HSS: https://github.com/polarfire-soc/hart-software-services
-
Create an empty directory:
sc_littleWing
-
Open SoftConsole and use this new directory (
sc_littleWing
)- Dialog box: Do you want to create a new workspace? [OK]
-
(SoftConsole Menu) File->Import
- Existing Projects into Workspace (Next).
- Select root directory: ..\hart-software-services-master
- search for nested projects
- Copy projects into workspace
- Finish
-
Sanity check:
Build Project
Takes ~ 3-to-5 minutes
Build Finished. 0 errors, 0 warnings
- Open in Editor: ..\sc_littleWing\hart-software-services\envm-wrapper\
Makefile
- Change line #90 (removing the argument
--dryrun
)
FROM: $(call common-boot-mode-programmer,--dryrun,`basename $@`)
TO: $(call common-boot-mode-programmer,`basename $@`)
- (SoftConsole Menu) Project -> Properties ->
softconsole ->
Properties ->
c/c++ build->behavior->
[x] clean 'distclean'
[Apply and Close]
Now the project will use distclean
instead of 'clean' (avoid clean & build errors)
- RUN Clean Project (Build Finished. 0 errors, 0 warnings.)
Connect the Icicle Kit, J33 and J11, USB to the Host Computer.
- Power Switch ==
Off
- Open x2 Serial port terminals (TeraTerm), 115K/n/8/1, on the Host Computer
1. Silicon Labs Quad CP2108 USB to UART Bridge Interface 0
2. Silicon Labs Quad CP2108 USB to UART Bridge Interface 1
-
Power Switch ==
On
-
(SoftConsole) "Build Project"
Note: In this step, eNVM is automatically programmed with the first stage bootloader, HSS.
OUTPUT WINDOW in SoftConsole shows ...
:
INFO - Generating BIN file...
INFO - Generating header...
INFO - Generating HEX file...
INFO - Preparing for bitstream generation...
INFO - Generating bitstream...
INFO - Programming the target...
INFO - mpfsBootmodeProgrammer completed successfully.
text data bss dec hex filename
99812 416 149632 249860 3d004 Default/hss-envm-wrapper.elf
Build Finished. 0 errors, 0 warnings. (took 1m:15s.743ms)
The Icicle Kit initial preparation is complete
- Windows 10 Host using WSL
OR
Linux Host
The existing HSS project needs to be modified to allow booting from NAND flash (this is not enabled by default). This can't be accomplished using SoftConsole and needs to be done using Linux or WSL.
Example using WSL (on Windows):
- In a WSL window, Navigate to project
/sc_littleWing/hart-software-services
, at the command prompt$
, type :
make BOARD=mpfs-icicle-kit-es config
This opens a text based GUI program. Make this change to enable booting from QSPI.
services->
[*] Boot from QSPI NAND flash support
-> QSPI -> QSPI Driver (Windbond W25N01GV)->
(X) Windbond W25N01GV
From here, navigate QSP --->
to get to ..
ESC
all the way back and [Y] to SAVE CONFIGURATION
Note: a new ".config"
is created at the base project level.
Hint if you can't see
.config
in your SoftConsole Projects Window: --> Filter -> uncheck[] .* resources
- Clean Project
- Power Switch ==
On
- Build Project - Icicle Kit eNVM is also (automatically) programmed with the new HSS.
TODO - Add description to program/verify QSPI
- Polarfire Documentation: HOW-TO
Booting-from-qspi
https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/how-to/booting-from-qspi.md