Eclipse IDE based CORE-V MCU test routines running on FreeRTOS
The Eclipse IDE relies on a larger ecosystem of tools and these instructions assume you are familar enough with the Eclispe IDE environment to make any required configuration changes to the IDE setup.
Downlad and install the approriate corev-gcc toolchain from
https://www.embecosm.com/resources/tool-chain-downloads/#corev
Download and install the Eclipse IoT Embedded CDT IDE (this will eventually be replaced by a pre-configured CORE-V IDE based on the Eclipse IDE tools).
https://projects.eclipse.org/projects/iot.embed-cdt/downloads
Install OpenOCD. Recommend getting it from this location:
https://sourceforge.net/projects/openocd/files/openocd/
Version 0.11.0-rc2 is know to work with this setup.
Installation is accomplished by:
./configure --enable-ftdi && make
sudo make install
NOTE: importing the cli_test project into the IDE does not import the information to launch the debugger, so after importing cli_test, be sure to either import the launch configuration (below in Step 5) or create your own.
1 Launch Eclipse
eclipse
3 Select Import Projects from Git
4 Specify Clone URL
5 Tell Git which repo to use (core-v-mcu-eclipse-cli-test)
6 Select the branch to clone
7 Specify directory for git to use (use the default)
8 Select which Wizard to use for import
9 Tell it which projects to import (cli_test is the only one you need)
10 What you should see after slected 'Finish'
This step pulls in the launch configurations which are configured to use hs2 and OpenOCD. If your hardware setup is different, you can either ignore this step and create your own, or use this step and modify to fit your configuration.
1 Select 'Import...'
2 Select Launch Configurations
13 Browse to the git directory that was chosen as the Local Destination
14 Select launchconfig and cli_test Default
15 Under the 'Run' menu select 'Debug Configurations...'
15 Under 'GDB OpenOCD Debugging' select 'cli_test Default' and then 'Debug'
This should compile, link and load the application and stop at main waiting for you to start debugging.
The intent is to support more than one emulation platform. Currently only one board is supported:
- Nexys A7 100T
Bistreams compatible with the Nexys A7 100T can be found at: http://downloads.openhwgroup.org/
The type and number of peripherals supported are defined by 'pulp_soc_defines.sv'. The information is made available to software applications as a series of #define values in the 'SOC options' section of 'target/core-v-mcu/include/core-v-mcu-config.h'. An example configuration is:
// SOC options
#define N_IO 48 // Total available IO
#define N_SYSIO 3
#define N_GPIO 32
#define N_UART 2 // Number of uarts
#define N_QSPIM 1 // Number of QuadSPI masters
#define N_I2CM 2 // Number of I2C masters
#define N_I2SC 0
#define N_CSI2 0
#define N_HYPER 0
#define N_SDIO 0
#define N_CAM 1
#define N_JTAG 0
#define N_MRAM 0
#define N_FILTER 1
#define N_FPGA 1
#define N_EXT_PER 0
#define N_EFPGA_TCDM_PORTS 4
#define N_FPGAIO 43
#define N_EFPGA_EVENTS 16