mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-02 14:23:19 +08:00
[bsp][renesas] Add a new BSP: RZN2L-RSK
This commit is contained in:
@@ -234,6 +234,7 @@ jobs:
|
||||
- "renesas/ra8d1-ek"
|
||||
- "renesas/ra8d1-vision-board"
|
||||
- "renesas/rzt2m_rsk"
|
||||
- "renesas/rzn2l_rsk"
|
||||
- "frdm-k64f"
|
||||
- "xplorer4330/M4"
|
||||
- RTT_BSP: "gd32_n32_apm32"
|
||||
|
||||
@@ -19,7 +19,9 @@ RA 系列 BSP 目前支持情况如下表所示:
|
||||
| [ra8m1-ek](ra8m1-ek) | Renesas 官方 EK-RA8M1 开发板 |
|
||||
| [ra8d1-ek](ra8d1-ek) | Renesas 官方 EK-RA8D1 开发板 |
|
||||
| [ra8d1-vision-board](ra8d1-vision-board) | Renesas 联合 RT-Thread RA8D1-Vision-Board 开发板 |
|
||||
| **RZ 系列** | |
|
||||
| [rzt2m_rsk](rzt2m_rsk) | Renesas 官方 RSK-RZT2M 开发板 |
|
||||
| [rzn2l_rsk](rzn2l_rsk) | Renesas 官方 RSK-RZN2L 开发板 |
|
||||
|
||||
可以通过阅读相应 BSP 下的 README 来快速上手,如果想要使用 BSP 更多功能可参考 docs 文件夹下提供的说明文档,如下表所示:
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<ddscApi/>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<azone>
|
||||
<rzone name="R9A07G084M04GBG.rzone"/>
|
||||
</azone>
|
||||
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<raConfiguration version="9">
|
||||
<generalSettings>
|
||||
<option key="#Board#" value="board.rzn2lrsk.xspi0_x1"/>
|
||||
<option key="CPU" value="RZN2L"/>
|
||||
<option key="Core" value="CR52_0"/>
|
||||
<option key="#TargetName#" value="R9A07G084M04GBG"/>
|
||||
<option key="#TargetARCHITECTURE#" value="cortex-r52"/>
|
||||
<option key="#DeviceCommand#" value="R9A07G084M04"/>
|
||||
<option key="#RTOS#" value="_none"/>
|
||||
<option key="#pinconfiguration#" value="R9A07G084M04GBG.pincfg"/>
|
||||
<option key="#FSPVersion#" value="2.0.0"/>
|
||||
<option key="#ConfigurationFragments#" value="Renesas##BSP##Board##rzn2l_rsk##xspi0_x1_boot"/>
|
||||
<option key="#SELECTED_TOOLCHAIN#" value="iar.arm.toolchain"/>
|
||||
</generalSettings>
|
||||
<raBspConfiguration/>
|
||||
<raClockConfiguration>
|
||||
<node id="board.clock.main.freq" option="board.clock.main.freq.25m"/>
|
||||
<node id="board.clock.loco.enable" option="board.clock.loco.enable.enabled"/>
|
||||
<node id="board.clock.pll0.display" option="board.clock.pll0.display.value"/>
|
||||
<node id="board.clock.pll1" option="board.clock.pll1.initial"/>
|
||||
<node id="board.clock.pll1.display" option="board.clock.pll1.display.value"/>
|
||||
<node id="board.clock.ethernet.source" option="board.clock.ethernet.source.main"/>
|
||||
<node id="board.clock.reference.display" option="board.clock.reference.display.value"/>
|
||||
<node id="board.clock.loco.freq" option="board.clock.loco.freq.240k"/>
|
||||
<node id="board.clock.clma0.enable" option="board.clock.clma0.enable.enabled"/>
|
||||
<node id="board.clock.clma0.error" option="board.clock.clma0.error.not_mask"/>
|
||||
<node id="board.clock.clma3.error" option="board.clock.clma3.error.not_mask"/>
|
||||
<node id="board.clock.clma1.error" option="board.clock.clma1.error.mask"/>
|
||||
<node id="board.clock.clma3.enable" option="board.clock.clma3.enable.enabled"/>
|
||||
<node id="board.clock.clma1.enable" option="board.clock.clma1.enable.enabled"/>
|
||||
<node id="board.clock.clma2.enable" option="board.clock.clma2.enable.enabled"/>
|
||||
<node id="board.clock.clma0.cmpl" mul="1" option="_edit"/>
|
||||
<node id="board.clock.clma1.cmpl" mul="1" option="_edit"/>
|
||||
<node id="board.clock.clma2.cmpl" mul="1" option="_edit"/>
|
||||
<node id="board.clock.clma3.cmpl" mul="1" option="_edit"/>
|
||||
<node id="board.clock.alternative.source" option="board.clock.alternative.source.loco"/>
|
||||
<node id="board.clock.clma0.cmph" mul="1023" option="_edit"/>
|
||||
<node id="board.clock.clma1.cmph" mul="1023" option="_edit"/>
|
||||
<node id="board.clock.clma2.cmph" mul="1023" option="_edit"/>
|
||||
<node id="board.clock.clma3.cmph" mul="1023" option="_edit"/>
|
||||
<node id="board.clock.iclk.freq" option="board.clock.iclk.freq.200m"/>
|
||||
<node id="board.clock.cpu0clk.mul" option="board.clock.cpu0clk.mul.2"/>
|
||||
<node id="board.clock.cpu0clk.display" option="board.clock.cpu0clk.display.value"/>
|
||||
<node id="board.clock.ckio.div" option="board.clock.ckio.div.4"/>
|
||||
<node id="board.clock.ckio.display" option="board.clock.ckio.display.value"/>
|
||||
<node id="board.clock.sci0asyncclk.sel" option="board.clock.sci0asyncclk.sel.1"/>
|
||||
<node id="board.clock.sci1asyncclk.sel" option="board.clock.sci1asyncclk.sel.1"/>
|
||||
<node id="board.clock.sci2asyncclk.sel" option="board.clock.sci2asyncclk.sel.1"/>
|
||||
<node id="board.clock.sci3asyncclk.sel" option="board.clock.sci3asyncclk.sel.1"/>
|
||||
<node id="board.clock.sci4asyncclk.sel" option="board.clock.sci4asyncclk.sel.1"/>
|
||||
<node id="board.clock.sci5asyncclk.sel" option="board.clock.sci5asyncclk.sel.1"/>
|
||||
<node id="board.clock.spi0asyncclk.sel" option="board.clock.spi0asyncclk.sel.1"/>
|
||||
<node id="board.clock.spi1asyncclk.sel" option="board.clock.spi1asyncclk.sel.1"/>
|
||||
<node id="board.clock.spi2asyncclk.sel" option="board.clock.spi2asyncclk.sel.1"/>
|
||||
<node id="board.clock.spi3asyncclk.sel" option="board.clock.spi3asyncclk.sel.1"/>
|
||||
<node id="board.clock.pclkshost.display" option="board.clock.pclkshost.display.value"/>
|
||||
<node id="board.clock.pclkgptl.display" option="board.clock.pclkgptl.display.value"/>
|
||||
<node id="board.clock.pclkh.display" option="board.clock.pclkh.display.value"/>
|
||||
<node id="board.clock.pclkm.display" option="board.clock.pclkm.display.value"/>
|
||||
<node id="board.clock.pclkl.display" option="board.clock.pclkl.display.value"/>
|
||||
<node id="board.clock.pclkadc.display" option="board.clock.pclkadc.display.value"/>
|
||||
<node id="board.clock.pclkcan.freq" option="board.clock.pclkcan.freq.40m"/>
|
||||
<node id="board.clock.xspi.clk0.freq" option="board.clock.xspi.clk0.freq.12m"/>
|
||||
<node id="board.clock.xspi.clk1.freq" option="board.clock.xspi.clk1.freq.12m"/>
|
||||
<node id="board.clock.tclk.freq" option="board.clock.tclk.freq.100m"/>
|
||||
</raClockConfiguration>
|
||||
<raPinConfiguration>
|
||||
<pincfg active="true" name="" symbol="">
|
||||
<configSetting altId="canfd0.canrx0.p01_7" configurationId="canfd0.canrx0"/>
|
||||
<configSetting altId="canfd0.cantx0.p02_2" configurationId="canfd0.cantx0"/>
|
||||
<configSetting altId="ether_gmac.gmac_mdc.p08_7" configurationId="ether_gmac.gmac_mdc"/>
|
||||
<configSetting altId="ether_gmac.gmac_mdio.p09_0" configurationId="ether_gmac.gmac_mdio"/>
|
||||
<configSetting altId="iic0.iic_scl0.p13_2" configurationId="iic0.iic_scl0"/>
|
||||
<configSetting altId="iic0.iic_sda0.p13_3" configurationId="iic0.iic_sda0"/>
|
||||
<configSetting altId="iic1.iic_scl1.p05_2" configurationId="iic1.iic_scl1"/>
|
||||
<configSetting altId="iic1.iic_sda1.p05_3" configurationId="iic1.iic_sda1"/>
|
||||
<configSetting altId="jtag_fslash_swd.tck_swclk.p02_7" configurationId="jtag_fslash_swd.tck_swclk" isUsedByDriver="true"/>
|
||||
<configSetting altId="jtag_fslash_swd.tdi.p02_5" configurationId="jtag_fslash_swd.tdi" isUsedByDriver="true"/>
|
||||
<configSetting altId="jtag_fslash_swd.tdo.p02_4" configurationId="jtag_fslash_swd.tdo" isUsedByDriver="true"/>
|
||||
<configSetting altId="jtag_fslash_swd.tms_swdio.p02_6" configurationId="jtag_fslash_swd.tms_swdio" isUsedByDriver="true"/>
|
||||
<configSetting altId="p03_0.output.low" configurationId="p03_0"/>
|
||||
<configSetting altId="p04_1.output.low" configurationId="p04_1"/>
|
||||
<configSetting altId="p04_4.output.low" configurationId="p04_4"/>
|
||||
<configSetting altId="p05_0.output.low" configurationId="p05_0"/>
|
||||
<configSetting altId="p05_4.input" configurationId="p05_4"/>
|
||||
<configSetting altId="p13_4.output.low" configurationId="p13_4"/>
|
||||
<configSetting altId="p13_5.input" configurationId="p13_5"/>
|
||||
<configSetting altId="p13_6.input" configurationId="p13_6"/>
|
||||
<configSetting altId="p13_7.input" configurationId="p13_7"/>
|
||||
<configSetting altId="p14_0.input" configurationId="p14_0"/>
|
||||
<configSetting altId="p16_3.input" configurationId="p16_3"/>
|
||||
<configSetting altId="p17_3.output.low" configurationId="p17_3"/>
|
||||
<configSetting altId="p18_2.output.low" configurationId="p18_2"/>
|
||||
<configSetting altId="p22_1.output.low" configurationId="p22_1"/>
|
||||
<configSetting altId="p22_3.output.low" configurationId="p22_3"/>
|
||||
<configSetting altId="sci0.rxd_miso0.p16_6" configurationId="sci0.rxd_miso0" isUsedByDriver="true"/>
|
||||
<configSetting altId="sci0.txd_mosi0.p16_5" configurationId="sci0.txd_mosi0" isUsedByDriver="true"/>
|
||||
<configSetting altId="sci3.rxd_miso3.p17_7" configurationId="sci3.rxd_miso3"/>
|
||||
<configSetting altId="sci3.txd_mosi3.p18_0" configurationId="sci3.txd_mosi3"/>
|
||||
<configSetting altId="spi2.spi_miso2.p18_6" configurationId="spi2.spi_miso2"/>
|
||||
<configSetting altId="spi2.spi_mosi2.p18_5" configurationId="spi2.spi_mosi2"/>
|
||||
<configSetting altId="spi2.spi_rspck2.p18_4" configurationId="spi2.spi_rspck2"/>
|
||||
<configSetting altId="spi2.spi_ssl20.p21_1" configurationId="spi2.spi_ssl20"/>
|
||||
<configSetting altId="usb_hs.usb_ovrcur.p17_5" configurationId="usb_hs.usb_ovrcur"/>
|
||||
<configSetting altId="usb_hs.usb_vbusen.p19_0" configurationId="usb_hs.usb_vbusen"/>
|
||||
<configSetting altId="usb_hs.usb_vbusin.p07_4" configurationId="usb_hs.usb_vbusin"/>
|
||||
<configSetting altId="xspi0.xspi0_ckn.p14_5" configurationId="xspi0.xspi0_ckn"/>
|
||||
<configSetting altId="xspi0.xspi0_ckp.p14_6" configurationId="xspi0.xspi0_ckp"/>
|
||||
<configSetting altId="xspi0.xspi0_cs0_hash.p15_7" configurationId="xspi0.xspi0_cs0_hash"/>
|
||||
<configSetting altId="xspi0.xspi0_cs1_hash.p16_0" configurationId="xspi0.xspi0_cs1_hash"/>
|
||||
<configSetting altId="xspi0.xspi0_ds.p14_4" configurationId="xspi0.xspi0_ds"/>
|
||||
<configSetting altId="xspi0.xspi0_ecs0_hash.p14_2" configurationId="xspi0.xspi0_ecs0_hash"/>
|
||||
<configSetting altId="xspi0.xspi0_io0.p14_7" configurationId="xspi0.xspi0_io0"/>
|
||||
<configSetting altId="xspi0.xspi0_io1.p15_0" configurationId="xspi0.xspi0_io1"/>
|
||||
<configSetting altId="xspi0.xspi0_io2.p15_1" configurationId="xspi0.xspi0_io2"/>
|
||||
<configSetting altId="xspi0.xspi0_io3.p15_2" configurationId="xspi0.xspi0_io3"/>
|
||||
<configSetting altId="xspi0.xspi0_io4.p15_3" configurationId="xspi0.xspi0_io4"/>
|
||||
<configSetting altId="xspi0.xspi0_io5.p15_4" configurationId="xspi0.xspi0_io5"/>
|
||||
<configSetting altId="xspi0.xspi0_io6.p15_5" configurationId="xspi0.xspi0_io6"/>
|
||||
<configSetting altId="xspi0.xspi0_io7.p15_6" configurationId="xspi0.xspi0_io7"/>
|
||||
<configSetting altId="xspi0.xspi0_reset0_hash.p16_1" configurationId="xspi0.xspi0_reset0_hash"/>
|
||||
</pincfg>
|
||||
</raPinConfiguration>
|
||||
</raConfiguration>
|
||||
@@ -0,0 +1,24 @@
|
||||
#Sat Sep 14 16:03:03 CST 2024
|
||||
com.renesas.cdt.ddsc.content/com.renesas.cdt.ddsc.content.defaultlinkerscript=script/fsp_xspi0_boot.icf
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#Board\#\#rzn2l_rsk\#\#xspi0_x1_boot\#\#2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Arm\#\#CMSIS\#\#CMSIS5\#\#Core\#\#\#\#5.7.0+renesas.1.fsp.2.0.0/all=1441545198,rzn/arm/CMSIS_5/LICENSE.txt|4247764709,rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_gcc.h|1135074086,rzn/arm/CMSIS_5/CMSIS/Core_R/Include/core_cr52.h|510668081,rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_iccarm.h|4245531541,rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_compiler.h|1887099957,rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_cp15.h|3334069041,rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_version.h
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#rzn2l\#\#device\#\#R9A07G084M04GBG\#\#2.0.0/all=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#Board\#\#rzn2l_rsk\#\#xspi0_x1_boot\#\#2.0.0/all=907937621,script/fsp_xspi0_boot.icf|3822962514,rzn/board/rzn2l_rsk/board_leds.c|358444977,rzn/board/rzn2l_rsk/board_init.c|2067006575,rzn/board/rzn2l_rsk/board.h|736691883,rzn/board/rzn2l_rsk/board_ethernet_phy.h|1631979823,rzn/board/rzn2l_rsk/board_leds.h|1430483072,rzn/board/rzn2l_rsk/board_init.h
|
||||
com.renesas.cdt.ddsc.contentgen.options/options/suppresswarningspaths=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#HAL\ Drivers\#\#all\#\#r_ioport\#\#\#\#2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.threads.configurator/collapse/module.driver.uart_on_sci_uart.86814920=false
|
||||
com.renesas.cdt.ddsc.settingseditor/com.renesas.cdt.ddsc.settingseditor.active_page=SWPConfigurator
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#Common\#\#all\#\#fsp_common\#\#\#\#2.0.0/all=908052335,rzn/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c|3563504244,rzn/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c|870156648,rzn/fsp/src/bsp/cmsis/Device/RENESAS/Source/cr/system_core.c|368480523,rzn/fsp/src/bsp/cmsis/Device/RENESAS/Source/cr/startup_core.c|3243637314,rzn/fsp/src/bsp/cmsis/Device/RENESAS/Include/system.h|1280798555,rzn/fsp/src/bsp/cmsis/Device/RENESAS/Include/renesas.h|3352808441,rzn/fsp/src/bsp/cmsis/Device/RENESAS/Include/R9A07G084.h|1310386533,rzn/fsp/src/bsp/mcu/all/bsp_io.h|3643995939,rzn/fsp/src/bsp/mcu/all/bsp_cache.h|1033616941,rzn/fsp/src/bsp/mcu/all/bsp_register_protection.h|1572168446,rzn/fsp/src/bsp/mcu/all/bsp_io.c|3001342594,rzn/fsp/src/bsp/mcu/all/bsp_common.h|263477342,rzn/fsp/src/bsp/mcu/all/bsp_reset.h|2534029381,rzn/fsp/src/bsp/mcu/all/bsp_module_stop.h|4193244082,rzn/fsp/src/bsp/mcu/all/bsp_irq.h|2136575248,rzn/fsp/src/bsp/mcu/all/bsp_tfu.h|2170977041,rzn/fsp/src/bsp/mcu/all/bsp_delay.c|526389185,rzn/fsp/src/bsp/mcu/all/bsp_compiler_support.h|8162287,rzn/fsp/src/bsp/mcu/all/bsp_clocks.h|3045644015,rzn/fsp/src/bsp/mcu/all/bsp_common.c|1908923075,rzn/fsp/src/bsp/mcu/all/bsp_clocks.c|1289851302,rzn/fsp/src/bsp/mcu/all/bsp_irq.c|358242822,rzn/fsp/src/bsp/mcu/all/bsp_sbrk.c|2321472163,rzn/fsp/src/bsp/mcu/all/bsp_cache.c|225356254,rzn/fsp/src/bsp/mcu/all/bsp_exceptions.h|2518644892,rzn/fsp/src/bsp/mcu/all/bsp_register_protection.c|392613868,rzn/fsp/src/bsp/mcu/all/bsp_reset.c|2238656401,rzn/fsp/src/bsp/mcu/all/bsp_mcu_api.h|1611830052,rzn/fsp/src/bsp/mcu/all/bsp_delay.h|2060190483,rzn/fsp/src/bsp/mcu/all/cr/bsp_cache_core.h|1543064539,rzn/fsp/src/bsp/mcu/all/cr/bsp_delay_core.h|3717942516,rzn/fsp/src/bsp/mcu/all/cr/bsp_cache_core.c|3396795463,rzn/fsp/src/bsp/mcu/all/cr/bsp_irq_core.c|2195931215,rzn/fsp/src/bsp/mcu/all/cr/bsp_delay_core.c|1126344352,rzn/fsp/src/bsp/mcu/all/cr/bsp_irq_core.h|1926319940,rzn/fsp/inc/fsp_features.h|2508067197,rzn/fsp/inc/fsp_version.h|3571247719,rzn/fsp/inc/fsp_common_api.h|3347087544,rzn/fsp/inc/instances/r_ioport.h|1765016794,rzn/fsp/inc/api/bsp_api.h|250199021,rzn/fsp/inc/api/r_ioport_api.h
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#rzn2l\#\#device\#\#R9A07G084M04GBG\#\#2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#rzn2l\#\#fsp\#\#\#\#2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.project.standalone.projectgenerationoptions/isCpp=false
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#all\#\#Memory\#\#\#\#2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#all\#\#Memory\#\#\#\#2.0.0/all=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Arm\#\#CMSIS\#\#CMSIS5\#\#Core\#\#\#\#5.7.0+renesas.1.fsp.2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#HAL\ Drivers\#\#all\#\#r_sci_uart\#\#\#\#2.0.0/all=2921827146,rzn/fsp/src/r_sci_uart/r_sci_uart.c|4093801030,rzn/fsp/inc/instances/r_sci_uart.h|1119704027,rzn/fsp/inc/api/r_uart_api.h|3586794436,rzn/fsp/inc/api/r_transfer_api.h
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#rzn2l\#\#device\#\#\#\#2.0.0/all=3243637314,rzn/fsp/src/bsp/cmsis/Device/RENESAS/Include/system.h
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#rzn2l\#\#device\#\#\#\#2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#rzn2l\#\#fsp\#\#\#\#2.0.0/all=2989202485,rzn/fsp/src/bsp/mcu/rzn2l/bsp_loader_param.c|1967641730,rzn/fsp/src/bsp/mcu/rzn2l/bsp_feature.h|1508541487,rzn/fsp/src/bsp/mcu/rzn2l/bsp_elc.h|1088535767,rzn/fsp/src/bsp/mcu/rzn2l/bsp_irq_sense.c|1458388275,rzn/fsp/src/bsp/mcu/rzn2l/bsp_override.h|617637586,rzn/fsp/src/bsp/mcu/rzn2l/bsp_mcu_info.h
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#HAL\ Drivers\#\#all\#\#r_sci_uart\#\#\#\#2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#Common\#\#all\#\#fsp_common\#\#\#\#2.0.0/libraries=
|
||||
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#HAL\ Drivers\#\#all\#\#r_ioport\#\#\#\#2.0.0/all=615913359,rzn/fsp/src/r_ioport/r_ioport.c|3347087544,rzn/fsp/inc/instances/r_ioport.h|250199021,rzn/fsp/inc/api/r_ioport_api.h
|
||||
@@ -0,0 +1,17 @@
|
||||
mainmenu "RT-Thread Configuration"
|
||||
|
||||
BSP_DIR := .
|
||||
|
||||
RTT_DIR := ../../..
|
||||
|
||||
# you can change the RTT_ROOT default "rt-thread"
|
||||
# example : default "F:/git_repositories/rt-thread"
|
||||
|
||||
PKGS_DIR := packages
|
||||
|
||||
ENV_DIR := /
|
||||
|
||||
source "$(RTT_DIR)/Kconfig"
|
||||
osource "$PKGS_DIR/Kconfig"
|
||||
rsource "../libraries/Kconfig"
|
||||
source "$(BSP_DIR)/board/Kconfig"
|
||||
@@ -0,0 +1,168 @@
|
||||
# Renesas RSK-RZN2L Development Board BSP Documentation
|
||||
|
||||
**English** | [**中文**](./README_zh.md)
|
||||
|
||||
## Introduction
|
||||
|
||||
This document provides the BSP (Board Support Package) for the Renesas RSK-RZN2L development board. By following the Quick Start Guide, developers can quickly get started with the BSP and run RT-Thread on the development board.
|
||||
|
||||
The main contents include:
|
||||
|
||||
- Development Board Introduction
|
||||
- BSP Quick Start Guide
|
||||
|
||||
## Development Board Introduction
|
||||
|
||||
The RSK-RZN2L MCU evaluation board is based on Renesas RZ/N2L and is designed for developing embedded system applications with flexible software package configuration and IDE support.
|
||||
|
||||
The front appearance of the development board is shown below:
|
||||
|
||||

|
||||
|
||||
The commonly used **onboard resources** for this development board are as follows:
|
||||
|
||||
- MPU: R9A07G084M04GBG, maximum operating frequency of 400MHz, Arm® Cortex®-R52 with on-chip FPU (Floating Point Unit) and NEON™, 1.5 MB on-chip SRAM, Ethernet MAC, EtherCAT, USB 2.0 High-Speed, CAN/CANFD, various communication interfaces such as xSPI and ΔΣ interfaces, and security functions.
|
||||
- Debug Interface: Onboard J-Link interface
|
||||
- Expansion Interface: Two PMOD connectors
|
||||
|
||||
**More detailed information and tools**
|
||||
|
||||
## Peripheral Support
|
||||
|
||||
The current peripheral support in this BSP is as follows:
|
||||
|
||||
| **On-chip Peripheral** | **Support Status** | **Remarks** |
|
||||
| :----------------- | :----------------- | :------------- |
|
||||
| UART | Supported | UART0 is the default log output port |
|
||||
| GPIO | Supported | |
|
||||
| HWIMER | Supported | |
|
||||
| IIC | Supported | |
|
||||
| WDT | Supported | |
|
||||
| RTC | Supported | |
|
||||
| ADC | Supported | |
|
||||
| DAC | Supported | |
|
||||
| SPI | Supported | |
|
||||
| FLASH | Supported | |
|
||||
| PWM | Supported | |
|
||||
| CAN | Supported | |
|
||||
| ETH | Supported | |
|
||||
| More updates... | | |
|
||||
|
||||
## Instructions
|
||||
|
||||
The instructions are divided into the following two sections:
|
||||
|
||||
- Quick Start
|
||||
|
||||
This section is for beginners who are new to RT-Thread. By following simple steps, you can run the RT-Thread OS on this development board and observe the experimental results.
|
||||
|
||||
- Advanced Usage
|
||||
|
||||
This section is for developers who want to use more resources on the development board with RT-Thread. Using the ENV tool to configure the BSP, you can enable more onboard resources and achieve more advanced features.
|
||||
|
||||
### Quick Start
|
||||
|
||||
Currently, this BSP only provides an IAR project. Below is an example of how to get the system running using the [IAR Embedded Workbench for Arm](https://www.iar.com/products/architectures/arm/iar-embedded-workbench-for-arm/) development environment.
|
||||
|
||||
**Hardware Connection**
|
||||
|
||||
Connect the development board to the PC using a USB data cable, and use the J-Link interface to download and debug programs.
|
||||
|
||||
**Compilation and Download**
|
||||
|
||||
- Go to the BSP directory, open ENV, and use the command `scons --target=iar` to generate the IAR project.
|
||||
- Compile: Double-click the `project.eww` file to open the IAR project and compile the program.
|
||||
- Debug: Click `Project->Download and Debug` in the IAR toolbar to download and start debugging.
|
||||
|
||||
**View Running Results**
|
||||
|
||||
After successfully downloading the program, the system will run automatically and print system information.
|
||||
|
||||
Connect the corresponding serial port of the development board to the PC. Open the corresponding serial port in a terminal tool (115200-8-1-N). After resetting the device, you can see the RT-Thread output. Enter the `help` command to view the supported commands in the system.
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 5.1.0 build Mar 14 2024 18:26:01
|
||||
2006 - 2024 Copyright by RT-Thread team
|
||||
|
||||
Hello RT-Thread!
|
||||
==================================================
|
||||
This is a iar project which mode is xspi0 execution!
|
||||
==================================================
|
||||
msh >help
|
||||
RT-Thread shell commands:
|
||||
clear - clear the terminal screen
|
||||
version - show RT-Thread version information
|
||||
list - list objects
|
||||
backtrace - print backtrace of a thread
|
||||
help - RT-Thread shell help
|
||||
ps - List threads in the system
|
||||
free - Show the memory usage in the system
|
||||
pin - pin [option]
|
||||
|
||||
msh >
|
||||
```
|
||||
|
||||
**Application Entry Function**
|
||||
|
||||
The application layer's entry function is in `src\hal_entry.c` in the `void hal_entry(void)` function. User source files can be placed directly in the `src` directory.
|
||||
|
||||
```c
|
||||
#define LED_PIN BSP_IO_PORT_18_PIN_2 /* Onboard LED pins */
|
||||
|
||||
void hal_entry(void)
|
||||
{
|
||||
rt_kprintf("\nHello RT-Thread!\n");
|
||||
rt_kprintf("==================================================\n");
|
||||
rt_kprintf("This is a iar project which mode is xspi0 execution!\n");
|
||||
rt_kprintf("==================================================\n");
|
||||
|
||||
while (1)
|
||||
{
|
||||
rt_pin_write(LED_PIN, PIN_HIGH);
|
||||
rt_thread_mdelay(500);
|
||||
rt_pin_write(LED_PIN, PIN_LOW);
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
|
||||
**Resources and Documentation**
|
||||
|
||||
- [Development Board Official Homepage](https://www.renesas.cn/zh/products/microcontrollers-microprocessors/rz-mpus/rzn2l-integrated-tsn-compliant-3-port-gigabit-ethernet-switch-enables-various-industrial-applications)
|
||||
- [Development Board Data Sheet](https://www.renesas.cn/zh/document/dst/rzn2l-group-datasheet?r=1622651)
|
||||
- [Development Board Hardware Manual](https://www.renesas.cn/zh/document/mah/rzn2l-group-users-manual-hardware?r=1622651)
|
||||
- [RZ/N2L MCU Quick Start Guide](https://www.renesas.cn/zh/document/apn/rzt2-rzn2-device-setup-guide-flash-boot-application-note?r=1622651)
|
||||
- [RZ/N2L Easy Download Guide](https://www.renesas.cn/zh/document/gde/rzn2l-easy-download-guide?r=1622651)
|
||||
- [Renesas RZ/N2L Group](https://www.renesas.cn/zh/document/fly/renesas-rzn2l-group?r=1622651)
|
||||
|
||||
**FSP Configuration**
|
||||
|
||||
If you need to modify Renesas BSP peripheral configurations or add new peripheral ports, you will need to use the Renesas [FSP](https://www2.renesas.cn/jp/zh/software-tool/flexible-software-package-fsp#document) configuration tool. Please follow the steps below. If you encounter any issues during the configuration, feel free to ask on the [RT-Thread Community Forum](https://club.rt-thread.org/).
|
||||
|
||||
1. [Download the Flexible Software Package (FSP) | Renesas](https://github.com/renesas/rzn-fsp/releases/download/v2.0.0/setup_rznfsp_v2_0_0_rzsc_v2024-01.1.exe), please use version FSP 2.0.0.
|
||||
2. Refer to the document [How to Import Board Support Package](https://www2.renesas.cn/document/ppt/1527171?language=zh&r=1527191) to add the **"RSK-RZN2L Board Support Package"** to FSP.
|
||||
3. Refer to the document: [RA Series Using FSP to Configure Peripheral Drivers](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/tutorial/make-bsp/renesas-ra/RA系列使用FSP配置外设驱动?id=ra系列使用-fsp-配置外设驱动).
|
||||
|
||||
**ENV Configuration**
|
||||
|
||||
- How to use the ENV tool: [RT-Thread ENV Tool User Manual](https://www.rt-thread.org/document/site/#/development-tools/env/env)
|
||||
|
||||
By default, this BSP only enables UART0. To use more advanced features like components, software packages, etc., you need to configure the BSP using the ENV tool.
|
||||
|
||||
Steps:
|
||||
1. Open the env tool in the BSP directory.
|
||||
2. Enter the `menuconfig` command to configure the project. After configuration, save and exit.
|
||||
3. Enter the `pkgs --update` command to update the software packages.
|
||||
4. Enter the `scons --target=iar` command to regenerate the project.
|
||||
|
||||
## Contact Information
|
||||
|
||||
If you have any thoughts or suggestions during usage, feel free to contact us via the [RT-Thread Community Forum](https://club.rt-thread.org/).
|
||||
|
||||
## Contribute Code
|
||||
|
||||
If you are interested in the RSK-RZN2L and have some exciting projects to share with the community, we welcome your code contributions. You can refer to [How to Contribute Code to RT-Thread](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/development-guide/github/github).
|
||||
@@ -0,0 +1,168 @@
|
||||
# 瑞萨 RSK-RZN2L 开发板 BSP 说明
|
||||
|
||||
**中文** | [**English**](./README.md)
|
||||
|
||||
## 简介
|
||||
|
||||
本文档为瑞萨 RSK-RZN2L 开发板提供的 BSP (板级支持包) 说明。通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。
|
||||
|
||||
主要内容如下:
|
||||
|
||||
- 开发板介绍
|
||||
- BSP 快速上手指南
|
||||
|
||||
## 开发板介绍
|
||||
|
||||
基于瑞萨 RZ/N2L 开发的 RSK-RZN2L MCU 评估板,通过灵活配置软件包和 IDE,对嵌入系统应用程序进行开发。
|
||||
|
||||
开发板正面外观如下图:
|
||||
|
||||

|
||||
|
||||
该开发板常用 **板载资源** 如下:
|
||||
|
||||
- MPU:R9A07G084M04GBG,最大工作频率 400MHz,Arm® Cortex®-R52 片上浮点单元(FPU)和 NEON™,1.5 MB 片上 SRAM,Ethernet MAC,EtherCAT,USB 2.0 高速,CAN/CANFD,xSPI 和 ΔΣ 接口等各种通信接口,以及安全功能。
|
||||
- 调试接口:板载 J-Link 接口
|
||||
- 扩展接口:两个 PMOD 连接器
|
||||
|
||||
**更多详细资料及工具**
|
||||
|
||||
## 外设支持
|
||||
|
||||
本 BSP 目前对外设的支持情况如下:
|
||||
|
||||
| **片上外设** | **支持情况** | **备注** |
|
||||
| :----------------- | :----------------- | :------------- |
|
||||
| UART | 支持 | UART0 为默认日志输出端口 |
|
||||
| GPIO | 支持 | |
|
||||
| HWIMER | 支持 | |
|
||||
| IIC | 支持 | |
|
||||
| WDT | 支持 | |
|
||||
| RTC | 支持 | |
|
||||
| ADC | 支持 | |
|
||||
| DAC | 支持 | |
|
||||
| SPI | 支持 | |
|
||||
| FLASH | 支持 | |
|
||||
| PWM | 支持 | |
|
||||
| CAN | 支持 | |
|
||||
| ETH | 支持 | |
|
||||
| 持续更新中... | | |
|
||||
|
||||
|
||||
## 使用说明
|
||||
|
||||
使用说明分为如下两个章节:
|
||||
|
||||
- 快速上手
|
||||
|
||||
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||
- 进阶使用
|
||||
|
||||
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
|
||||
|
||||
### 快速上手
|
||||
|
||||
本 BSP 目前仅提供 IAR 工程。下面以 [IAR Embedded Workbench for Arm](https://www.iar.com/products/architectures/arm/iar-embedded-workbench-for-arm/) 开发环境为例,介绍如何将系统运行起来。
|
||||
|
||||
**硬件连接**
|
||||
|
||||
使用 USB 数据线连接开发板到 PC,使用 J-link 接口下载和 DEBUG 程序。
|
||||
|
||||
**编译下载**
|
||||
|
||||
- 进入 bsp 目录下,打开 ENV 使用命令 `scons --target=iar` 生成 IAR工程。
|
||||
- 编译:双击 project.eww 文件,打开 IAR 工程,编译程序。
|
||||
- 调试:IAR 左上方导航栏点击 `Project->Download and Debug`下载并启动调试。
|
||||
|
||||
**查看运行结果**
|
||||
|
||||
下载程序成功之后,系统会自动运行并打印系统信息。
|
||||
|
||||
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息。输入 help 命令可查看系统中支持的命令。
|
||||
|
||||
```bash
|
||||
\ | /
|
||||
- RT - Thread Operating System
|
||||
/ | \ 5.1.0 build Mar 14 2024 18:26:01
|
||||
2006 - 2024 Copyright by RT-Thread team
|
||||
|
||||
Hello RT-Thread!
|
||||
==================================================
|
||||
This is a iar project which mode is xspi0 execution!
|
||||
==================================================
|
||||
msh >help
|
||||
RT-Thread shell commands:
|
||||
clear - clear the terminal screen
|
||||
version - show RT-Thread version information
|
||||
list - list objects
|
||||
backtrace - print backtrace of a thread
|
||||
help - RT-Thread shell help
|
||||
ps - List threads in the system
|
||||
free - Show the memory usage in the system
|
||||
pin - pin [option]
|
||||
|
||||
msh >
|
||||
```
|
||||
|
||||
**应用入口函数**
|
||||
|
||||
应用层的入口函数在 **src\hal_entry.c** 中 的 `void hal_entry(void)` 。用户编写的源文件可直接放在 src 目录下。
|
||||
|
||||
```c
|
||||
#define LED_PIN BSP_IO_PORT_18_PIN_2 /* Onboard LED pins */
|
||||
|
||||
void hal_entry(void)
|
||||
{
|
||||
rt_kprintf("\nHello RT-Thread!\n");
|
||||
rt_kprintf("==================================================\n");
|
||||
rt_kprintf("This is a iar project which mode is xspi0 execution!\n");
|
||||
rt_kprintf("==================================================\n");
|
||||
|
||||
while (1)
|
||||
{
|
||||
rt_pin_write(LED_PIN, PIN_HIGH);
|
||||
rt_thread_mdelay(500);
|
||||
rt_pin_write(LED_PIN, PIN_LOW);
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 进阶使用
|
||||
|
||||
**资料及文档**
|
||||
|
||||
- [开发板官网主页](https://www.renesas.cn/zh/products/microcontrollers-microprocessors/rz-mpus/rzn2l-integrated-tsn-compliant-3-port-gigabit-ethernet-switch-enables-various-industrial-applications)
|
||||
- [开发板数据手册](https://www.renesas.cn/zh/document/dst/rzn2l-group-datasheet?r=1622651)
|
||||
- [开发板硬件手册](https://www.renesas.cn/zh/document/mah/rzn2l-group-users-manual-hardware?r=1622651)
|
||||
- [RZ/N2L MCU 快速入门指南](https://www.renesas.cn/zh/document/apn/rzt2-rzn2-device-setup-guide-flash-boot-application-note?r=1622651)
|
||||
- [RZ/N2L Easy Download Guide](https://www.renesas.cn/zh/document/gde/rzn2l-easy-download-guide?r=1622651)
|
||||
- [Renesas RZ/N2L Group](https://www.renesas.cn/zh/document/fly/renesas-rzn2l-group?r=1622651)
|
||||
|
||||
**FSP 配置**
|
||||
|
||||
需要修改瑞萨的 BSP 外设配置或添加新的外设端口,需要用到瑞萨的 [FSP](https://www2.renesas.cn/jp/zh/software-tool/flexible-software-package-fsp#document) 配置工具。请务必按照如下步骤完成配置。配置中有任何问题可到[RT-Thread 社区论坛](https://club.rt-thread.org/)中提问。
|
||||
|
||||
1. [下载灵活配置软件包 (FSP) | Renesas](https://github.com/renesas/rzn-fsp/releases/download/v2.0.0/setup_rznfsp_v2_0_0_rzsc_v2024-01.1.exe),请使用 FSP 2.0.0 版本
|
||||
2. 如何将 **”RSK-RZN2L板级支持包“**添加到 FSP 中,请参考文档[如何导入板级支持包](https://www2.renesas.cn/document/ppt/1527171?language=zh&r=1527191)
|
||||
3. 请参考文档:[RA系列使用FSP配置外设驱动](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/tutorial/make-bsp/renesas-ra/RA系列使用FSP配置外设驱动?id=ra系列使用-fsp-配置外设驱动)。
|
||||
|
||||
**ENV 配置**
|
||||
|
||||
- 如何使用 ENV 工具:[RT-Thread env 工具用户手册](https://www.rt-thread.org/document/site/#/development-tools/env/env)
|
||||
|
||||
此 BSP 默认只开启了 UART0 的功能,如果需使用更多高级功能例如组件、软件包等,需要利用 ENV 工具进行配置。
|
||||
|
||||
步骤如下:
|
||||
1. 在 bsp 下打开 env 工具。
|
||||
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
|
||||
3. 输入`pkgs --update`命令更新软件包。
|
||||
4. 输入`scons --target=iar` 命令重新生成工程。
|
||||
|
||||
## 联系人信息
|
||||
|
||||
在使用过程中若您有任何的想法和建议,建议您通过以下方式来联系到我们 [RT-Thread 社区论坛](https://club.rt-thread.org/)
|
||||
|
||||
## 贡献代码
|
||||
|
||||
如果您对 RSK-RZN2L 感兴趣,并且有一些好玩的项目愿意与大家分享的话欢迎给我们贡献代码,您可以参考 [如何向 RT-Thread 代码贡献](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/development-guide/github/github)。
|
||||
@@ -0,0 +1,28 @@
|
||||
# for module compiling
|
||||
import os
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
from gcc import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = []
|
||||
CPPPATH = [cwd]
|
||||
group = []
|
||||
list = os.listdir(cwd)
|
||||
|
||||
if rtconfig.PLATFORM in ['iccarm']:
|
||||
group = DefineGroup('', src, depend = [''], CPPPATH = CPPPATH)
|
||||
elif rtconfig.PLATFORM in GetGCCLikePLATFORM():
|
||||
if GetOption('target') != 'mdk5':
|
||||
CPPPATH = [cwd]
|
||||
src = Glob('./src/*.c')
|
||||
|
||||
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
for d in list:
|
||||
path = os.path.join(cwd, d)
|
||||
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||
group = group + SConscript(os.path.join(d, 'SConscript'))
|
||||
|
||||
Return('group')
|
||||
@@ -0,0 +1,54 @@
|
||||
import os
|
||||
import sys
|
||||
import rtconfig
|
||||
|
||||
if os.getenv('RTT_ROOT'):
|
||||
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||
else:
|
||||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
try:
|
||||
from building import *
|
||||
except:
|
||||
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
|
||||
print(RTT_ROOT)
|
||||
exit(-1)
|
||||
|
||||
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
|
||||
|
||||
DefaultEnvironment(tools=[])
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
|
||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||
|
||||
if rtconfig.PLATFORM in ['iccarm']:
|
||||
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
|
||||
env.Replace(ARFLAGS = [''])
|
||||
env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
|
||||
|
||||
Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
SDK_ROOT = os.path.abspath('./')
|
||||
if os.path.exists(SDK_ROOT + '/libraries'):
|
||||
libraries_path_prefix = SDK_ROOT + '/libraries'
|
||||
else:
|
||||
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/libraries'
|
||||
|
||||
SDK_LIB = libraries_path_prefix
|
||||
Export('SDK_LIB')
|
||||
|
||||
rtconfig.BSP_LIBRARY_TYPE = None
|
||||
|
||||
# prepare building environment
|
||||
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
||||
|
||||
# include drivers
|
||||
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'HAL_Drivers', 'SConscript')))
|
||||
|
||||
# make a building
|
||||
DoBuilding(TARGET, objs)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
import os
|
||||
from building import *
|
||||
|
||||
objs = []
|
||||
cwd = GetCurrentDir()
|
||||
list = os.listdir(cwd)
|
||||
CPPPATH = [cwd]
|
||||
src = Glob('*.c')
|
||||
|
||||
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
for item in list:
|
||||
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(item, 'SConscript'))
|
||||
|
||||
Return('objs')
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2024-03-11 Wangyuqiang first version
|
||||
*/
|
||||
|
||||
#ifndef __BOARD_H__
|
||||
#define __BOARD_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtdef.h>
|
||||
#include <cp15.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#define RZ_SRAM_SIZE 512 /* The SRAM size of the chip needs to be modified */
|
||||
#define RZ_SRAM_END (0x10000000 + RZ_SRAM_SIZE * 1024 - 1)
|
||||
|
||||
#ifdef __ARMCC_VERSION
|
||||
extern int Image$$RAM_END$$ZI$$Base;
|
||||
#define HEAP_BEGIN ((void *)&Image$$RAM_END$$ZI$$Base)
|
||||
#elif __ICCARM__
|
||||
#pragma section="CSTACK"
|
||||
#define HEAP_BEGIN (__segment_end("CSTACK"))
|
||||
#else
|
||||
#define HEAP_BEGIN (0x10000000)
|
||||
#endif
|
||||
|
||||
#define HEAP_END RZ_SRAM_END
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
#define MAX_HANDLERS (512)
|
||||
#define GIC_IRQ_START 0
|
||||
#define GIC_ACK_INTID_MASK (0x000003FFU)
|
||||
/* number of interrupts on board */
|
||||
#define ARM_GIC_NR_IRQS (448)
|
||||
/* only one GIC available */
|
||||
#define ARM_GIC_MAX_NR 1
|
||||
/* end defined */
|
||||
|
||||
#define GICV3_DISTRIBUTOR_BASE_ADDR (0x100000)
|
||||
|
||||
/* the basic constants and interfaces needed by gic */
|
||||
rt_inline rt_uint32_t platform_get_gic_dist_base(void)
|
||||
{
|
||||
rt_uint32_t gic_base;
|
||||
|
||||
__get_cp(15, 1, gic_base, 15, 3, 0);
|
||||
return gic_base + GICV3_DISTRIBUTOR_BASE_ADDR;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
import os
|
||||
from building import *
|
||||
|
||||
objs = []
|
||||
src = Glob('*.c')
|
||||
cwd = GetCurrentDir()
|
||||
CPPPATH = [cwd]
|
||||
|
||||
objs = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
list = os.listdir(cwd)
|
||||
for item in list:
|
||||
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
||||
objs = objs + SConscript(os.path.join(item, 'SConscript'))
|
||||
|
||||
Return('objs')
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2024-03-11 Wangyuqiang first version
|
||||
*/
|
||||
|
||||
/* Number of IRQ channels on the device */
|
||||
#define RA_IRQ_MAX 16
|
||||
|
||||
/* PIN to IRQx table */
|
||||
#define PIN2IRQX_TABLE \
|
||||
{ \
|
||||
switch (pin) \
|
||||
{ \
|
||||
case BSP_IO_PORT_00_PIN_1: \
|
||||
case BSP_IO_PORT_09_PIN_2: \
|
||||
case BSP_IO_PORT_18_PIN_3: \
|
||||
return 0; \
|
||||
case BSP_IO_PORT_00_PIN_3: \
|
||||
case BSP_IO_PORT_07_PIN_4: \
|
||||
case BSP_IO_PORT_18_PIN_4: \
|
||||
return 1; \
|
||||
case BSP_IO_PORT_01_PIN_2: \
|
||||
return 2; \
|
||||
case BSP_IO_PORT_01_PIN_4: \
|
||||
return 3; \
|
||||
case BSP_IO_PORT_02_PIN_0: \
|
||||
case BSP_IO_PORT_22_PIN_2: \
|
||||
return 4; \
|
||||
case BSP_IO_PORT_03_PIN_5: \
|
||||
case BSP_IO_PORT_13_PIN_2: \
|
||||
return 5; \
|
||||
case BSP_IO_PORT_14_PIN_2: \
|
||||
case BSP_IO_PORT_21_PIN_5: \
|
||||
return 6; \
|
||||
case BSP_IO_PORT_16_PIN_3: \
|
||||
return 7; \
|
||||
case BSP_IO_PORT_03_PIN_6: \
|
||||
case BSP_IO_PORT_16_PIN_6: \
|
||||
return 8; \
|
||||
case BSP_IO_PORT_03_PIN_7: \
|
||||
case BSP_IO_PORT_21_PIN_6: \
|
||||
return 9; \
|
||||
case BSP_IO_PORT_04_PIN_4: \
|
||||
case BSP_IO_PORT_18_PIN_1: \
|
||||
case BSP_IO_PORT_21_PIN_7: \
|
||||
return 10; \
|
||||
case BSP_IO_PORT_10_PIN_4: \
|
||||
case BSP_IO_PORT_18_PIN_6: \
|
||||
return 11; \
|
||||
case BSP_IO_PORT_05_PIN_0: \
|
||||
case BSP_IO_PORT_05_PIN_4: \
|
||||
case BSP_IO_PORT_05_PIN_6: \
|
||||
return 12; \
|
||||
case BSP_IO_PORT_00_PIN_4: \
|
||||
case BSP_IO_PORT_00_PIN_7: \
|
||||
case BSP_IO_PORT_05_PIN_1: \
|
||||
return 13; \
|
||||
case BSP_IO_PORT_02_PIN_2: \
|
||||
case BSP_IO_PORT_03_PIN_0: \
|
||||
case BSP_IO_PORT_05_PIN_2: \
|
||||
return 14; \
|
||||
case BSP_IO_PORT_02_PIN_3: \
|
||||
case BSP_IO_PORT_05_PIN_3: \
|
||||
case BSP_IO_PORT_22_PIN_0: \
|
||||
return 15; \
|
||||
default : \
|
||||
return -1; \
|
||||
} \
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<iarProjectConnection version="1.8" name="Flex Software">
|
||||
<device>
|
||||
<name>R9A07G084M04</name>
|
||||
</device>
|
||||
<includePath>
|
||||
<path>$PROJ_DIR$/rzn/arm/CMSIS_5/CMSIS/Core_R/Include</path>
|
||||
<path>$PROJ_DIR$/rzn/fsp/inc</path>
|
||||
<path>$PROJ_DIR$/rzn/fsp/inc/api</path>
|
||||
<path>$PROJ_DIR$/rzn/fsp/inc/instances</path>
|
||||
<path>$PROJ_DIR$/rzn/fsp/src/bsp/mcu/all/cr</path>
|
||||
<path>$PROJ_DIR$/rzn_cfg/fsp_cfg</path>
|
||||
<path>$PROJ_DIR$/rzn_cfg/fsp_cfg/bsp</path>
|
||||
<path>$PROJ_DIR$/rzn_gen</path>
|
||||
<path>$PROJ_DIR$/src</path>
|
||||
<path>$PROJ_DIR$</path>
|
||||
</includePath>
|
||||
<defines>
|
||||
<define>_RZN_ORDINAL=1</define>
|
||||
<define>_RZN_CORE=CR52_0</define>
|
||||
<define>_RENESAS_RZN_</define>
|
||||
</defines>
|
||||
<asmIncludePath>
|
||||
<path>$PROJ_DIR$/rzn/arm/CMSIS_5/CMSIS/Core_R/Include</path>
|
||||
<path>$PROJ_DIR$/rzn/fsp/inc</path>
|
||||
<path>$PROJ_DIR$/rzn/fsp/inc/api</path>
|
||||
<path>$PROJ_DIR$/rzn/fsp/inc/instances</path>
|
||||
<path>$PROJ_DIR$/rzn/fsp/src/bsp/mcu/all/cr</path>
|
||||
<path>$PROJ_DIR$/rzn_cfg/fsp_cfg</path>
|
||||
<path>$PROJ_DIR$/rzn_cfg/fsp_cfg/bsp</path>
|
||||
<path>$PROJ_DIR$/rzn_gen</path>
|
||||
<path>$PROJ_DIR$/src</path>
|
||||
<path>$PROJ_DIR$</path>
|
||||
</asmIncludePath>
|
||||
<asmDefines>
|
||||
<define>_RZN_ORDINAL=1</define>
|
||||
<define>_RZN_CORE=CR52_0</define>
|
||||
<define>_RENESAS_RZN_</define>
|
||||
</asmDefines>
|
||||
<linkerFile>
|
||||
<override>true</override>
|
||||
<path>$PROJ_DIR$/script/fsp_xspi0_boot.icf</path>
|
||||
</linkerFile>
|
||||
<linkerExtraOptions>
|
||||
<arg>--config_search "$PROJ_DIR$"</arg>
|
||||
</linkerExtraOptions>
|
||||
<programEntryPoint>
|
||||
<symbol>system_init</symbol>
|
||||
</programEntryPoint>
|
||||
<customArgVars>
|
||||
<group name="RA Smart Configurator">
|
||||
<argVar>
|
||||
<name>RASC_EXE_PATH</name>
|
||||
<value>D:\manufacture_apps\Renesas\fsp\rzn_v2.0.0\eclipse\rasc.exe</value>
|
||||
</argVar>
|
||||
</group>
|
||||
</customArgVars>
|
||||
<files>
|
||||
<group name="Components">
|
||||
<path>rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_compiler.h</path>
|
||||
<path>rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_cp15.h</path>
|
||||
<path>rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_gcc.h</path>
|
||||
<path>rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_iccarm.h</path>
|
||||
<path>rzn/arm/CMSIS_5/CMSIS/Core_R/Include/cmsis_version.h</path>
|
||||
<path>rzn/arm/CMSIS_5/CMSIS/Core_R/Include/core_cr52.h</path>
|
||||
<path>rzn/arm/CMSIS_5/LICENSE.txt</path>
|
||||
<path>rzn/board/rzn2l_rsk/board.h</path>
|
||||
<path>rzn/board/rzn2l_rsk/board_ethernet_phy.h</path>
|
||||
<path>rzn/board/rzn2l_rsk/board_init.c</path>
|
||||
<path>rzn/board/rzn2l_rsk/board_init.h</path>
|
||||
<path>rzn/board/rzn2l_rsk/board_leds.c</path>
|
||||
<path>rzn/board/rzn2l_rsk/board_leds.h</path>
|
||||
<path>rzn/fsp/inc/api/bsp_api.h</path>
|
||||
<path>rzn/fsp/inc/api/r_ioport_api.h</path>
|
||||
<path>rzn/fsp/inc/api/r_transfer_api.h</path>
|
||||
<path>rzn/fsp/inc/api/r_uart_api.h</path>
|
||||
<path>rzn/fsp/inc/fsp_common_api.h</path>
|
||||
<path>rzn/fsp/inc/fsp_features.h</path>
|
||||
<path>rzn/fsp/inc/fsp_version.h</path>
|
||||
<path>rzn/fsp/inc/instances/r_ioport.h</path>
|
||||
<path>rzn/fsp/inc/instances/r_sci_uart.h</path>
|
||||
<path>rzn/fsp/src/bsp/cmsis/Device/RENESAS/Include/R9A07G084.h</path>
|
||||
<path>rzn/fsp/src/bsp/cmsis/Device/RENESAS/Include/renesas.h</path>
|
||||
<path>rzn/fsp/src/bsp/cmsis/Device/RENESAS/Include/system.h</path>
|
||||
<path>rzn/fsp/src/bsp/cmsis/Device/RENESAS/Source/cr/startup_core.c</path>
|
||||
<path>rzn/fsp/src/bsp/cmsis/Device/RENESAS/Source/cr/system_core.c</path>
|
||||
<path>rzn/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c</path>
|
||||
<path>rzn/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_cache.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_cache.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_clocks.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_clocks.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_common.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_common.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_compiler_support.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_delay.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_delay.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_exceptions.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_io.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_io.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_irq.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_irq.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_mcu_api.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_module_stop.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_register_protection.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_register_protection.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_reset.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_reset.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_sbrk.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/bsp_tfu.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/cr/bsp_cache_core.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/cr/bsp_cache_core.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/cr/bsp_delay_core.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/cr/bsp_delay_core.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/cr/bsp_irq_core.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/all/cr/bsp_irq_core.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/rzn2l/bsp_elc.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/rzn2l/bsp_feature.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/rzn2l/bsp_irq_sense.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/rzn2l/bsp_loader_param.c</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/rzn2l/bsp_mcu_info.h</path>
|
||||
<path>rzn/fsp/src/bsp/mcu/rzn2l/bsp_override.h</path>
|
||||
<path>rzn/fsp/src/r_ioport/r_ioport.c</path>
|
||||
<path>rzn/fsp/src/r_sci_uart/r_sci_uart.c</path>
|
||||
</group>
|
||||
<group name="Build Configuration">
|
||||
<path>rzn_cfg/fsp_cfg/bsp/board_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/bsp/bsp_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/bsp/bsp_mcu_device_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/bsp/bsp_mcu_device_memory_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/bsp/bsp_mcu_device_pn_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/bsp/bsp_mcu_family_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/bsp/bsp_memory_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/bsp/bsp_pin_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/r_ioport_cfg.h</path>
|
||||
<path>rzn_cfg/fsp_cfg/r_sci_uart_cfg.h</path>
|
||||
</group>
|
||||
<group name="Generated Data">
|
||||
<path>rzn_gen/bsp_clock_cfg.h</path>
|
||||
<path>rzn_gen/common_data.c</path>
|
||||
<path>rzn_gen/common_data.h</path>
|
||||
<path>rzn_gen/hal_data.c</path>
|
||||
<path>rzn_gen/hal_data.h</path>
|
||||
<path>rzn_gen/main.c</path>
|
||||
<path>rzn_gen/pin_data.c</path>
|
||||
<path>rzn_gen/vector_data.c</path>
|
||||
<path>rzn_gen/vector_data.h</path>
|
||||
</group>
|
||||
<group name="Program Entry">
|
||||
<path>src/hal_entry.c</path>
|
||||
</group>
|
||||
</files>
|
||||
</iarProjectConnection>
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 446 KiB |
@@ -0,0 +1,38 @@
|
||||
|
||||
/* generated memory regions file - do not edit */
|
||||
define symbol ATCM_START = 0x00000000;
|
||||
define symbol ATCM_LENGTH = 0x20000;
|
||||
define symbol BTCM_START = 0x00100000;
|
||||
define symbol BTCM_LENGTH = 0x20000;
|
||||
define symbol SYSTEM_RAM_START = 0x10000000;
|
||||
define symbol SYSTEM_RAM_LENGTH = 0x180000;
|
||||
define symbol SYSTEM_RAM_MIRROR_START = 0x30000000;
|
||||
define symbol SYSTEM_RAM_MIRROR_LENGTH = 0x180000;
|
||||
define symbol xSPI0_CS0_SPACE_MIRROR_START = 0x40000000;
|
||||
define symbol xSPI0_CS0_SPACE_MIRROR_LENGTH = 0x4000000;
|
||||
define symbol xSPI0_CS1_SPACE_MIRROR_START = 0x44000000;
|
||||
define symbol xSPI0_CS1_SPACE_MIRROR_LENGTH = 0x4000000;
|
||||
define symbol xSPI1_CS0_SPACE_MIRROR_START = 0x48000000;
|
||||
define symbol xSPI1_CS0_SPACE_MIRROR_LENGTH = 0x4000000;
|
||||
define symbol CS0_SPACE_MIRROR_START = 0x50000000;
|
||||
define symbol CS0_SPACE_MIRROR_LENGTH = 0x4000000;
|
||||
define symbol CS2_SPACE_MIRROR_START = 0x54000000;
|
||||
define symbol CS2_SPACE_MIRROR_LENGTH = 0x4000000;
|
||||
define symbol CS3_SPACE_MIRROR_START = 0x58000000;
|
||||
define symbol CS3_SPACE_MIRROR_LENGTH = 0x4000000;
|
||||
define symbol CS5_SPACE_MIRROR_START = 0x5C000000;
|
||||
define symbol CS5_SPACE_MIRROR_LENGTH = 0x4000000;
|
||||
define symbol xSPI0_CS0_SPACE_START = 0x60000000;
|
||||
define symbol xSPI0_CS0_SPACE_LENGTH = 0x4000000;
|
||||
define symbol xSPI0_CS1_SPACE_START = 0x64000000;
|
||||
define symbol xSPI0_CS1_SPACE_LENGTH = 0x4000000;
|
||||
define symbol xSPI1_CS0_SPACE_START = 0x68000000;
|
||||
define symbol xSPI1_CS0_SPACE_LENGTH = 0x4000000;
|
||||
define symbol CS0_SPACE_START = 0x70000000;
|
||||
define symbol CS0_SPACE_LENGTH = 0x4000000;
|
||||
define symbol CS2_SPACE_START = 0x74000000;
|
||||
define symbol CS2_SPACE_LENGTH = 0x4000000;
|
||||
define symbol CS3_SPACE_START = 0x78000000;
|
||||
define symbol CS3_SPACE_LENGTH = 0x4000000;
|
||||
define symbol CS5_SPACE_START = 0x7C000000;
|
||||
define symbol CS5_SPACE_LENGTH = 0x4000000;
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<workspace>
|
||||
<project>
|
||||
<path>$WS_DIR$\project.ewp</path>
|
||||
</project>
|
||||
<batchBuild/>
|
||||
</workspace>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,123 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# toolchains options
|
||||
ARCH='arm'
|
||||
CPU='cortex-r52'
|
||||
CROSS_TOOL='gcc'
|
||||
|
||||
if os.getenv('RTT_CC'):
|
||||
CROSS_TOOL = os.getenv('RTT_CC')
|
||||
if os.getenv('RTT_ROOT'):
|
||||
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||
|
||||
# cross_tool provides the cross compiler
|
||||
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
|
||||
if CROSS_TOOL == 'gcc':
|
||||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = r'C:\Users\XXYYZZ'
|
||||
elif CROSS_TOOL == 'keil':
|
||||
PLATFORM = 'armclang'
|
||||
EXEC_PATH = r'C:/Keil_v5'
|
||||
elif CROSS_TOOL == 'iar':
|
||||
PLATFORM = 'iccarm'
|
||||
EXEC_PATH = r'D:/IAR Systems/Embedded Workbench 9.2'
|
||||
|
||||
if os.getenv('RTT_EXEC_PATH'):
|
||||
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
|
||||
|
||||
BUILD = 'debug'
|
||||
# BUILD = 'release'
|
||||
|
||||
if PLATFORM == 'gcc':
|
||||
# toolchains
|
||||
PREFIX = 'arm-none-eabi-'
|
||||
CC = PREFIX + 'gcc'
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
CXX = PREFIX + 'g++'
|
||||
LINK = PREFIX + 'gcc'
|
||||
TARGET_EXT = 'elf'
|
||||
SIZE = PREFIX + 'size'
|
||||
OBJDUMP = PREFIX + 'objdump'
|
||||
OBJCPY = PREFIX + 'objcopy'
|
||||
NM = PREFIX + 'nm'
|
||||
|
||||
DEVICE = ' -mcpu=cortex-r52 -marm -mfloat-abi=hard -mfpu=neon-fp-armv8 -munaligned-access -fdiagnostics-parseable-fixits -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -funwind-tables'
|
||||
CFLAGS = DEVICE + ' -Dgcc'
|
||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=arm '
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T script/fsp_xspi0_boot.ld -L script/'
|
||||
|
||||
CPATH = ''
|
||||
LPATH = ''
|
||||
|
||||
if BUILD == 'debug':
|
||||
CFLAGS += ' -O0 -gdwarf-2 -g -Wall'
|
||||
AFLAGS += ' -gdwarf-2'
|
||||
else:
|
||||
CFLAGS += ' -Os'
|
||||
CXXFLAGS = CFLAGS
|
||||
|
||||
POST_ACTION = OBJCPY + ' -O ihex $TARGET rtthread.hex\n' + SIZE + ' $TARGET \n'
|
||||
# POST_ACTION += OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||
|
||||
elif PLATFORM == 'iccarm':
|
||||
# toolchains
|
||||
CC = 'iccarm'
|
||||
CXX = 'iccarm'
|
||||
AS = 'iasmarm'
|
||||
AR = 'iarchive'
|
||||
LINK = 'ilinkarm'
|
||||
TARGET_EXT = 'out'
|
||||
|
||||
DEVICE = '-Dewarm'
|
||||
|
||||
CFLAGS = DEVICE
|
||||
CFLAGS += ' --diag_suppress Pa050'
|
||||
CFLAGS += ' --no_cse'
|
||||
CFLAGS += ' --no_unroll'
|
||||
CFLAGS += ' --no_inline'
|
||||
CFLAGS += ' --no_code_motion'
|
||||
CFLAGS += ' --no_tbaa'
|
||||
CFLAGS += ' --no_clustering'
|
||||
CFLAGS += ' --no_scheduling'
|
||||
CFLAGS += ' --endian=little'
|
||||
CFLAGS += ' --cpu=Cortex-R52'
|
||||
CFLAGS += ' -e'
|
||||
CFLAGS += ' --arm'
|
||||
CFLAGS += ' --float-abi=hard'
|
||||
CFLAGS += ' --fpu=neon-fp-armv8'
|
||||
CFLAGS += ' --dlib_config "' + EXEC_PATH + '/arm/INC/c/DLib_Config_Normal.h"'
|
||||
CFLAGS += ' --silent'
|
||||
|
||||
AFLAGS = DEVICE
|
||||
AFLAGS += ' -s+'
|
||||
AFLAGS += ' -w+'
|
||||
AFLAGS += ' -r'
|
||||
AFLAGS += ' --cpu Cortex-R52'
|
||||
AFLAGS += ' --arm'
|
||||
AFLAGS += ' --float-abi hard'
|
||||
AFLAGS += ' --fpu neon-fp-armv8'
|
||||
# AFLAGS += ' --unaligned-access'
|
||||
AFLAGS += ' -S'
|
||||
|
||||
if BUILD == 'debug':
|
||||
CFLAGS += ' --debug'
|
||||
CFLAGS += ' -On'
|
||||
else:
|
||||
CFLAGS += ' -Oh'
|
||||
|
||||
LFLAGS = ' --config "script/fsp_xspi0_boot.icf"'
|
||||
LFLAGS += ' --entry Reset_Handler'
|
||||
|
||||
CXXFLAGS = CFLAGS
|
||||
|
||||
EXEC_PATH = EXEC_PATH + '/arm/bin/'
|
||||
POST_ACTION = 'ielftool --bin $TARGET rtthread.bin'
|
||||
|
||||
def dist_handle(BSP_ROOT, dist_dir):
|
||||
import sys
|
||||
cwd_path = os.getcwd()
|
||||
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||
from sdk_dist import dist_do_building
|
||||
dist_do_building(BSP_ROOT, dist_dir)
|
||||
@@ -0,0 +1,28 @@
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
from gcc import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = []
|
||||
group = []
|
||||
CPPPATH = []
|
||||
|
||||
if rtconfig.PLATFORM in ['iccarm']:
|
||||
Return('group')
|
||||
elif rtconfig.PLATFORM in GetGCCLikePLATFORM():
|
||||
if GetOption('target') != 'mdk5':
|
||||
src += Glob(cwd + '/fsp/src/bsp/mcu/all/*.c')
|
||||
src += Glob(cwd + '/fsp/src/bsp/mcu/all/cr/*.c')
|
||||
src += Glob(cwd + '/fsp/src/bsp/mcu/r*/*.c')
|
||||
src += Glob(cwd + '/fsp/src/r_*/*.c')
|
||||
src += Glob(cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/cr/*.c')
|
||||
src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c']
|
||||
src += [cwd + '/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c']
|
||||
CPPPATH = [ cwd + '/arm/CMSIS_5/CMSIS/Core_R/Include',
|
||||
cwd + '/fsp/inc',
|
||||
cwd + '/fsp/inc/api',
|
||||
cwd + '/fsp/inc/instances',]
|
||||
|
||||
group = DefineGroup('rzn', src, depend = [''], CPPPATH = CPPPATH)
|
||||
Return('group')
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,46 @@
|
||||
/**************************************************************************//**
|
||||
* @file cmsis_version.h
|
||||
* @brief CMSIS Core(M) Version definitions
|
||||
* @date 31. August 2021
|
||||
******************************************************************************/
|
||||
/*
|
||||
* Copyright [2020-2021] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This file is based on the "\CMSIS\Core\Include\cmsis_version.h"
|
||||
*
|
||||
* Changes:
|
||||
* - No Changes.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2009-2019 ARM Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined ( __ICCARM__ )
|
||||
#pragma system_include /* treat file as system include file for MISRA check */
|
||||
#elif defined (__clang__)
|
||||
#pragma clang system_header /* treat file as system include file */
|
||||
#endif
|
||||
|
||||
#ifndef __CMSIS_VERSION_H
|
||||
#define __CMSIS_VERSION_H
|
||||
|
||||
/* CMSIS Version definitions */
|
||||
#define __CM_CMSIS_VERSION_MAIN ( 5U) /*!< [31:16] CMSIS Core(M) main version */
|
||||
#define __CM_CMSIS_VERSION_SUB ( 4U) /*!< [15:0] CMSIS Core(M) sub version */
|
||||
#define __CM_CMSIS_VERSION ((__CM_CMSIS_VERSION_MAIN << 16U) | \
|
||||
__CM_CMSIS_VERSION_SUB ) /*!< CMSIS Core(M) version number */
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,67 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* File Name : board.h
|
||||
* Description : Includes and API function available for this board.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @ingroup BOARDS
|
||||
* @defgroup BOARD_RZN2L_RSK
|
||||
* @brief BSP for the RZN2L_RSK Board
|
||||
*
|
||||
* The RZN2L_RSK is a development kit for the Renesas RZN2L microcontroller.
|
||||
*
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BOARD_H
|
||||
#define BOARD_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* BSP Board Specific Includes. */
|
||||
#include "board_init.h"
|
||||
#include "board_leds.h"
|
||||
#include "board_ethernet_phy.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
#define BOARD_RZN2L_RSK
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** @} (end defgroup BSP_CONFIG_RZN2L) */
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @ingroup BOARD_RZN2_RSK
|
||||
* @defgroup BOARD_RZN2_RSK_ETHERNET_PHY Board Ethernet Phy
|
||||
* @brief Ethernet Phy information for this board.
|
||||
*
|
||||
* This is code specific to the RZN2_RSK board.
|
||||
*
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_ETHERNET_PHY_H
|
||||
#define BSP_ETHERNET_PHY_H
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
#define ETHER_PHY_CFG_TARGET_VSC8541_ENABLE (1)
|
||||
#define ETHER_PHY_LSI_TYPE_KIT_COMPONENT ETHER_PHY_LSI_TYPE_VSC8541
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Public Functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
|
||||
/** @} (end defgroup BOARD_RZN2_RSK_ETHERNET_PHY) */
|
||||
@@ -0,0 +1,67 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* File Name : board_init.c
|
||||
* Description : This module calls any initialization code specific to this BSP.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BOARD_RZN2L_RSK_INIT
|
||||
*
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
#if defined(BOARD_RZN2L_RSK)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @brief Performs any initialization specific to this BSP.
|
||||
*
|
||||
* @param[in] p_args Pointer to arguments of the user's choice.
|
||||
**********************************************************************************************************************/
|
||||
void bsp_init (void * p_args)
|
||||
{
|
||||
FSP_PARAMETER_NOT_USED(p_args);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/** @} (end addtogroup BOARD_RZN2L_RSK_INIT) */
|
||||
@@ -0,0 +1,64 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* File Name : board_init.h
|
||||
* Description : This module calls any initialization code specific to this BSP.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @ingroup BOARD_RZN2L_RSK
|
||||
* @defgroup BOARD_RZN2L_RSK_INIT
|
||||
* @brief Board specific code for the RZN2L_RSK Board
|
||||
*
|
||||
* This include file is specific to the RZN2L_RSK board.
|
||||
*
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BOARD_INIT_H
|
||||
#define BOARD_INIT_H
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
void bsp_init(void * p_args);
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
|
||||
/** @} (end defgroup BOARD_RZN2L_RSK_INIT) */
|
||||
@@ -0,0 +1,77 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* File Name : board_leds.c
|
||||
* Description : This module has information about the LEDs on this board.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BOARD_RZN2L_RSK_LEDS
|
||||
*
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
#if defined(BOARD_RZN2L_RSK)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Array of LED IOPORT pins. */
|
||||
static const uint32_t g_bsp_prv_leds[][2] =
|
||||
{
|
||||
{(uint32_t) BSP_IO_PORT_18_PIN_2, (uint32_t) BSP_IO_REGION_SAFE}, ///< RLED0
|
||||
{(uint32_t) BSP_IO_PORT_22_PIN_3, (uint32_t) BSP_IO_REGION_SAFE}, ///< RLED1
|
||||
{(uint32_t) BSP_IO_PORT_04_PIN_1, (uint32_t) BSP_IO_REGION_SAFE}, ///< RLED2
|
||||
{(uint32_t) BSP_IO_PORT_17_PIN_3, (uint32_t) BSP_IO_REGION_SAFE} ///< RLED3
|
||||
};
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Structure with LED information for this board. */
|
||||
|
||||
const bsp_leds_t g_bsp_leds =
|
||||
{
|
||||
.led_count = (uint16_t) (sizeof(g_bsp_prv_leds) / sizeof(g_bsp_prv_leds[0])),
|
||||
.p_leds = g_bsp_prv_leds
|
||||
};
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#endif
|
||||
|
||||
/** @} (end addtogroup BOARD_RZN2L_RSK_LEDS) */
|
||||
@@ -0,0 +1,81 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* File Name : board_leds.h
|
||||
* Description : This module has information about the LEDs on this board.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @ingroup BOARD_RZN2L_RSK
|
||||
* @defgroup BOARD_RZN2L_RSK_LEDS Board LEDs
|
||||
* @brief LED information for this board.
|
||||
*
|
||||
* This is code specific to the RZN2L_RSK board. It includes info on the number of LEDs and which pins are they
|
||||
* are on.
|
||||
*
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BOARD_LEDS_H
|
||||
#define BOARD_LEDS_H
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Information on how many LEDs and what pins they are on. */
|
||||
typedef struct st_bsp_leds
|
||||
{
|
||||
uint16_t led_count; ///< The number of LEDs on this board
|
||||
uint32_t const (*p_leds)[2]; ///< Pointer to an array of IOPORT pins for controlling LEDs
|
||||
} bsp_leds_t;
|
||||
|
||||
/** Available user-controllable LEDs on this board. These enums can be can be used to index into the array of LED pins
|
||||
* found in the bsp_leds_t structure. */
|
||||
typedef enum e_bsp_led
|
||||
{
|
||||
BSP_LED_RLED0 = 0, ///< Green
|
||||
BSP_LED_RLED1 = 1, ///< Yellow
|
||||
BSP_LED_RLED2 = 2, ///< Red
|
||||
BSP_LED_RLED3 = 3, ///< Red
|
||||
} bsp_led_t;
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Public Functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
|
||||
/** @} (end defgroup BOARD_RZN2L_RSK_LEDS) */
|
||||
@@ -0,0 +1,111 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_API_H
|
||||
#define BSP_API_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* FSP Common Includes. */
|
||||
#include "fsp_common_api.h"
|
||||
|
||||
/* Gets MCU configuration information. */
|
||||
#include "bsp_cfg.h"
|
||||
|
||||
#if defined(__GNUC__) && !defined(__ARMCC_VERSION)
|
||||
|
||||
/* Store warning settings for 'conversion' and 'sign-conversion' to as specified on command line. */
|
||||
#pragma GCC diagnostic push
|
||||
|
||||
/* CMSIS-CORE currently generates 2 warnings when compiling with GCC. One in core_cmInstr.h and one in core_cm4_simd.h.
|
||||
* We are not modifying these files so we will ignore these warnings temporarily. */
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#pragma GCC diagnostic ignored "-Wsign-conversion"
|
||||
#endif
|
||||
|
||||
/* Vector information for this project. This is generated by the tooling. */
|
||||
#include "../../src/bsp/mcu/all/bsp_exceptions.h"
|
||||
#include "vector_data.h"
|
||||
|
||||
/* CMSIS-CORE Renesas Device Files. Must come after bsp_feature.h, which is included in bsp_cfg.h. */
|
||||
#include "../../src/bsp/cmsis/Device/RENESAS/Include/renesas.h"
|
||||
#include "../../src/bsp/cmsis/Device/RENESAS/Include/system.h"
|
||||
|
||||
#if defined(__GNUC__) && !defined(__ARMCC_VERSION)
|
||||
|
||||
/* Restore warning settings for 'conversion' and 'sign-conversion' to as specified on command line. */
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#if defined(BSP_API_OVERRIDE)
|
||||
#include BSP_API_OVERRIDE
|
||||
#else
|
||||
|
||||
/* BSP Common Includes. */
|
||||
#include "../../src/bsp/mcu/all/bsp_common.h"
|
||||
|
||||
/* BSP MCU Specific Includes. */
|
||||
#include "../../src/bsp/mcu/all/bsp_register_protection.h"
|
||||
#include "../../src/bsp/mcu/all/bsp_irq.h"
|
||||
#include "../../src/bsp/mcu/all/bsp_io.h"
|
||||
#include "../../src/bsp/mcu/all/bsp_group_irq.h"
|
||||
#include "../../src/bsp/mcu/all/bsp_clocks.h"
|
||||
#include "../../src/bsp/mcu/all/bsp_module_stop.h"
|
||||
#include "../../src/bsp/mcu/all/bsp_security.h"
|
||||
|
||||
/* Factory MCU information. */
|
||||
#include "../../inc/fsp_features.h"
|
||||
|
||||
/* BSP Common Includes (Other than bsp_common.h) */
|
||||
#include "../../src/bsp/mcu/all/bsp_delay.h"
|
||||
#include "../../src/bsp/mcu/all/bsp_mcu_api.h"
|
||||
|
||||
#endif
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
fsp_err_t R_FSP_VersionGet(fsp_pack_version_t * const p_version);
|
||||
|
||||
/** @} (end addtogroup BSP_MCU) */
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,80 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef FSP_VERSION_H
|
||||
#define FSP_VERSION_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* Includes board and MCU related header files. */
|
||||
#include "bsp_api.h"
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup RENESAS_COMMON
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** FSP pack major version. */
|
||||
#define FSP_VERSION_MAJOR (2U)
|
||||
|
||||
/** FSP pack minor version. */
|
||||
#define FSP_VERSION_MINOR (0U)
|
||||
|
||||
/** FSP pack patch version. */
|
||||
#define FSP_VERSION_PATCH (0U)
|
||||
|
||||
/** FSP pack version build number (currently unused). */
|
||||
#define FSP_VERSION_BUILD (0U)
|
||||
|
||||
/** Public FSP version name. */
|
||||
#define FSP_VERSION_STRING ("2.0.0")
|
||||
|
||||
/** Unique FSP version ID. */
|
||||
#define FSP_VERSION_BUILD_STRING ("Built with RZ/N Flexible Software Package version 2.0.0")
|
||||
|
||||
/**********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** FSP Pack version structure */
|
||||
typedef union st_fsp_pack_version
|
||||
{
|
||||
/** Version id */
|
||||
uint32_t version_id;
|
||||
|
||||
/** Code version parameters, little endian order. */
|
||||
struct version_id_b_s
|
||||
{
|
||||
uint8_t build; ///< Build version of FSP Pack
|
||||
uint8_t patch; ///< Patch version of FSP Pack
|
||||
uint8_t minor; ///< Minor version of FSP Pack
|
||||
uint8_t major; ///< Major version of FSP Pack
|
||||
} version_id_b;
|
||||
} fsp_pack_version_t;
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,131 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* Ensure Renesas MCU variation definitions are included to ensure MCU
|
||||
* specific register variations are handled correctly. */
|
||||
#ifndef BSP_FEATURE_H
|
||||
#error "INTERNAL ERROR: bsp_feature.h must be included before renesas.h."
|
||||
#endif
|
||||
|
||||
/** @addtogroup Renesas Electronics Corporation
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup RZN2
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef RZN2_H
|
||||
#define RZN2_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define compiler macros for CPU architecture, used in CMSIS 5. */
|
||||
#if defined(__ICCARM__)
|
||||
#if __ARM_ARCH_6M__ || __ARM_ARCH_7M__ || __ARM_ARCH_7EM__ || __ARM_ARCH_8M_BASE__ || __ARM_ARCH_8M_MAIN__
|
||||
|
||||
/* Macros already defined */
|
||||
#else
|
||||
#if defined(__ARM8M_MAINLINE__) || defined(__ARM8EM_MAINLINE__)
|
||||
#define __ARM_ARCH_8M_MAIN__ 1
|
||||
#elif defined(__ARM8M_BASELINE__)
|
||||
#define __ARM_ARCH_8M_BASE__ 1
|
||||
#elif defined(__ARM_ARCH_PROFILE) && __ARM_ARCH_PROFILE == 'M'
|
||||
#if __ARM_ARCH == 6
|
||||
#define __ARM_ARCH_6M__ 1
|
||||
#elif __ARM_ARCH == 7
|
||||
#if __ARM_FEATURE_DSP
|
||||
#define __ARM_ARCH_7EM__ 1
|
||||
#else
|
||||
#define __ARM_ARCH_7M__ 1
|
||||
#endif
|
||||
#endif /* __ARM_ARCH */
|
||||
#endif /* __ARM_ARCH_PROFILE == 'M' */
|
||||
#endif
|
||||
|
||||
/* Alternative core deduction for older ICCARM's */
|
||||
#if !defined(__ARM_ARCH_6M__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__) && \
|
||||
!defined(__ARM_ARCH_8M_BASE__) && !defined(__ARM_ARCH_8M_MAIN__)
|
||||
#if defined(__ARM6M__) && (__CORE__ == __ARM6M__)
|
||||
#define __ARM_ARCH_6M__ 1
|
||||
#elif defined(__ARM7M__) && (__CORE__ == __ARM7M__)
|
||||
#define __ARM_ARCH_7M__ 1
|
||||
#elif defined(__ARM7EM__) && (__CORE__ == __ARM7EM__)
|
||||
#define __ARM_ARCH_7EM__ 1
|
||||
#elif defined(__ARM8M_BASELINE__) && (__CORE == __ARM8M_BASELINE__)
|
||||
#define __ARM_ARCH_8M_BASE__ 1
|
||||
#elif defined(__ARM8M_MAINLINE__) && (__CORE == __ARM8M_MAINLINE__)
|
||||
#define __ARM_ARCH_8M_MAIN__ 1
|
||||
#elif defined(__ARM8EM_MAINLINE__) && (__CORE == __ARM8EM_MAINLINE__)
|
||||
#define __ARM_ARCH_8M_MAIN__ 1
|
||||
#elif defined(__ARM8R__) && (__CORE__ == __ARM8R__)
|
||||
#define __ARM_ARCH_8R__ 1
|
||||
#else
|
||||
#error "Unknown target."
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** @addtogroup Configuration_of_CMSIS
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* =========================================================================================================================== */
|
||||
/* ================ Interrupt Number Definition ================ */
|
||||
/* =========================================================================================================================== */
|
||||
/* IRQn_Type is generated as part of an FSP project. It can be found in vector_data.h. */
|
||||
|
||||
/** @} */ /* End of group Configuration_of_CMSIS */
|
||||
|
||||
/* =========================================================================================================================== */
|
||||
/* ================ Processor and Core Peripheral Section ================ */
|
||||
/* =========================================================================================================================== */
|
||||
|
||||
#if __ARM_ARCH_7EM__
|
||||
#define RENESAS_CORTEX_M4
|
||||
#elif __ARM_ARCH_6M__
|
||||
#define RENESAS_CORTEX_M0PLUS
|
||||
#elif __ARM_ARCH_8M_BASE__
|
||||
#define RENESAS_CORTEX_M23
|
||||
#elif __ARM_ARCH_8M_MAIN__
|
||||
#define RENESAS_CORTEX_M33
|
||||
#elif __ARM_ARCH_8R__
|
||||
#define RENESAS_CORTEX_R52
|
||||
#else
|
||||
#warning Unsupported Architecture
|
||||
#endif
|
||||
|
||||
#if BSP_MCU_GROUP_RZN2L
|
||||
#include "R9A07G084.h"
|
||||
#else
|
||||
#warning Unsupported MCU
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* RZN2_H */
|
||||
|
||||
/** @} */ /* End of group RZN2 */
|
||||
|
||||
/** @} */ /* End of group Renesas Electronics Corporation */
|
||||
@@ -0,0 +1,58 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef SYSTEM_RENESAS_ARM_H
|
||||
#define SYSTEM_RENESAS_ARM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
extern uint32_t SystemCoreClock; /** System Clock Frequency (Core Clock) */
|
||||
|
||||
/**
|
||||
* Initialize the system
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*
|
||||
* @brief Setup the microcontroller system.
|
||||
* Initialize the System and update the SystemCoreClock variable.
|
||||
*/
|
||||
extern void SystemInit(void);
|
||||
|
||||
/**
|
||||
* Update SystemCoreClock variable
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*
|
||||
* @brief Updates the SystemCoreClock with current core Clock
|
||||
* retrieved from cpu registers.
|
||||
*/
|
||||
extern void SystemCoreClockUpdate(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,197 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
extern void bsp_master_mpu_init(void);
|
||||
extern void bsp_global_system_counter_init(void);
|
||||
|
||||
#if BSP_FEATURE_TFU_SUPPORTED
|
||||
extern void bsp_tfu_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
#if BSP_CFG_C_RUNTIME_INIT
|
||||
extern void bsp_loader_data_init(void);
|
||||
extern void bsp_loader_bss_init(void);
|
||||
extern void bsp_static_constructor_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
#if !(BSP_CFG_RAM_EXECUTION)
|
||||
extern void bsp_copy_to_ram(void);
|
||||
extern void bsp_application_bss_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
#if !BSP_CFG_PORT_PROTECT
|
||||
extern void bsp_release_port_protect(void);
|
||||
|
||||
#endif
|
||||
|
||||
extern void bsp_memory_protect_setting(void);
|
||||
extern void bsp_irq_cfg_common(void);
|
||||
|
||||
extern void R_BSP_WarmStart(bsp_warm_start_event_t event);
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
int32_t main(void);
|
||||
|
||||
#if BSP_CFG_EARLY_INIT
|
||||
static void bsp_init_uninitialized_vars(void);
|
||||
|
||||
#endif
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Initialize the MCU and the runtime environment.
|
||||
**********************************************************************************************************************/
|
||||
void SystemInit (void)
|
||||
{
|
||||
#if BSP_CFG_EARLY_INIT
|
||||
|
||||
/* Initialize uninitialized BSP variables early for use in R_BSP_WarmStart. */
|
||||
bsp_init_uninitialized_vars();
|
||||
#endif
|
||||
|
||||
/* Call before initializing clock and variables. */
|
||||
R_BSP_WarmStart(BSP_WARM_START_RESET);
|
||||
|
||||
/* Configure system clocks. */
|
||||
bsp_clock_init();
|
||||
|
||||
/* Call post clock initialization hook. */
|
||||
R_BSP_WarmStart(BSP_WARM_START_POST_CLOCK);
|
||||
|
||||
#if BSP_CFG_C_RUNTIME_INIT
|
||||
|
||||
/* Copy the loader data from external Flash to internal RAM. */
|
||||
bsp_loader_data_init();
|
||||
|
||||
/* Clear loader bss section in internal RAM. */
|
||||
bsp_loader_bss_init();
|
||||
#endif
|
||||
|
||||
/* Initialize SystemCoreClock variable. */
|
||||
SystemCoreClockUpdate();
|
||||
|
||||
/* Set memory attributes, etc. */
|
||||
bsp_memory_protect_setting();
|
||||
|
||||
#if !(BSP_CFG_RAM_EXECUTION)
|
||||
|
||||
/* Copy the application program from external Flash to internal RAM. */
|
||||
bsp_copy_to_ram();
|
||||
|
||||
/* Clear bss section in internal RAM. */
|
||||
bsp_application_bss_init();
|
||||
#endif
|
||||
|
||||
#if BSP_CFG_C_RUNTIME_INIT
|
||||
|
||||
/* Initialize static constructors */
|
||||
bsp_static_constructor_init();
|
||||
#endif
|
||||
|
||||
#if !BSP_CFG_PORT_PROTECT
|
||||
|
||||
/* When writing to the PRCR register the upper 8-bits must be the correct key. Set lower bits to 0 to
|
||||
* disable writes. */
|
||||
bsp_release_port_protect();
|
||||
#endif
|
||||
|
||||
/* Call Post C runtime initialization hook. */
|
||||
R_BSP_WarmStart(BSP_WARM_START_POST_C);
|
||||
|
||||
/* Initialize the Master-MPU settings. */
|
||||
bsp_master_mpu_init();
|
||||
|
||||
/* Initialize global system counter. The counter is enabled and is incrementing. */
|
||||
bsp_global_system_counter_init();
|
||||
|
||||
/* GIC initialization */
|
||||
bsp_irq_cfg_common();
|
||||
|
||||
/* Initialize GIC interrupts. */
|
||||
bsp_irq_cfg();
|
||||
|
||||
#if BSP_FEATURE_TFU_SUPPORTED
|
||||
|
||||
/* Initialize the TFU settings. */
|
||||
bsp_tfu_init();
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
extern void entry(void);
|
||||
entry();
|
||||
#elif defined(__ICCARM__)
|
||||
extern void __low_level_init(void);
|
||||
__low_level_init();
|
||||
#else
|
||||
/* Jump to main. */
|
||||
main();
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @} (end addtogroup BSP_MCU) */
|
||||
|
||||
#if BSP_CFG_EARLY_INIT
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Initialize BSP variables not handled by C runtime startup.
|
||||
**********************************************************************************************************************/
|
||||
static void bsp_init_uninitialized_vars (void)
|
||||
{
|
||||
g_protect_port_counter = 0;
|
||||
|
||||
extern volatile uint16_t g_protect_counters[];
|
||||
for (uint32_t i = 0; i < 4; i++)
|
||||
{
|
||||
g_protect_counters[i] = 0;
|
||||
}
|
||||
|
||||
SystemCoreClockUpdate();
|
||||
}
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,67 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_CACHE_H
|
||||
#define BSP_CACHE_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#if defined(BSP_CFG_CORE_CR52)
|
||||
#include "cr/bsp_cache_core.h"
|
||||
#endif
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
void R_BSP_CacheEnableInst(void);
|
||||
void R_BSP_CacheEnableData(void);
|
||||
void R_BSP_CacheEnableMemoryProtect(void);
|
||||
void R_BSP_CacheDisableInst(void);
|
||||
void R_BSP_CacheDisableData(void);
|
||||
void R_BSP_CacheDisableMemoryProtect(void);
|
||||
void R_BSP_CacheCleanAll(void);
|
||||
void R_BSP_CacheInvalidateAll(void);
|
||||
void R_BSP_CacheCleanInvalidateAll(void);
|
||||
void R_BSP_CacheCleanRange(uintptr_t base_address, uintptr_t length);
|
||||
void R_BSP_CacheInvalidateRange(uintptr_t base_address, uintptr_t length);
|
||||
void R_BSP_CacheCleanInvalidateRange(uintptr_t base_address, uintptr_t length);
|
||||
void R_BSP_CacheL3PowerCtrl(void);
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,110 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_COMPILER_SUPPORT_H
|
||||
#define BSP_COMPILER_SUPPORT_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#if (defined(__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3))
|
||||
#include <arm_cmse.h>
|
||||
#endif
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
#if defined(__ARMCC_VERSION) /* AC6 compiler */
|
||||
|
||||
/* The AC6 linker requires uninitialized code to be placed in a section that starts with ".bss." Without this, load
|
||||
* memory (ROM) is reserved unnecessarily. */
|
||||
#define BSP_UNINIT_SECTION_PREFIX ".bss"
|
||||
#define BSP_SECTION_HEAP BSP_UNINIT_SECTION_PREFIX ".heap"
|
||||
#define BSP_DONT_REMOVE
|
||||
#define BSP_ATTRIBUTE_STACKLESS __attribute__((naked))
|
||||
#define BSP_FORCE_INLINE __attribute__((always_inline))
|
||||
#define BSP_TARGET_ARM #pragma arm
|
||||
#elif defined(__GNUC__) /* GCC compiler */
|
||||
#define BSP_UNINIT_SECTION_PREFIX
|
||||
#define BSP_SECTION_HEAP ".heap"
|
||||
#define BSP_DONT_REMOVE
|
||||
#define BSP_ATTRIBUTE_STACKLESS __attribute__((naked))
|
||||
#define BSP_FORCE_INLINE __attribute__((always_inline))
|
||||
#define BSP_TARGET_ARM __attribute__((target("arm")))
|
||||
#elif defined(__ICCARM__) /* IAR compiler */
|
||||
#define BSP_UNINIT_SECTION_PREFIX
|
||||
#define BSP_SECTION_HEAP "HEAP"
|
||||
#define BSP_DONT_REMOVE __root
|
||||
#define BSP_ATTRIBUTE_STACKLESS __stackless
|
||||
#define BSP_FORCE_INLINE _Pragma("inline=forced")
|
||||
#define BSP_TARGET_ARM __arm
|
||||
#endif
|
||||
|
||||
#define BSP_SECTION_FIQ_STACK BSP_UNINIT_SECTION_PREFIX ".fiq_stack"
|
||||
#define BSP_SECTION_IRQ_STACK BSP_UNINIT_SECTION_PREFIX ".irq_stack"
|
||||
#define BSP_SECTION_ABT_STACK BSP_UNINIT_SECTION_PREFIX ".abt_stack"
|
||||
#define BSP_SECTION_UND_STACK BSP_UNINIT_SECTION_PREFIX ".und_stack"
|
||||
#define BSP_SECTION_SYS_STACK BSP_UNINIT_SECTION_PREFIX ".sys_stack"
|
||||
#define BSP_SECTION_SVC_STACK BSP_UNINIT_SECTION_PREFIX ".svc_stack"
|
||||
#define BSP_SECTION_NOINIT BSP_UNINIT_SECTION_PREFIX ".noinit"
|
||||
#define BSP_SECTION_FIXED_VECTORS ".fixed_vectors"
|
||||
#define BSP_SECTION_APPLICATION_VECTORS ".application_vectors"
|
||||
#define BSP_SECTION_ROM_REGISTERS ".rom_registers"
|
||||
#define BSP_SECTION_ID_CODE ".id_code"
|
||||
#define BSP_SECTION_LOADER_PARAM ".loader_param"
|
||||
|
||||
/* Compiler neutral macros. */
|
||||
#define BSP_PLACE_IN_SECTION(x) __attribute__((section(x))) __attribute__((__used__))
|
||||
|
||||
#define BSP_ALIGN_VARIABLE(x) __attribute__((aligned(x)))
|
||||
|
||||
#define BSP_PACKED __attribute__((aligned(1)))
|
||||
|
||||
#define BSP_WEAK_REFERENCE __attribute__((weak))
|
||||
|
||||
/** Stacks (and heap) must be sized and aligned to an integer multiple of this number. */
|
||||
#define BSP_STACK_ALIGNMENT (8)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** @} (end of addtogroup BSP_MCU) */
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,159 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
#include "bsp_delay.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
#define BSP_DELAY_NS_PER_SECOND (1000000000)
|
||||
#define BSP_DELAY_NS_PER_US (1000)
|
||||
#define BSP_DELAY_SIGNIFICANT_DIGITS (10000)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Delay for at least the specified duration in units and return.
|
||||
* @param[in] delay The number of 'units' to delay.
|
||||
* @param[in] units The 'base' (bsp_delay_units_t) for the units specified. Valid values are:
|
||||
* BSP_DELAY_UNITS_SECONDS, BSP_DELAY_UNITS_MILLISECONDS, BSP_DELAY_UNITS_MICROSECONDS.@n
|
||||
* For example:@n
|
||||
* At 200 MHz one cycle takes 1/200 microsecond or 5 nanoseconds.@n
|
||||
* At 800 MHz one cycle takes 1/800 microsecond or 1.25 nanoseconds.@n
|
||||
* Therefore one run through bsp_prv_software_delay_loop() takes:
|
||||
* ~ (1.25 * BSP_DELAY_LOOP_CYCLES) or 5 ns.
|
||||
* A delay of 2 us therefore requires 2000ns/5ns or 400 loops.
|
||||
*
|
||||
* The 'theoretical' maximum delay that may be obtained is determined by a full 32 bit loop count and the system clock rate.
|
||||
* @200MHz: ((0xFFFFFFFF loops * 4 cycles /loop) / 200000000) = 85 seconds.
|
||||
* @800MHz: ((0xFFFFFFFF loops * 4 cycles /loop) / 800000000) = 21 seconds.
|
||||
*
|
||||
* Note that requests for very large delays will be affected by rounding in the calculations and the actual delay
|
||||
* achieved may be slightly longer. @200 MHz, for example, a request for 85 seconds will be closer to 86 seconds.
|
||||
*
|
||||
* Note also that if the calculations result in a loop_cnt of zero, the bsp_prv_software_delay_loop() function is not called
|
||||
* at all. In this case the requested delay is too small (nanoseconds) to be carried out by the loop itself, and the
|
||||
* overhead associated with executing the code to just get to this point has certainly satisfied the requested delay.
|
||||
*
|
||||
*
|
||||
* @note R_BSP_SoftwareDelay() obtains the system clock value by reading the SystemCoreClock variable.
|
||||
* Therefore, R_BSP_SoftwareDelay() cannot be used until after the SystemCoreClock has been updated.
|
||||
* The SystemCoreClock is updated by executing SystemCoreClockUpdate() in startup;
|
||||
* users cannot call R_BSP_SoftwareDelay() inside R_BSP_WarmStart(BSP_WARM_START_RESET) and
|
||||
* R_BSP_WarmStart(BSP_WARM_START_POST_CLOCK) since they are invoked before SystemCoreClockUpdate() in startup.
|
||||
*
|
||||
* @note This function will delay for **at least** the specified duration. Due to overhead in calculating the correct number
|
||||
* of loops to delay, very small delay values (generally 1-5 microseconds) may be significantly longer than specified.
|
||||
* Approximate overhead for this function is as follows:
|
||||
* - CR52: 87-94 cycles
|
||||
*
|
||||
* @note If more accurate microsecond timing must be performed in software it is recommended to use
|
||||
* bsp_prv_software_delay_loop() directly. In this case, use BSP_DELAY_LOOP_CYCLES or BSP_DELAY_LOOPS_CALCULATE()
|
||||
* to convert a calculated delay cycle count to a number of software delay loops.
|
||||
*
|
||||
* @note Delays may be longer than expected when compiler optimization is turned off.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
void R_BSP_SoftwareDelay (uint32_t delay, bsp_delay_units_t units)
|
||||
{
|
||||
uint32_t cpu_hz;
|
||||
uint32_t cycles_requested;
|
||||
uint32_t ns_per_cycle;
|
||||
uint32_t loops_required = 0;
|
||||
uint32_t total_us = (delay * units); /** Convert the requested time to microseconds. */
|
||||
uint64_t ns_64bits;
|
||||
|
||||
cpu_hz = SystemCoreClock; /** Get the system clock frequency in Hz. */
|
||||
|
||||
/* BSP_DELAY_SIGNIFICANT_DIGITS to keep the decimal point. */
|
||||
ns_per_cycle = BSP_DELAY_NS_PER_SECOND / (cpu_hz / BSP_DELAY_SIGNIFICANT_DIGITS); /** Get the # of nanoseconds/cycle. */
|
||||
|
||||
/* We want to get the time in total nanoseconds but need to be conscious of overflowing 32 bits. We also do not want to do 64 bit */
|
||||
/* division as that pulls in a division library. */
|
||||
ns_64bits = (uint64_t) total_us * (uint64_t) BSP_DELAY_NS_PER_US; // Convert to ns.
|
||||
|
||||
/* Have we overflowed 32 bits? */
|
||||
if (ns_64bits <= UINT32_MAX)
|
||||
{
|
||||
ns_64bits = ns_64bits * (uint64_t) BSP_DELAY_SIGNIFICANT_DIGITS;
|
||||
|
||||
/* No, we will not overflow.
|
||||
* Multiply the calculation result by BSP_DELAY_SIGNIFICANT_DIGITS to disable the retention of the decimal point.*/
|
||||
cycles_requested = (uint32_t) (ns_64bits / (uint64_t) ns_per_cycle);
|
||||
loops_required = cycles_requested / BSP_DELAY_LOOP_CYCLES;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We did overflow. Try dividing down first.
|
||||
* Multiply the calculation result by BSP_DELAY_SIGNIFICANT_DIGITS to disable the retention of the decimal point.*/
|
||||
total_us = (total_us / (ns_per_cycle * BSP_DELAY_LOOP_CYCLES)) * BSP_DELAY_SIGNIFICANT_DIGITS;
|
||||
ns_64bits = (uint64_t) total_us * (uint64_t) BSP_DELAY_NS_PER_US; // Convert to ns.
|
||||
|
||||
/* Have we overflowed 32 bits? */
|
||||
if (ns_64bits <= UINT32_MAX)
|
||||
{
|
||||
/* No, we will not overflow. */
|
||||
loops_required = (uint32_t) ns_64bits;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We still overflowed, use the max count for cycles */
|
||||
loops_required = UINT32_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
/** Only delay if the supplied parameters constitute a delay. */
|
||||
if (loops_required > (uint32_t) 0)
|
||||
{
|
||||
bsp_prv_software_delay_loop(loops_required);
|
||||
}
|
||||
}
|
||||
|
||||
/** @} (end addtogroup BSP_MCU) */
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* This assembly language routine takes roughly 4 cycles per loop. 2 additional cycles
|
||||
* occur when the loop exits. The 'naked' attribute indicates that the specified function does not need
|
||||
* prologue/epilogue sequences generated by the compiler.
|
||||
* @param[in] loop_cnt The number of loops to iterate.
|
||||
**********************************************************************************************************************/
|
||||
void bsp_prv_software_delay_loop (uint32_t loop_cnt)
|
||||
{
|
||||
r_bsp_software_delay_loop(loop_cnt);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_DELAY_H
|
||||
#define BSP_DELAY_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#if defined(BSP_CFG_CORE_CR52)
|
||||
#include "cr/bsp_delay_core.h"
|
||||
#endif
|
||||
|
||||
#include "bsp_compiler_support.h"
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Available delay units for R_BSP_SoftwareDelay(). These are ultimately used to calculate a total # of microseconds */
|
||||
typedef enum
|
||||
{
|
||||
BSP_DELAY_UNITS_SECONDS = 1000000, ///< Requested delay amount is in seconds
|
||||
BSP_DELAY_UNITS_MILLISECONDS = 1000, ///< Requested delay amount is in milliseconds
|
||||
BSP_DELAY_UNITS_MICROSECONDS = 1 ///< Requested delay amount is in microseconds
|
||||
} bsp_delay_units_t;
|
||||
|
||||
/** @} (end addtogroup BSP_MCU) */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
void bsp_prv_software_delay_loop(uint32_t loop_cnt);
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,50 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_EXCEPTIONS_H
|
||||
#define BSP_EXCEPTIONS_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
volatile uint32_t g_protect_port_counter;
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,50 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Initialize interrupt controller.
|
||||
*
|
||||
* @retval None
|
||||
**********************************************************************************************************************/
|
||||
void bsp_irq_cfg (void)
|
||||
{
|
||||
bsp_irq_core_cfg();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,64 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_MCU_API_H
|
||||
#define BSP_MCU_API_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
typedef struct st_bsp_event_info
|
||||
{
|
||||
IRQn_Type irq;
|
||||
elc_event_t event;
|
||||
} bsp_event_info_t;
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
void R_BSP_RegisterProtectEnable(bsp_reg_protect_t regs_to_protect);
|
||||
void R_BSP_RegisterProtectDisable(bsp_reg_protect_t regs_to_unprotect);
|
||||
void R_BSP_SoftwareDelay(uint32_t delay, bsp_delay_units_t units);
|
||||
void R_BSP_SystemReset(void);
|
||||
void R_BSP_CPUReset(bsp_reset_t cpu);
|
||||
void R_BSP_CPUResetRelease(bsp_reset_t cpu);
|
||||
void R_BSP_ModuleResetEnable(bsp_module_reset_t module_to_enable);
|
||||
void R_BSP_ModuleResetDisable(bsp_module_reset_t module_to_disable);
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,116 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* Key code for writing PRCR register. */
|
||||
#define BSP_PRV_PRCR_KEY (0xA500U)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Used for holding reference counters for protection bits. */
|
||||
volatile uint16_t g_protect_counters[] =
|
||||
{
|
||||
0U, 0U, 0U, 0U
|
||||
};
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Masks for setting or clearing the PRCR register. Use -1 for size because PWPR in MPC is used differently. */
|
||||
static const uint16_t g_prcr_masks[] =
|
||||
{
|
||||
0x0001U, /* PRC0. */
|
||||
0x0002U, /* PRC1. */
|
||||
0x0004U, /* PRC2. */
|
||||
0x0008U, /* PRC3. */
|
||||
};
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
*
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Enable register protection. Registers that are protected cannot be written to. Register protection is
|
||||
* enabled by using the Protect Register (PRCR) and the MPC's Write-Protect Register (PWPR).
|
||||
*
|
||||
* @param[in] regs_to_protect Registers which have write protection enabled.
|
||||
**********************************************************************************************************************/
|
||||
void R_BSP_RegisterProtectEnable (bsp_reg_protect_t regs_to_protect)
|
||||
{
|
||||
/* Is it safe to disable write access? */
|
||||
if (0U != g_protect_counters[regs_to_protect])
|
||||
{
|
||||
/* Decrement the protect counter */
|
||||
g_protect_counters[regs_to_protect]--;
|
||||
}
|
||||
|
||||
/* Is it safe to disable write access? */
|
||||
if (0U == g_protect_counters[regs_to_protect])
|
||||
{
|
||||
/** Enable protection using PRCR register. */
|
||||
|
||||
/** When writing to the PRCR register the upper 8-bits must be the correct key. Set lower bits to 0 to
|
||||
* disable writes. */
|
||||
R_RWP_NS->PRCRN = ((R_RWP_NS->PRCRN | BSP_PRV_PRCR_KEY) & (uint16_t) (~g_prcr_masks[regs_to_protect]));
|
||||
R_RWP_S->PRCRS = ((R_RWP_S->PRCRS | BSP_PRV_PRCR_KEY) & (uint16_t) (~g_prcr_masks[regs_to_protect]));
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Disable register protection. Registers that are protected cannot be written to. Register protection is
|
||||
* disabled by using the Protect Register (PRCR) and the MPC's Write-Protect Register (PWPR).
|
||||
*
|
||||
* @param[in] regs_to_unprotect Registers which have write protection disabled.
|
||||
**********************************************************************************************************************/
|
||||
void R_BSP_RegisterProtectDisable (bsp_reg_protect_t regs_to_unprotect)
|
||||
{
|
||||
/* If this is first entry then disable protection. */
|
||||
if (0U == g_protect_counters[regs_to_unprotect])
|
||||
{
|
||||
/** Disable protection using PRCR register. */
|
||||
|
||||
/** When writing to the PRCR register the upper 8-bits must be the correct key. Set lower bits to 0 to
|
||||
* disable writes. */
|
||||
R_RWP_NS->PRCRN = ((R_RWP_NS->PRCRN | BSP_PRV_PRCR_KEY) | g_prcr_masks[regs_to_unprotect]);
|
||||
R_RWP_S->PRCRS = ((R_RWP_S->PRCRS | BSP_PRV_PRCR_KEY) | g_prcr_masks[regs_to_unprotect]);
|
||||
}
|
||||
|
||||
/** Increment the protect counter */
|
||||
g_protect_counters[regs_to_unprotect]++;
|
||||
}
|
||||
|
||||
/** @} (end addtogroup BSP_MCU) */
|
||||
@@ -0,0 +1,76 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_REGISTER_PROTECTION_H
|
||||
#define BSP_REGISTER_PROTECTION_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** The different types of registers that can be protected. */
|
||||
typedef enum e_bsp_reg_protect
|
||||
{
|
||||
/** Enables writing to the registers related to the clock generation circuit. */
|
||||
BSP_REG_PROTECT_CGC = 0,
|
||||
|
||||
/** Enables writing to the registers related to low power consumption and reset. */
|
||||
BSP_REG_PROTECT_LPC_RESET,
|
||||
|
||||
/** Enables writing to the registers related to GPIO. */
|
||||
BSP_REG_PROTECT_GPIO,
|
||||
|
||||
/** Enables writing to the registers related to Non-Safety reg. */
|
||||
BSP_REG_PROTECT_SYSTEM,
|
||||
} bsp_reg_protect_t;
|
||||
|
||||
/** @} (end addtogroup BSP_MCU) */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* Public functions defined in bsp.h */
|
||||
void bsp_register_protect_open(void); // Used internally by BSP
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,139 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
#define BSP_RESET_MRCTL_BIT_SHIFT_MASK (0x0000001FU)
|
||||
#define BSP_RESET_MRCTL_SELECT_MASK (0x001F0000U)
|
||||
#define BSP_RESET_MRCTL_REGION_SELECT_MASK (0x00400000U)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
*
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Occur the system software reset.
|
||||
**********************************************************************************************************************/
|
||||
void R_BSP_SystemReset (void)
|
||||
{
|
||||
/* System software reset. */
|
||||
R_SYSC_S->SWRSYS = BSP_PRV_RESET_KEY;
|
||||
}
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Occur the CPU software reset.
|
||||
*
|
||||
* @param[in] cpu to be reset state.
|
||||
**********************************************************************************************************************/
|
||||
void R_BSP_CPUReset (bsp_reset_t cpu)
|
||||
{
|
||||
/* CPU0 software reset. */
|
||||
R_BSP_RegisterProtectDisable(BSP_REG_PROTECT_LPC_RESET);
|
||||
R_SYSC_S->SWRCPU0 = BSP_PRV_RESET_KEY;
|
||||
R_BSP_RegisterProtectEnable(BSP_REG_PROTECT_LPC_RESET);
|
||||
__WFI();
|
||||
FSP_PARAMETER_NOT_USED(cpu);
|
||||
}
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Release the CPU reset state.
|
||||
*
|
||||
* @param[in] cpu to be release reset state.
|
||||
**********************************************************************************************************************/
|
||||
void R_BSP_CPUResetRelease (bsp_reset_t cpu)
|
||||
{
|
||||
/* Release CPU0 reset state. */
|
||||
R_SYSC_S->SWRCPU0 = BSP_PRV_RESET_RELEASE_KEY;
|
||||
FSP_PARAMETER_NOT_USED(cpu);
|
||||
}
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Enable module reset state.
|
||||
*
|
||||
* @param[in] module_to_enable Modules to enable module reset state.
|
||||
**********************************************************************************************************************/
|
||||
void R_BSP_ModuleResetEnable (bsp_module_reset_t module_to_enable)
|
||||
{
|
||||
volatile uint32_t mrctl;
|
||||
uint32_t * p_reg;
|
||||
|
||||
/** When MRCTLn register exists in the safety region,
|
||||
* it is necessary to add an offset of safety region. */
|
||||
p_reg = (uint32_t *) &R_SYSC_NS->MRCTLA +
|
||||
(((module_to_enable & BSP_RESET_MRCTL_SELECT_MASK) >> 16U) +
|
||||
(module_to_enable & BSP_RESET_MRCTL_REGION_SELECT_MASK));
|
||||
mrctl = 1U << (module_to_enable & BSP_RESET_MRCTL_BIT_SHIFT_MASK);
|
||||
|
||||
/** Enable module reset state using MRCTLE register. */
|
||||
*p_reg |= mrctl;
|
||||
|
||||
/** To ensure processing after module reset. */
|
||||
mrctl = *(volatile uint32_t *) (p_reg);
|
||||
}
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Disable module reset state.
|
||||
*
|
||||
* @param[in] module_to_disable Modules to disable module reset state.
|
||||
**********************************************************************************************************************/
|
||||
void R_BSP_ModuleResetDisable (bsp_module_reset_t module_to_disable)
|
||||
{
|
||||
volatile uint32_t mrctl;
|
||||
uint32_t * p_reg;
|
||||
|
||||
/** When MRCTLn register exists in the safety region,
|
||||
* it is necessary to add an offset of safety region. */
|
||||
p_reg = (uint32_t *) &R_SYSC_NS->MRCTLA +
|
||||
(((module_to_disable & BSP_RESET_MRCTL_SELECT_MASK) >> 16U) +
|
||||
(module_to_disable & BSP_RESET_MRCTL_REGION_SELECT_MASK));
|
||||
mrctl = 1U << (module_to_disable & BSP_RESET_MRCTL_BIT_SHIFT_MASK);
|
||||
|
||||
/** Disable module stop state using MRCTLn register. */
|
||||
*p_reg &= ~mrctl;
|
||||
|
||||
/** In order to secure processing after release from module reset,
|
||||
* dummy read the same register at least three times.
|
||||
* Refer to "Notes on Module Reset Control Register Operation" of the RZ microprocessor manual. */
|
||||
mrctl = *(volatile uint32_t *) (p_reg);
|
||||
mrctl = *(volatile uint32_t *) (p_reg);
|
||||
mrctl = *(volatile uint32_t *) (p_reg);
|
||||
}
|
||||
|
||||
/** @} (end addtogroup BSP_MCU) */
|
||||
@@ -0,0 +1,150 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_RESET_H
|
||||
#define BSP_RESET_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* Key code for writing reset register. */
|
||||
#define BSP_PRV_RESET_KEY (0x4321A501U)
|
||||
#define BSP_PRV_RESET_RELEASE_KEY (0x00000000U)
|
||||
|
||||
/* MRCTL register selection. Bits 16-20 assign values in order for the module control registers (A=0, E=4).
|
||||
* Bit 24 indicates whether MRCTLn register is in the safety region. */
|
||||
#define BSP_RESET_MRCTLA_SELECT (0x00000000U)
|
||||
#define BSP_RESET_MRCTLE_SELECT (0x00040000U)
|
||||
#define BSP_RESET_MRCTLI_SELECT (0x00480000U)
|
||||
|
||||
/* MRCTL register bit number. */
|
||||
#define BSP_RESET_MRCTL_BIT0_SHIFT (0x00000000U)
|
||||
#define BSP_RESET_MRCTL_BIT1_SHIFT (0x00000001U)
|
||||
#define BSP_RESET_MRCTL_BIT2_SHIFT (0x00000002U)
|
||||
#define BSP_RESET_MRCTL_BIT3_SHIFT (0x00000003U)
|
||||
#define BSP_RESET_MRCTL_BIT4_SHIFT (0x00000004U)
|
||||
#define BSP_RESET_MRCTL_BIT5_SHIFT (0x00000005U)
|
||||
#define BSP_RESET_MRCTL_BIT6_SHIFT (0x00000006U)
|
||||
#define BSP_RESET_MRCTL_BIT7_SHIFT (0x00000007U)
|
||||
#define BSP_RESET_MRCTL_BIT8_SHIFT (0x00000008U)
|
||||
#define BSP_RESET_MRCTL_BIT9_SHIFT (0x00000009U)
|
||||
#define BSP_RESET_MRCTL_BIT10_SHIFT (0x0000000AU)
|
||||
#define BSP_RESET_MRCTL_BIT11_SHIFT (0x0000000BU)
|
||||
#define BSP_RESET_MRCTL_BIT12_SHIFT (0x0000000CU)
|
||||
#define BSP_RESET_MRCTL_BIT13_SHIFT (0x0000000DU)
|
||||
#define BSP_RESET_MRCTL_BIT14_SHIFT (0x0000000EU)
|
||||
#define BSP_RESET_MRCTL_BIT15_SHIFT (0x0000000FU)
|
||||
#define BSP_RESET_MRCTL_BIT16_SHIFT (0x00000010U)
|
||||
#define BSP_RESET_MRCTL_BIT17_SHIFT (0x00000011U)
|
||||
#define BSP_RESET_MRCTL_BIT18_SHIFT (0x00000012U)
|
||||
#define BSP_RESET_MRCTL_BIT19_SHIFT (0x00000013U)
|
||||
#define BSP_RESET_MRCTL_BIT20_SHIFT (0x00000014U)
|
||||
#define BSP_RESET_MRCTL_BIT21_SHIFT (0x00000015U)
|
||||
#define BSP_RESET_MRCTL_BIT22_SHIFT (0x00000016U)
|
||||
#define BSP_RESET_MRCTL_BIT23_SHIFT (0x00000017U)
|
||||
#define BSP_RESET_MRCTL_BIT24_SHIFT (0x00000018U)
|
||||
#define BSP_RESET_MRCTL_BIT25_SHIFT (0x00000019U)
|
||||
#define BSP_RESET_MRCTL_BIT26_SHIFT (0x0000001AU)
|
||||
#define BSP_RESET_MRCTL_BIT27_SHIFT (0x0000001BU)
|
||||
#define BSP_RESET_MRCTL_BIT28_SHIFT (0x0000001CU)
|
||||
#define BSP_RESET_MRCTL_BIT29_SHIFT (0x0000001DU)
|
||||
#define BSP_RESET_MRCTL_BIT30_SHIFT (0x0000001EU)
|
||||
#define BSP_RESET_MRCTL_BIT31_SHIFT (0x0000001FU)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** CPU to be reset target.*/
|
||||
typedef enum e_bsp_reset
|
||||
{
|
||||
BSP_RESET_CR52_0 = 0, ///< Software reset for CR52_0
|
||||
} bsp_reset_t;
|
||||
|
||||
/** The different types of registers that can control the reset of peripheral modules related to Ethernet. */
|
||||
typedef enum e_bsp_module_reset
|
||||
{
|
||||
/** Enables writing to the registers related to xSPI Unit 0 reset control. */
|
||||
BSP_MODULE_RESET_XSPI0 = (BSP_RESET_MRCTLA_SELECT | BSP_RESET_MRCTL_BIT4_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to xSPI Unit 1 reset control. */
|
||||
BSP_MODULE_RESET_XSPI1 = (BSP_RESET_MRCTLA_SELECT | BSP_RESET_MRCTL_BIT5_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to GMAC (PCLKH clock domain) reset control. */
|
||||
BSP_MODULE_RESET_GMAC0_PCLKH = (BSP_RESET_MRCTLE_SELECT | BSP_RESET_MRCTL_BIT0_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to GMAC (PCLKM clock domain) reset control. */
|
||||
BSP_MODULE_RESET_GMAC0_PCLKM = (BSP_RESET_MRCTLE_SELECT | BSP_RESET_MRCTL_BIT1_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to ETHSW reset control. */
|
||||
BSP_MODULE_RESET_ETHSW = (BSP_RESET_MRCTLE_SELECT | BSP_RESET_MRCTL_BIT2_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to ESC (Bus clock domain) reset control. */
|
||||
BSP_MODULE_RESET_ESC_BUS = (BSP_RESET_MRCTLE_SELECT | BSP_RESET_MRCTL_BIT3_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to ESC (IP clock domain) reset control. */
|
||||
BSP_MODULE_RESET_ESC_IP = (BSP_RESET_MRCTLE_SELECT | BSP_RESET_MRCTL_BIT4_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to Ethernet subsystem register reset control. */
|
||||
BSP_MODULE_RESET_ESC_ETH_SUBSYSTEM = (BSP_RESET_MRCTLE_SELECT | BSP_RESET_MRCTL_BIT5_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to MII converter reset control. */
|
||||
BSP_MODULE_RESET_MII = (BSP_RESET_MRCTLE_SELECT | BSP_RESET_MRCTL_BIT6_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to PHOSTIF reset control. */
|
||||
BSP_MODULE_RESET_PHOSTIF = (BSP_RESET_MRCTLI_SELECT | BSP_RESET_MRCTL_BIT0_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to SHOSTIF (Master bus clock domain) reset control. */
|
||||
BSP_MODULE_RESET_SHOSTIF_MASTER_BUS_CLOCK = (BSP_RESET_MRCTLI_SELECT | BSP_RESET_MRCTL_BIT1_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to SHOSTIF (Slave bus clock domain) reset control. */
|
||||
BSP_MODULE_RESET_SHOSTIF_SLAVE_BUS_CLOCK = (BSP_RESET_MRCTLI_SELECT | BSP_RESET_MRCTL_BIT2_SHIFT),
|
||||
|
||||
/** Enables writing to the registers related to SHOSTIF (IP clock domain) reset control. */
|
||||
BSP_MODULE_RESET_SHOSTIF_IP_CLOCK = (BSP_RESET_MRCTLI_SELECT | BSP_RESET_MRCTL_BIT3_SHIFT),
|
||||
} bsp_module_reset_t;
|
||||
|
||||
/** @} (end addtogroup BSP_MCU) */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,108 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#if defined(__GNUC__) && !defined(__ARMCC_VERSION)
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private function prototypes
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
caddr_t _sbrk(int incr);
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* FSP implementation of the standard library _sbrk() function.
|
||||
* @param[in] inc The number of bytes being asked for by malloc().
|
||||
*
|
||||
* @note This function overrides the _sbrk version that exists in the newlib library that is linked with.
|
||||
* That version improperly relies on the SP as part of it's allocation strategy. This is bad in general and
|
||||
* worse in an RTOS environment. This version insures that we allocate the byte pool requested by malloc()
|
||||
* only from our allocated HEAP area. Also note that newlib is pre-built and forces the pagesize used by
|
||||
* malloc() to be 4096. That requires that we have a HEAP of at least 4096 if we are to support malloc().
|
||||
* @retval Address of allocated area if successful, -1 otherwise.
|
||||
**********************************************************************************************************************/
|
||||
caddr_t _sbrk (int incr)
|
||||
{
|
||||
extern char _Heap_Begin __asm("__HeapBase"); ///< Defined by the linker.
|
||||
|
||||
extern char _Heap_Limit __asm("__HeapLimit"); ///< Defined by the linker.
|
||||
|
||||
uint32_t bytes = (uint32_t) incr;
|
||||
static char * current_heap_end = 0;
|
||||
char * current_block_address;
|
||||
|
||||
if (current_heap_end == 0)
|
||||
{
|
||||
current_heap_end = &_Heap_Begin;
|
||||
}
|
||||
|
||||
current_block_address = current_heap_end;
|
||||
|
||||
/* The returned address must be aligned to a word boundary to prevent hard faults on cores that do not support
|
||||
* unaligned access. We assume the heap starts on a word boundary and make sure all allocations are a multiple
|
||||
* of 4. */
|
||||
bytes = (bytes + 3U) & (~3U);
|
||||
if (current_heap_end + bytes > &_Heap_Limit)
|
||||
{
|
||||
/** Heap has overflowed */
|
||||
errno = ENOMEM;
|
||||
|
||||
return (caddr_t) -1;
|
||||
}
|
||||
|
||||
current_heap_end += bytes;
|
||||
|
||||
return (caddr_t) current_block_address;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/******************************************************************************************************************//**
|
||||
* @} (end addtogroup BSP_MCU)
|
||||
*********************************************************************************************************************/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Powers on and off the L3 cache way.
|
||||
**********************************************************************************************************************/
|
||||
void r_bsp_cache_l3_power_ctrl (void)
|
||||
{
|
||||
/* Does nothing because CR52 does not have the CLUSTERPWRCTLR register. */
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_CACHE_CORE_H
|
||||
#define BSP_CACHE_CORE_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
void r_bsp_cache_l3_power_ctrl(void);
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,63 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* This assembly language routine takes roughly 4 cycles per loop. 2 additional cycles
|
||||
* occur when the loop exits. The 'naked' attribute indicates that the specified function does not need
|
||||
* prologue/epilogue sequences generated by the compiler.
|
||||
* @param[in] loop_cnt The number of loops to iterate.
|
||||
**********************************************************************************************************************/
|
||||
BSP_ATTRIBUTE_STACKLESS void r_bsp_software_delay_loop (__attribute__((unused)) uint32_t loop_cnt)
|
||||
{
|
||||
__asm volatile ("sw_delay_loop: \n"
|
||||
|
||||
#if defined(__ICCARM__) || defined(__ARMCC_VERSION)
|
||||
" subs r0, #1 \n" ///< 1 cycle
|
||||
#elif defined(__GNUC__)
|
||||
" sub r0, r0, #1 \n" ///< 1 cycle
|
||||
#endif
|
||||
|
||||
" cmp r0, #0 \n" ///< 1 cycle
|
||||
|
||||
" bne sw_delay_loop \n" ///< 2 cycles
|
||||
|
||||
" bx lr \n"); ///< 2 cycles
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef BSP_DELAY_CORE_H
|
||||
#define BSP_DELAY_CORE_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* The number of cycles required per software delay loop. */
|
||||
#ifndef BSP_DELAY_LOOP_CYCLES
|
||||
#define BSP_DELAY_LOOP_CYCLES (4)
|
||||
#endif
|
||||
|
||||
/* Calculates the number of delay loops to pass to r_bsp_software_delay_loop to achieve at least the requested cycle
|
||||
* count delay. This is 1 loop longer than optimal if cycles is a multiple of BSP_DELAY_LOOP_CYCLES, but it ensures
|
||||
* the requested number of loops is at least 1 since r_bsp_software_delay_loop cannot be called with a loop count
|
||||
* of 0. */
|
||||
#define BSP_DELAY_LOOPS_CALCULATE(cycles) (((cycles) / BSP_DELAY_LOOP_CYCLES) + 1U)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
BSP_ATTRIBUTE_STACKLESS void r_bsp_software_delay_loop(uint32_t loop_cnt);
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,146 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/** ELC event definitions. */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
#define BSP_IRQ_UINT32_MAX (0xFFFFFFFFU)
|
||||
|
||||
#define BSP_PRV_CLEAR_REG_MAX (13U)
|
||||
#define BSP_PRV_ALL_BIT_CLEAR (0xFFFFFFFFU)
|
||||
|
||||
#define BSP_PRV_ID_MASK (0x000003FFU)
|
||||
#define BSP_PRV_INTERRUPTABLE_NUM (32U)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
#if VECTOR_DATA_IRQ_COUNT > 0
|
||||
extern fsp_vector_t g_vector_table[BSP_ICU_VECTOR_MAX_ENTRIES];
|
||||
#endif
|
||||
extern fsp_vector_t g_sgi_ppi_vector_table[BSP_CORTEX_VECTOR_TABLE_ENTRIES];
|
||||
|
||||
extern const uint32_t BSP_GICD_ICFGR_INIT[BSP_NON_SELECTABLE_ICFGR_MAX];
|
||||
|
||||
/* This table is used to store the context in the ISR. */
|
||||
void * gp_renesas_isr_context[BSP_ICU_VECTOR_MAX_ENTRIES + BSP_CORTEX_VECTOR_TABLE_ENTRIES];
|
||||
|
||||
/* GIC current interrupt ID and variable. */
|
||||
IRQn_Type g_current_interrupt_num[BSP_PRV_INTERRUPTABLE_NUM];
|
||||
uint8_t g_current_interrupt_pointer = 0;
|
||||
|
||||
const bsp_interrupt_event_t g_interrupt_event_link_select[BSP_ICU_VECTOR_MAX_ENTRIES] BSP_WEAK_REFERENCE =
|
||||
{
|
||||
(bsp_interrupt_event_t) 0
|
||||
};
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* Using the vector table information section that has been built by the linker and placed into ROM in the
|
||||
* .vector_info. section, this function will initialize the ICU so that configured ELC events will trigger interrupts
|
||||
* in the NVIC.
|
||||
*
|
||||
**********************************************************************************************************************/
|
||||
void bsp_irq_core_cfg (void)
|
||||
{
|
||||
uint32_t gicd_reg_num;
|
||||
GICD_Type * GICD;
|
||||
GICR_CONTROL_TARGET_Type * GICR_TARGET0_IFREG;
|
||||
|
||||
GICD = BSP_PRV_GICD_ADDRESS;
|
||||
GICR_TARGET0_IFREG = BSP_PRV_GICR_TARGET0_IFREG_ADDRESS;
|
||||
|
||||
/* Enable Group1 interrupts from the GIC Distributor to the GIC CPU interface. */
|
||||
GICD->GICD_CTLR |= 0x00000002UL;
|
||||
|
||||
/* Release Processor Sleep state of the target. */
|
||||
GICR_TARGET0_IFREG->GICR_WAKER = 0x00000000UL;
|
||||
|
||||
/* Initialize GICD_ICFGR register for the edge-triggered interrupt. */
|
||||
for (gicd_reg_num = 0; gicd_reg_num < BSP_NON_SELECTABLE_ICFGR_MAX; gicd_reg_num++)
|
||||
{
|
||||
GICD->GICD_ICFGR[gicd_reg_num] = BSP_GICD_ICFGR_INIT[gicd_reg_num];
|
||||
}
|
||||
|
||||
/* Clear the Pending and Active bit for the all interrupts. */
|
||||
for (gicd_reg_num = 0; gicd_reg_num < BSP_PRV_CLEAR_REG_MAX; gicd_reg_num++)
|
||||
{
|
||||
GICD->GICD_ICPENDR[gicd_reg_num] = BSP_PRV_ALL_BIT_CLEAR;
|
||||
GICD->GICD_ICACTIVER[gicd_reg_num] = BSP_PRV_ALL_BIT_CLEAR;
|
||||
}
|
||||
|
||||
__asm volatile ("cpsie i \n" /* Enable IRQ Interrupts */
|
||||
"cpsie f \n" /* Enable FIQ Interrupts */
|
||||
"cpsie a \n" /* Enable SError Interrupts */
|
||||
"isb"); /* Ensuring Context-changing */
|
||||
}
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* This function is called first when an interrupt is generated and branches to each interrupt isr function.
|
||||
*
|
||||
* @param[in] id GIC INTID used to identify the interrupt.
|
||||
**********************************************************************************************************************/
|
||||
void bsp_common_interrupt_handler (uint32_t id)
|
||||
{
|
||||
uint16_t gic_intid;
|
||||
IRQn_Type irq;
|
||||
|
||||
/* Get interrupt ID (GIC INTID). */
|
||||
gic_intid = (uint16_t) (id & BSP_PRV_ID_MASK);
|
||||
|
||||
irq = (IRQn_Type) (gic_intid - BSP_CORTEX_VECTOR_TABLE_ENTRIES);
|
||||
|
||||
/* Remain the interrupt number */
|
||||
g_current_interrupt_num[g_current_interrupt_pointer++] = irq;
|
||||
__asm volatile ("dmb");
|
||||
|
||||
BSP_CFG_MULTIPLEX_INTERRUPT_ENABLE
|
||||
|
||||
#if VECTOR_DATA_IRQ_COUNT > 0
|
||||
if (BSP_CORTEX_VECTOR_TABLE_ENTRIES <= gic_intid)
|
||||
{
|
||||
/* Branch to an interrupt handler. */
|
||||
g_vector_table[irq]();
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* Branch to an interrupt handler. */
|
||||
g_sgi_ppi_vector_table[gic_intid]();
|
||||
}
|
||||
|
||||
g_current_interrupt_pointer--;
|
||||
|
||||
BSP_CFG_MULTIPLEX_INTERRUPT_DISABLE
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,86 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @addtogroup BSP_MCU_RZN2L
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Array of GICD_ICFGR initialization value. */
|
||||
const uint32_t BSP_GICD_ICFGR_INIT[BSP_NON_SELECTABLE_ICFGR_MAX] =
|
||||
{
|
||||
0xAAAAAAAAUL, /* Event No. 0 to 15 */
|
||||
0x000000AAUL, /* Event No. 16 to 31 */
|
||||
0x00000000UL, /* Event No. 32 to 47 */
|
||||
0xAAAAA800UL, /* Event No. 48 to 63 */
|
||||
0xAAAAAAAAUL, /* Event No. 64 to 79 */
|
||||
0xAAAAAAAAUL, /* Event No. 80 to 95 */
|
||||
0xAAAAAAAAUL, /* Event No. 96 to 111 */
|
||||
0xAAAAAA00UL, /* Event No. 112 to 127 */
|
||||
0xAAAAAAAAUL, /* Event No. 128 to 143 */
|
||||
0xAAAAAAAAUL, /* Event No. 144 to 159 */
|
||||
0xAAAAAAAAUL, /* Event No. 160 to 175 */
|
||||
0xAAAAAAAAUL, /* Event No. 176 to 191 */
|
||||
0xAAAAAAAAUL, /* Event No. 192 to 207 */
|
||||
0xAAAAAAAAUL, /* Event No. 208 to 223 */
|
||||
0xAAAAAAAAUL, /* Event No. 224 to 239 */
|
||||
0x0000000AUL, /* Event No. 240 to 255 */
|
||||
0xA8000000UL, /* Event No. 256 to 271 */
|
||||
0xA82A2AAAUL, /* Event No. 272 to 287 */
|
||||
0x28282828UL, /* Event No. 288 to 303 */
|
||||
0x00282828UL, /* Event No. 304 to 319 */
|
||||
0xA82A0A00UL, /* Event No. 320 to 335 */
|
||||
0xA0AA8020UL, /* Event No. 336 to 351 */
|
||||
0x00000002UL, /* Event No. 352 to 367 */
|
||||
0x00000000UL, /* Event No. 368 to 383 */
|
||||
0xAAAA0A0AUL, /* Event No. 384 to 399 */
|
||||
0xAAAAAAAAUL, /* Event No. 400 to 415 */
|
||||
0x00AAAAAAUL, /* Event No. 416 to 431 */
|
||||
0x828A0A2AUL, /* Event No. 432 to 447 */
|
||||
};
|
||||
|
||||
const uint32_t BSP_GICR_SGI_PPI_ICFGR_INIT[BSP_EVENT_SGI_PPI_ARRAY_NUM] =
|
||||
{
|
||||
0xAAAAAAAAUL, /* event SGI */
|
||||
0x00020000UL, /* event PPI */
|
||||
};
|
||||
|
||||
/** @} (end addtogroup BSP_MCU_RZN2L) */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
@@ -0,0 +1,69 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
#include "bsp_api.h"
|
||||
|
||||
#if !(BSP_CFG_RAM_EXECUTION)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
#define BSP_LOADER_PARAM_MAX (19)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* Parameter Information for the Loader. */
|
||||
BSP_DONT_REMOVE const uint32_t g_bsp_loader_param[BSP_LOADER_PARAM_MAX] BSP_PLACE_IN_SECTION(BSP_SECTION_LOADER_PARAM) =
|
||||
{
|
||||
BSP_CFG_CACHE_FLG,
|
||||
BSP_CFG_CS0BCR_V_WRAPCFG_V,
|
||||
BSP_CFG_CS0WCR_V_COMCFG_V,
|
||||
BSP_CFG_DUMMY0_BMCFG_V,
|
||||
BSP_CFG_BSC_FLG_xSPI_FLG,
|
||||
BSP_CFG_LDR_ADDR_NML,
|
||||
BSP_CFG_LDR_SIZE_NML,
|
||||
BSP_CFG_DEST_ADDR_NML,
|
||||
BSP_CFG_DUMMY1,
|
||||
BSP_CFG_DUMMY2,
|
||||
BSP_CFG_DUMMY3_CSSCTL_V,
|
||||
BSP_CFG_DUMMY4_LIOCFGCS0_V,
|
||||
BSP_CFG_DUMMY5,
|
||||
BSP_CFG_DUMMY6,
|
||||
BSP_CFG_DUMMY7,
|
||||
BSP_CFG_DUMMY8,
|
||||
BSP_CFG_DUMMY9,
|
||||
BSP_CFG_DUMMY10_ACCESS_SPEED,
|
||||
BSP_CFG_CHECK_SUM
|
||||
};
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Private global variables and functions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
/***********************************************************************************************************************
|
||||
* Copyright [2020-2024] Renesas Electronics Corporation and/or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This software and documentation are supplied by Renesas Electronics Corporation and/or its affiliates and may only
|
||||
* be used with products of Renesas Electronics Corp. and its affiliates ("Renesas"). No other uses are authorized.
|
||||
* Renesas products are sold pursuant to Renesas terms and conditions of sale. Purchasers are solely responsible for
|
||||
* the selection and use of Renesas products and Renesas assumes no liability. No license, express or implied, to any
|
||||
* intellectual property right is granted by Renesas. This software is protected under all applicable laws, including
|
||||
* copyright laws. Renesas reserves the right to change or discontinue this software and/or this documentation.
|
||||
* THE SOFTWARE AND DOCUMENTATION IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND
|
||||
* TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY,
|
||||
* INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE
|
||||
* SOFTWARE OR DOCUMENTATION. RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.
|
||||
* TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR
|
||||
* DOCUMENTATION (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER,
|
||||
* INCLUDING, WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY
|
||||
* LOST PROFITS, OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* @ingroup BSP_MCU
|
||||
* @defgroup BSP_MCU_RZN2L RZN2L
|
||||
* @includedoc config_bsp_rzn2l_fsp.html
|
||||
* @{
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** @} (end defgroup BSP_MCU_RZN2L) */
|
||||
|
||||
#ifndef BSP_MCU_INFO_H
|
||||
#define BSP_MCU_INFO_H
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Includes <System Includes> , "Project Includes"
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/* BSP MCU Specific Includes. */
|
||||
#include "bsp_elc.h"
|
||||
#include "bsp_feature.h"
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
|
||||
FSP_HEADER
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Macro definitions
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Typedef definitions
|
||||
**********************************************************************************************************************/
|
||||
typedef elc_event_t bsp_interrupt_event_t;
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global variables
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Exported global functions (to be accessed by other files)
|
||||
**********************************************************************************************************************/
|
||||
|
||||
/** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
|
||||
FSP_FOOTER
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
Import('RTT_ROOT')
|
||||
Import('rtconfig')
|
||||
from building import *
|
||||
from gcc import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
src = []
|
||||
group = []
|
||||
CPPPATH = []
|
||||
|
||||
if rtconfig.PLATFORM in ['iccarm']:
|
||||
Return('group')
|
||||
elif rtconfig.PLATFORM in GetGCCLikePLATFORM():
|
||||
if GetOption('target') != 'mdk5':
|
||||
src = Glob('*.c')
|
||||
CPPPATH = [cwd+'/fsp_cfg', cwd + '/fsp_cfg/bsp']
|
||||
|
||||
group += DefineGroup('rz_cfg', src, depend = [''], CPPPATH = CPPPATH)
|
||||
Return('group')
|
||||
@@ -0,0 +1,25 @@
|
||||
/* generated configuration header file - do not edit */
|
||||
#ifndef BOARD_CFG_H_
|
||||
#define BOARD_CFG_H_
|
||||
#include "../../../rzn/board/rzn2l_rsk/board.h"
|
||||
#define BSP_CFG_XSPI0_X1_BOOT (1)
|
||||
#define BSP_CFG_CACHE_FLG (0x00000000)
|
||||
#define BSP_CFG_CS0BCR_V_WRAPCFG_V (0x00000000)
|
||||
#define BSP_CFG_CS0WCR_V_COMCFG_V (0x00000000)
|
||||
#define BSP_CFG_DUMMY0_BMCFG_V (0x00000000)
|
||||
#define BSP_CFG_BSC_FLG_xSPI_FLG (0x00000000)
|
||||
#define BSP_CFG_LDR_ADDR_NML (0x6000004C)
|
||||
#define BSP_CFG_LDR_SIZE_NML (0x00006000)
|
||||
#define BSP_CFG_DEST_ADDR_NML (0x00102000)
|
||||
#define BSP_CFG_DUMMY1 (0x00000000)
|
||||
#define BSP_CFG_DUMMY2 (0x00000000)
|
||||
#define BSP_CFG_DUMMY3_CSSCTL_V (0x0000003F)
|
||||
#define BSP_CFG_DUMMY4_LIOCFGCS0_V (0x00070000)
|
||||
#define BSP_CFG_DUMMY5 (0x00000000)
|
||||
#define BSP_CFG_DUMMY6 (0x00000000)
|
||||
#define BSP_CFG_DUMMY7 (0x00000000)
|
||||
#define BSP_CFG_DUMMY8 (0x00000000)
|
||||
#define BSP_CFG_DUMMY9 (0x00000000)
|
||||
#define BSP_CFG_DUMMY10_ACCESS_SPEED (0x00000006)
|
||||
#define BSP_CFG_CHECK_SUM (0xE0A8)
|
||||
#endif /* BOARD_CFG_H_ */
|
||||
@@ -0,0 +1,37 @@
|
||||
/* generated configuration header file - do not edit */
|
||||
#ifndef BSP_CFG_H_
|
||||
#define BSP_CFG_H_
|
||||
#include "bsp_clock_cfg.h"
|
||||
#include "bsp_mcu_family_cfg.h"
|
||||
#include "board_cfg.h"
|
||||
#define FSP_NOT_DEFINED 0
|
||||
#ifndef BSP_CFG_RTOS
|
||||
#if (FSP_NOT_DEFINED) != (FSP_NOT_DEFINED)
|
||||
#define BSP_CFG_RTOS (2)
|
||||
#elif (FSP_NOT_DEFINED) != (FSP_NOT_DEFINED)
|
||||
#define BSP_CFG_RTOS (1)
|
||||
#else
|
||||
#define BSP_CFG_RTOS (0)
|
||||
#endif
|
||||
#endif
|
||||
#undef FSP_NOT_DEFINED
|
||||
#define BSP_CFG_MCU_VCC_MV (3300)
|
||||
|
||||
#define BSP_CFG_PARAM_CHECKING_ENABLE (0)
|
||||
#define BSP_CFG_ASSERT (0)
|
||||
#define BSP_CFG_ERROR_LOG (0)
|
||||
|
||||
#define BSP_CFG_PORT_PROTECT (1)
|
||||
|
||||
#define BSP_CFG_SOFT_RESET_SUPPORTED (0)
|
||||
#define BSP_CFG_EARLY_INIT (0)
|
||||
|
||||
#define BSP_CFG_MULTIPLEX_INTERRUPT_SUPPORTED (0)
|
||||
#if BSP_CFG_MULTIPLEX_INTERRUPT_SUPPORTED
|
||||
#define BSP_CFG_MULTIPLEX_INTERRUPT_ENABLE BSP_INTERRUPT_ENABLE
|
||||
#define BSP_CFG_MULTIPLEX_INTERRUPT_DISABLE BSP_INTERRUPT_DISABLE
|
||||
#else
|
||||
#define BSP_CFG_MULTIPLEX_INTERRUPT_ENABLE
|
||||
#define BSP_CFG_MULTIPLEX_INTERRUPT_DISABLE
|
||||
#endif
|
||||
#endif /* BSP_CFG_H_ */
|
||||
@@ -0,0 +1,14 @@
|
||||
/* generated configuration header file - do not edit */
|
||||
#ifndef BSP_MCU_DEVICE_CFG_H_
|
||||
#define BSP_MCU_DEVICE_CFG_H_
|
||||
#define BSP_CFG_STACK_FIQ_BYTES (0x400)
|
||||
#define BSP_CFG_STACK_IRQ_BYTES (0x400)
|
||||
#define BSP_CFG_STACK_ABT_BYTES (0x400)
|
||||
#define BSP_CFG_STACK_UND_BYTES (0x400)
|
||||
#define BSP_CFG_STACK_SYS_BYTES (0x400)
|
||||
#define BSP_CFG_STACK_SVC_BYTES (0x400)
|
||||
#define BSP_CFG_HEAP_BYTES (0x2000)
|
||||
|
||||
#define BSP_CFG_C_RUNTIME_INIT (1)
|
||||
#define BSP_CFG_USE_TFU_MATHLIB ((1))
|
||||
#endif /* BSP_MCU_DEVICE_CFG_H_ */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
||||
/* generated configuration header file - do not edit */
|
||||
#ifndef BSP_MCU_DEVICE_PN_CFG_H_
|
||||
#define BSP_MCU_DEVICE_PN_CFG_H_
|
||||
#define BSP_MCU_R9A07G084M04GBG
|
||||
#define BSP_ATCM_SIZE_BYTES (131072)
|
||||
#define BSP_BTCM_SIZE_BYTES (131072)
|
||||
#define BSP_SYSTEM_RAM_SIZE_BYTES (1572864)
|
||||
#define BSP_PACKAGE_FBGA
|
||||
#define BSP_PACKAGE_PINS (225)
|
||||
|
||||
#define BSP_CFG_CORE_CR52 (0)
|
||||
#endif /* BSP_MCU_DEVICE_PN_CFG_H_ */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user