-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged miv-watchdog source code version 2.0.120
- Loading branch information
Showing
43 changed files
with
8,833 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.settings/ | ||
/Debug/ | ||
/Release/ | ||
/miv32imc-Debug/ | ||
/miv32imc-Release/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>miv-rv32-wdog</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
<triggers>clean,full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
<triggers>full,incremental,</triggers> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.cdt.core.cnature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
</natures> | ||
<variableList> | ||
<variable> | ||
<name>PLATFORM_LOC</name> | ||
<value>$%7BPARENT-1-PROJECT_LOC%7D/platform</value> | ||
</variable> | ||
<variable> | ||
<name>PLATFORM_LOC1</name> | ||
<value>$%7BPARENT-3-ECLIPSE_HOME%7D/BB5/g/new/mss-i2c-examples/myprojects/miv_rv32/platform</value> | ||
</variable> | ||
</variableList> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# MIV Watchdog Example | ||
|
||
This project demonstrates the Mi-V Soft IP WDOG module functionality, which is delivered as a | ||
part of MIV Extended Sub System(MIV_ESS). | ||
This project will perform the watchdog configurations, the time-out interrupt and the | ||
Maximum Value up to which Refresh is Permitted (MVRP) interrupt and their handling. | ||
|
||
The MIV ESS Core generates MVRP_IRQ and WDOG_IRQ interrupts which can be connected | ||
to any of the external interrupt pins on the MIV_RV32. The application developer | ||
will have to handle these interrupts in the respective interrupt handlers. | ||
|
||
There are 2 different build configurations provided with this project which configure | ||
this SoftConsole project for RISC-V IMC instruction extension. | ||
The Following configurations are provided with the example. | ||
- miv32imc-Debug | ||
- miv32imc-Release | ||
|
||
To use this project, configure the COM port interface1 as below: | ||
- 115200 baud | ||
- 8 data bits | ||
- 1 stop bit | ||
- no parity | ||
- no flow control | ||
|
||
## fpga_design_config (formerly known as hw_config.h) | ||
The SoftConsole project targeted for Mi-V processors now use an improved | ||
directory structure. Detailed description of the folder structure is available | ||
at https://github.com/Mi-V-Soft-RISC-V/miv-rv32-documentation. | ||
The fpga_design_config.h must be stored as shown below | ||
|
||
` | ||
<project-root>/boards/<board-name>/fpga_design_config/fpga_design_config.h | ||
` | ||
|
||
Currently, this file must be hand crafted when using the Mi-V Soft Processor. | ||
In future, all the design and soft IP configurations will be automatically | ||
generated from the Libero design description data. | ||
|
||
You can use the sample file provided with MIV_RV32 HAL as an example. | ||
Rename it from sample_fpga_design_config.h to fpga_design_config.h and then | ||
customize it per your hardware design such as SYS_CLK_FREQ, peripheral | ||
BASE addresses, interrupt numbers, definition of MSCC_STDIO_UART_BASE_ADDR if | ||
you want a CoreUARTapb mapped to STDIO, etc. | ||
|
||
## Linker script changes | ||
|
||
You must make sure that in addition to the reset vector, all other memory address | ||
configurations in the Mi-V soft processor match with the memory layout defined | ||
in the linker script. | ||
|
||
## Target hardware | ||
This project is tested on PolarFire Eval Kit with MIV_RV32 Core. | ||
Libero example/job URL here: | ||
https://mi-v-soft-risc-v.github.io/PolarFire-Eval-Kit/ | ||
|
||
## Mi-V soft processor revision dependencies | ||
This project is tested with MIV_RV32 v3.0 |
59 changes: 59 additions & 0 deletions
59
driver-examples/miv-watchdog/miv-rv32-wdog/miv-rv32-wdog hw attach.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.openocd.launchConfigurationType"> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doContinue" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doDebugInRam" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doFirstReset" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateConsole" value="true"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateTelnetConsole" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doSecondReset" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbCLient" value="true"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbServer" value="true"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.enableSemihosting" value="false"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.firstResetType" value="init"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherCommands" value="set $target_riscv = 1 set mem inaccessible-by-default off set arch riscv:rv32 file ${config_name:miv-rv32-wdog}/miv-rv32-wdog.elf"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherOptions" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerConnectionAddress" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerExecutable" value="${openocd_path}/${openocd_executable}"/> | ||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerGdbPortNumber" value="3333"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerLog" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerOther" value="--file board/microsemi-riscv.cfg"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTclPortNumber" value="6666"/> | ||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTelnetPortNumber" value="4444"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherInitCommands" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherRunCommands" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.secondResetType" value="halt"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.svdPath" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU MCU OpenOCD"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/> | ||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="3333"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="false"/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/> | ||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${cross_prefix}gdb${cross_suffix}"/> | ||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/> | ||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/> | ||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="${config_name:miv-rv32-wdog}/miv-rv32-wdog.elf"/> | ||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="miv-rv32-wdog"/> | ||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/> | ||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/miv-rv32-wdog"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="4"/> | ||
</listAttribute> | ||
</launchConfiguration> |
61 changes: 61 additions & 0 deletions
61
driver-examples/miv-watchdog/miv-rv32-wdog/miv-rv32-wdog hw debug.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="ilg.gnumcueclipse.debug.gdbjtag.openocd.launchConfigurationType"> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doContinue" value="true"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doDebugInRam" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doFirstReset" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateConsole" value="true"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doGdbServerAllocateTelnetConsole" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doSecondReset" value="false"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbCLient" value="true"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.doStartGdbServer" value="true"/> | ||
<booleanAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.enableSemihosting" value="false"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.firstResetType" value="init"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherCommands" value="set $target_riscv = 1 set mem inaccessible-by-default off set arch riscv:rv32 file ${config_name:miv-rv32-wdog}/miv-rv32-wdog.elf"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbClientOtherOptions" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerConnectionAddress" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerExecutable" value="${openocd_path}/${openocd_executable}"/> | ||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerGdbPortNumber" value="3333"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerLog" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerOther" value="--file board/microsemi-riscv.cfg"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTclPortNumber" value="6666"/> | ||
<intAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.gdbServerTelnetPortNumber" value="4444"/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherInitCommands" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.otherRunCommands" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.openocd.secondResetType" value=""/> | ||
<stringAttribute key="ilg.gnumcueclipse.debug.gdbjtag.svdPath" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="GNU MCU OpenOCD"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/> | ||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="3333"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/> | ||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/> | ||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="${cross_prefix}gdb${cross_suffix}"/> | ||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/> | ||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/> | ||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/> | ||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="${config_name:miv-rv32-wdog}/miv-rv32-wdog.elf"/> | ||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="miv-rv32-wdog"/> | ||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/> | ||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/miv-rv32-wdog"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="4"/> | ||
</listAttribute> | ||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="Context string"/> "/> | ||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/> | ||
</launchConfiguration> |
Oops, something went wrong.