Skip to content

Commit

Permalink
Squashed 'applications/' changes from e2a7298..4fb83f0
Browse files Browse the repository at this point in the history
4fb83f0 Merged freertos source code version 2.2.101.
7d1f76a Squashed 'freertos/' changes from f913d08..900e558

git-subtree-dir: applications
git-subtree-split: 4fb83f0960e642f8588eee0f973065aa9772d961
  • Loading branch information
aakash-mchp committed Jul 19, 2023
1 parent 4f72353 commit 5ad51eb
Show file tree
Hide file tree
Showing 48 changed files with 12,889 additions and 2,178 deletions.
3 changes: 2 additions & 1 deletion freertos/miv-rv32-freertos-demo/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.noinlinefunctions.1322946455" name="Do not inline functions (-fno-inline-functions)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.noinlinefunctions" useByScannerDiscovery="true" value="false" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.nobuiltin.1525203912" name="Disable builtin (-fno-builtin)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.nobuiltin" useByScannerDiscovery="true" value="false" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.align.1032385208" name="Align" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.align" useByScannerDiscovery="false" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.align.strict" valueType="enumerated"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed.1618412863" name="Compressed extension (RVC)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed" useByScannerDiscovery="false" value="true" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed.1618412863" name="Compressed extension (RVC)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic.1850544898" name="Atomic extension (RVA)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic" useByScannerDiscovery="false" value="false" valueType="boolean"/>
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1851994667" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
<builder buildPath="${workspace_loc:/miv-rv32im-freertos-port-test}/Debug" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.1748717066" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
Expand All @@ -63,6 +63,7 @@
<tool command="${cross_prefix}${cross_c}${cross_suffix}" commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GCCErrorParser" id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.894708922" name="GNU RISC-V Cross C Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler">
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths.1818715770" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/application}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platform/hal}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/platform}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/boards/avalanche-board/miv-rv32-design}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src/freertos-source/common/include}&quot;"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
/***************************************************************************//**
* Copyright 2022 Microchip FPGA Embedded Systems Solutions.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @file core10gbasekr_phy_sw_cfg.h
* @author Microchip FPGA Embedded Systems Solutions
* @brief PHY software configuration
*
*/

#ifndef BOARDS_POLARFIRE_EVAL_KIT_PLATFORM_CONFIG_DRIVER_CONFIG_PHY_SW_CFG_H_
#define BOARDS_POLARFIRE_EVAL_KIT_PLATFORM_CONFIG_DRIVER_CONFIG_PHY_SW_CFG_H_

#ifdef __cplusplus
extern "C" {
#endif

/***************************************************************************//**
* Driver versioning macros.
*/
#define CORE_VENDOR "Microchip"
#define CORE_LIBRARY "Firmware"
#define CORE_NAME "Core10GBaseKR_PHY_Driver"
#define CORE_VERSION "x.x.x"

/***************************************************************************//**
* Supported PHY models, used to control compile time inclusion of the
* associated PHY sub-drivers.
*/
#define CORE10GBASEKR_PHY
#define PF_XCVR_C10GB

/***************************************************************************//**
* Define this macro to enable performance messages in the application.
*/
#undef C10GBKR_PERFORMANCE_MESSAGES

/***************************************************************************//**
* User config options for overriding driver defaults of Core10GBaseKR_PHY
*
* These definitions can be overridden by defining the macro and assigning the
* desired value.
*/
#ifdef CORE10GBASEKR_PHY

/* Main tap limits */
#undef C10GBKR_LT_MAIN_TAP_MAX_LIMIT
#undef C10GBKR_LT_MAIN_TAP_MIN_LIMIT

/* Post tap limits */
#undef C10GBKR_LT_POST_TAP_MAX_LIMIT
#undef C10GBKR_LT_POST_TAP_MIN_LIMIT

/* Pre tap limits */
#undef C10GBKR_LT_PRE_TAP_MAX_LIMIT
#undef C10GBKR_LT_PRE_TAP_MIN_LIMIT

/* Request to be sent to Link Partner
0U => Preset
1U => Initialize
*/
#undef C10GBKR_LT_INITIAL_REQUEST

#undef C10GBKR_LT_INITIALIZE_MAIN_TAP
#undef C10GBKR_LT_INITIALIZE_POST_TAP
#undef C10GBKR_LT_INITIALIZE_PRE_TAP

/***************************************************************************//**
Override XCVR configurations
*/
#undef PF_XCVR_C10GB_REG_VAL_SER_DRV_CTRL
#undef PF_XCVR_C10GB_REG_VAL_SER_DRV_DATA_CTRL
#undef PF_XCVR_C10GB_REG_VAL_SER_DRV_CTRL_SEL
#undef PF_XCVR_C10GB_REG_VAL_DES_DFE_CAL_CTRL_0
#undef PF_XCVR_C10GB_REG_VAL_DES_DFE_CAL_CTRL_1
#undef PF_XCVR_C10GB_REG_VAL_DES_DFE_CAL_CTRL_2
#undef PF_XCVR_C10GB_REG_VAL_DES_DFE_CAL_CMD
#undef PF_XCVR_C10GB_REG_VAL_SER_RTL_CTRL
#undef PF_XCVR_C10GB_REG_VAL_DES_CDR_CTRL_2
#undef PF_XCVR_C10GB_REG_VAL_DES_CDR_CTRL_3
#undef PF_XCVR_C10GB_REG_VAL_DES_DFEEM_CTRL_1
#undef PF_XCVR_C10GB_REG_VAL_DES_DFEEM_CTRL_2
#undef PF_XCVR_C10GB_REG_VAL_DES_DFEEM_CTRL_3
#undef PF_XCVR_C10GB_REG_VAL_DES_DFE_CTRL_2
#undef PF_XCVR_C10GB_REG_VAL_DES_EM_CTRL_2

/***************************************************************************//**
Override Auto-Negotiation data rate configurations
*/
#undef PF_XCVR_C10GB_AN_CFG_DES_RXPLL_DIV
#undef PF_XCVR_C10GB_AN_CFG_PMA_DES_RSTPD_POWER_DOWN
#undef PF_XCVR_C10GB_AN_CFG_PMA_SERDES_RTL_CTRL
#undef PF_XCVR_C10GB_AN_CFG_PMA_DES_RTL_LOCK_CTRL
#undef PF_XCVR_C10GB_AN_CFG_PMA_DES_RSTPD_POWER_UP
#undef PF_XCVR_C10GB_AN_CFG_PCS_LRST_R0_RESET_ASSERT
#undef PF_XCVR_C10GB_AN_CFG_PCS_LRST_R0_RESET_DEASSERT


/***************************************************************************//**
Override Link Training data rate configurations
*/
#undef PF_XCVR_C10GB_LT_CFG_PMA_DES_RSTPD_POWER_DOWN
#undef PF_XCVR_C10GB_LT_CFG_PMA_DES_RSTPD_POWER_UP
#undef PF_XCVR_C10GB_LT_CFG_DES_RXPLL_DIV
#undef PF_XCVR_C10GB_LT_CFG_PMA_SERDES_RTL_CTRL
#undef PF_XCVR_C10GB_LT_CFG_PMA_DES_DFE_CAL_BYPASS
#undef PF_XCVR_C10GB_LT_CFG_PCS_LRST_R0_RESET_ASSERT
#undef PF_XCVR_C10GB_LT_CFG_PCS_LRST_R0_RESET_DEASSERT

#endif /* CORE10GBASEKR_PHY */

#ifdef __cplusplus
}
#endif


#endif /* BOARDS_POLARFIRE_EVAL_KIT_PLATFORM_CONFIG_DRIVER_CONFIG_PHY_SW_CFG_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ ENTRY(_start)

MEMORY
{
ram (rwx) : ORIGIN = 0x80000000, LENGTH = 256k
ram (rwx) : ORIGIN = 0x80000000, LENGTH = 512k
}

STACK_SIZE = 2k; /* needs to be calculated for your application */
HEAP_SIZE = 4; /* needs to be calculated for your application */
HEAP_SIZE = 4k; /* needs to be calculated for your application */

SECTIONS
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ definitions. */
.extern uxTimerIncrementsForOneTick /* size_t type so 32-bit on 32-bit core and 64-bits on 64-bit core. */
.extern xISRStackTop
.extern portasmHANDLE_INTERRUPT
.extern freeRTOS_trap_jump

/*-----------------------------------------------------------*/

Expand Down Expand Up @@ -401,7 +402,7 @@ xPortStartFirstTask:
/* If there is a clint then interrupts can branch directly to the FreeRTOS
trap handler. Otherwise the interrupt controller will need to be configured
outside of this file. */
la t0, freertos_risc_v_trap_handler
la t0, freeRTOS_trap_jump
csrw mtvec, t0
#endif /* portasmHAS_CLILNT */

Expand Down
27 changes: 27 additions & 0 deletions freertos/miv-rv32-freertos-demo/src/platform/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Mi-V soft processor platform source code

## Repo organization

```
<platform>
|
|-- drivers
| |- fpga_ip
| | | CoreGPIO
| | | CoreSysServices_PF
| | | CoreUARTapb
| |
| |- off_chip
| | | .
| | | .
| |
|-- hal
| |
|-- miv_rv32_hal
```

The drivers published here are compatible with the improved SoftConsole project folder structure being used in the latest [example projects](https://github.com/Mi-V-Soft-RISC-V/miv-rv32-bare-metal-examples).
These drivers can also be used with the legacy folder structure (projects released via Firmware Catalog) by defining the **LEGACY_DIR_STRUCTURE** macro in the SoftConsole project settings.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@Library('automated-testing-library') _
pipelineSoftIPSrc()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Core10GBASEKR_PHY Source
Loading

0 comments on commit 5ad51eb

Please sign in to comment.