NanoSoC Testboard SDK
The nanoSoC testboard has 3 seperate processors on board, 2x RP2040s and the custom nanoSoC ASIC. This repository contains all that is needed for the development of these 3 processors
nanosoc_board contains files for development of the main RP2040 driver chip on the nanosoc testboard. nanosoc_board/C_Cxx contains all the C/C++ code to run, as well as libraries needed.
nanosoc_chip contains files for development of nanosoc software. In examples you will find some example code with corresponding Keil uVision projects.
prebuild_debugprobe contains a prebuilt image for the on board RP2040 serial wire debugger.
Prerequisites
You will need installations of Keil uVision (we recommend v5.39).
If using windows we also recommend you follow the steps found here https://learn.pimoroni.com/article/pico-development-using-wsl This will enable C/C++ development for the RP2040 driver chip
Debug Probe
The RP2040 debugger is setup with the default configuration. The pinout is:
- SWCLK - GPIO 2
- SWDIO - GPIO 3
- UART Tx - GPIO 4
- UART Rx - GPIO 5
You can build this from source but there is also a prebuilt .uf2 image in the prebuild_debugprobe directory (currently release 2.0.1)
RP2040 Driver chip development
The examples that use the SD card assume that any programs are hex files with an 8x1 format (i.e. 1 byte on each line) and are placed in the 'programs' directory.
It also assumes any data to be transfered to nanoSoC is in the 'data' directory.
Feature list
- Control nanoSoC reset and clock frequency
- Read stdio from nanoSoC over FT1248 interface
- Write over FT1248 to nanoSoC
- Program nanoSoC from RP2040
- Console to screen using STDIO from nanosoc
- Read voltage, current and power from power monitors
- Demo template including programming, console, demo and power screens
Add Your own C/C++ code
To add your own code, make a directory in the C_Cxx directory for your project, and within that make a CMakeLists.txt, you can use one of the example codes to base this file off.
Next edit the CMakeLists.txt in the C_Cxx directory to add "add_subdirectory(x)" where x is the name of your code directory. This lets cmake know where to find your files.
Add any code/libraries you need and then to make this code, go to the build directory in C_Cxx, and run make "your_project_name"
You can also add the -jX directive to make to run X jobs in parrallel to speed up compilation.
NanoSoC Development
Setup Keil uVision for nanosoc
Install uVision by following instructions from Arm Copy the SL Nanosoc (found in nanosoc_chip) directory to you $(Keil install directory)/ARM/Flash directory. Now when you create a project, you can go to Flash>Configure Flash tools. next to -- Use Debug Driver -- select settings. On this page select Add and look for the "NanoSoC (16kB) Flash" - click Add Make sure address range is 20000000H - 20000FFFH