diff --git a/README.md b/README.md index d690cc5ecc7f3bc642fc006fbd6acd7cb716bb60..fdfa301b449469a16c05c78b10af37d280626374 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,18 @@ 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 +Mainly you will need to run + +```console +sudo apt update +sudo apt install git cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential libstdc++-arm-none-eabi-newlib +``` + +Then download this repository with + +```console +git clone --recurse-submodules https://git.soton.ac.uk/soclabs/nanosoc-testboard-sdk.git +``` ## Debug Probe The RP2040 debugger is setup with the default configuration. The pinout is: @@ -50,6 +62,39 @@ Add any code/libraries you need and then to make this code, go to the build dire You can also add the -jX directive to make to run X jobs in parrallel to speed up compilation. +# Building C/C++ code +For first time build run the following: + +```console +cd nanosoc_board/C_Cxx +mkdir build +cd build +cmake .. +``` + +This will create the overall build space environment. To then build a test run + +```console +make testname +``` + +i.e. to build hello_world_screen +```console +make hello_world_screen +``` + +To run the build process on X cores run: +```console +make -jX hello_world_screen +``` + +# Downloading Code to RP2040 +Connect the USB-C connector to your PC. Turn on the board whilst holding down the BOOT-2 button. + +The RP2040 device should be automatically reckognised and will open a file explorer window. You can then copy the .uf2 file to the device. Once transfer is complete, it should automatically reset the device and start running the code. + +Once the device is powered on, you should be able to reconnect the USB by holding the BOOT-2 button, whilst pressing and releasing the RST-2 button. + ## NanoSoC Development ## Setup Keil uVision for nanosoc