SAMA5D2-SPI now runs in DDRAM

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11488 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
edolomb 2018-02-12 16:33:44 +00:00
parent 2b9c2a3ad5
commit cf245dd5be
3 changed files with 201 additions and 144 deletions

View File

@ -127,7 +127,9 @@ include $(CHIBIOS)/os/common/ports/ARMCAx-TZ/compilers/GCC/mk/port_generic.mk
#include $(CHIBIOS)/test/oslib/oslib_test.mk
# Define linker script file here
LDSCRIPT= $(STARTUPLD)/SAMA5D2.ld
#LDSCRIPT= $(STARTUPLD)/SAMA5D2.ld
# Only if SAMA_NO_INIT is TRUE
LDSCRIPT= $(STARTUPLD)/SAMA5D2ddr.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.cdt.debug.gdbjtag.launchConfigurationType">
<stringAttribute key="bad_container_name" value="/SAMA5D2-SPI/debu"/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value="mon reg cpsr = 0xd3&#13;&#10;set *0xF8048000 = 0xA5000004&#13;&#10;set *0x00A00100 = 0&#13;&#10;set *0xF8048044 = 0x00008000&#13;&#10;mon cp15 1 0 0 0 = 0x00C50078&#13;&#10;set *0xF0014004 = 0x4&#13;&#10;set *0xF0014014 = 1&lt;&lt;13&#10;load ~/bootstrap.elf&#10;mon reg pc = 0x00200000&#10;continue"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.ipAddress" value="localhost"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.jtagDevice" value="Generic TCP/IP"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value="20100000"/>
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="2331"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="_start"/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="arm-none-eabi-gdb"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>
<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.UPDATE_THREADLIST_ON_SUSPEND" value="false"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;null-_pal_lld_setgroupmode-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;null-sama_clock_init-(format)&quot; val=&quot;4&quot;/&gt;&lt;content id=&quot;null-boardInit-(format)&quot; val=&quot;2&quot;/&gt;&lt;content id=&quot;mode-_pal_lld_setgroupmode-(format)&quot; val=&quot;4&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="SAMA5D2-SPI"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value=""/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/SAMA5D2-SPI"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&#10;&lt;gdbmemoryBlockExpression address=&quot;4026531840&quot; label=&quot;0xF0000000&quot;/&gt;&#10;&lt;/memoryBlockExpressionList&gt;&#10;"/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
</launchConfiguration>

View File

@ -1,143 +1,143 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
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
http://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.
*/
#ifndef MCUCONF_H
#define MCUCONF_H
#define SAMA5D2x_MCUCONF
/*
* HAL driver system settings.
*/
#define SAMA_HAL_IS_SECURE TRUE
#define SAMA_NO_INIT FALSE
#define SAMA_MOSCRC_ENABLED FALSE
#define SAMA_MOSCXT_ENABLED TRUE
#define SAMA_MOSC_SEL SAMA_MOSC_MOSCXT
#define SAMA_OSC_SEL SAMA_OSC_OSCXT
#define SAMA_MCK_SEL SAMA_MCK_PLLA_CLK
#define SAMA_MCK_PRES_VALUE 1
#define SAMA_MCK_MDIV_VALUE 3
#define SAMA_PLLA_MUL_VALUE 83
#define SAMA_PLLADIV2_EN TRUE
#define SAMA_H64MX_H32MX_RATIO 2
/*
* SPI driver system settings.
*/
#define SAMA_SPI_USE_SPI0 FALSE
#define SAMA_SPI_USE_SPI1 TRUE
#define SAMA_SPI_USE_FLEXCOM0 FALSE
#define SAMA_SPI_USE_FLEXCOM1 FALSE
#define SAMA_SPI_USE_FLEXCOM2 FALSE
#define SAMA_SPI_USE_FLEXCOM3 FALSE
#define SAMA_SPI_USE_FLEXCOM4 FALSE
#define SAMA_SPI_SPI0_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_SPI1_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM0_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM1_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM2_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM3_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM4_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
#define SPI_SELECT_MODE SPI_SELECT_MODE_NONE
/*
* SECUMOD driver system settings.
*/
#define HAL_USE_SECUMOD FALSE
/*
* SDMMC driver system settings.
*/
#define HAL_USE_SDMMC FALSE
/*
* SERIAL driver system settings.
*/
#define SAMA_SERIAL_USE_UART0 FALSE
#define SAMA_SERIAL_USE_UART1 TRUE
#define SAMA_SERIAL_USE_UART2 FALSE
#define SAMA_SERIAL_USE_UART3 FALSE
#define SAMA_SERIAL_USE_UART4 FALSE
#define SAMA_SERIAL_USE_FLEXCOM0 FALSE
#define SAMA_SERIAL_USE_FLEXCOM1 FALSE
#define SAMA_SERIAL_USE_FLEXCOM2 FALSE
#define SAMA_SERIAL_USE_FLEXCOM3 FALSE
#define SAMA_SERIAL_USE_FLEXCOM4 FALSE
#define SAMA_SERIAL_UART0_IRQ_PRIORITY 4
#define SAMA_SERIAL_UART1_IRQ_PRIORITY 4
#define SAMA_SERIAL_UART2_IRQ_PRIORITY 4
#define SAMA_SERIAL_UART3_IRQ_PRIORITY 4
#define SAMA_SERIAL_UART4_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM0_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM1_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM2_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM3_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM4_IRQ_PRIORITY 4
/*
* ST driver settings.
*/
#define SAMA_ST_USE_PIT TRUE
#define SAMA_ST_USE_TC0 FALSE
#define SAMA_ST_USE_TC1 FALSE
/*
* TC driver system settings.
*/
#define HAL_USE_TC FALSE
#define SAMA_USE_TC0 FALSE
#define SAMA_USE_TC1 FALSE
#define SAMA_TC0_IRQ_PRIORITY 2
#define SAMA_TC1_IRQ_PRIORITY 2
/*
* UART driver system settings.
*/
#define SAMA_UART_USE_UART0 FALSE
#define SAMA_UART_USE_UART1 FALSE
#define SAMA_UART_USE_UART2 FALSE
#define SAMA_UART_USE_UART3 FALSE
#define SAMA_UART_USE_UART4 FALSE
#define SAMA_UART_USE_FLEXCOM0 FALSE
#define SAMA_UART_USE_FLEXCOM1 FALSE
#define SAMA_UART_USE_FLEXCOM2 FALSE
#define SAMA_UART_USE_FLEXCOM3 FALSE
#define SAMA_UART_USE_FLEXCOM4 FALSE
#define SAMA_UART_UART0_IRQ_PRIORITY 4
#define SAMA_UART_UART1_IRQ_PRIORITY 4
#define SAMA_UART_UART2_IRQ_PRIORITY 4
#define SAMA_UART_UART3_IRQ_PRIORITY 4
#define SAMA_UART_UART4_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM0_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM1_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM2_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM3_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM4_IRQ_PRIORITY 4
#define SAMA_UART_UART0_DMA_IRQ_PRIORITY 4
#define SAMA_UART_UART1_DMA_IRQ_PRIORITY 4
#define SAMA_UART_UART2_DMA_IRQ_PRIORITY 4
#define SAMA_UART_UART3_DMA_IRQ_PRIORITY 4
#define SAMA_UART_UART4_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM0_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM1_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM2_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM3_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM4_DMA_IRQ_PRIORITY 4
#define SAMA_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
#endif /* MCUCONF_H */
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
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
http://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.
*/
#ifndef MCUCONF_H
#define MCUCONF_H
#define SAMA5D2x_MCUCONF
/*
* HAL driver system settings.
*/
#define SAMA_HAL_IS_SECURE TRUE
#define SAMA_NO_INIT TRUE
#define SAMA_MOSCRC_ENABLED FALSE
#define SAMA_MOSCXT_ENABLED TRUE
#define SAMA_MOSC_SEL SAMA_MOSC_MOSCXT
#define SAMA_OSC_SEL SAMA_OSC_OSCXT
#define SAMA_MCK_SEL SAMA_MCK_PLLA_CLK
#define SAMA_MCK_PRES_VALUE 1
#define SAMA_MCK_MDIV_VALUE 3
#define SAMA_PLLA_MUL_VALUE 83
#define SAMA_PLLADIV2_EN TRUE
#define SAMA_H64MX_H32MX_RATIO 2
/*
* SDMMC driver system settings.
*/
#define HAL_USE_SDMMC FALSE
/*
* SECUMOD driver system settings.
*/
#define HAL_USE_SECUMOD FALSE
/*
* SERIAL driver system settings.
*/
#define SAMA_SERIAL_USE_UART0 FALSE
#define SAMA_SERIAL_USE_UART1 TRUE
#define SAMA_SERIAL_USE_UART2 FALSE
#define SAMA_SERIAL_USE_UART3 FALSE
#define SAMA_SERIAL_USE_UART4 FALSE
#define SAMA_SERIAL_USE_FLEXCOM0 FALSE
#define SAMA_SERIAL_USE_FLEXCOM1 FALSE
#define SAMA_SERIAL_USE_FLEXCOM2 FALSE
#define SAMA_SERIAL_USE_FLEXCOM3 FALSE
#define SAMA_SERIAL_USE_FLEXCOM4 FALSE
#define SAMA_SERIAL_UART0_IRQ_PRIORITY 4
#define SAMA_SERIAL_UART1_IRQ_PRIORITY 4
#define SAMA_SERIAL_UART2_IRQ_PRIORITY 4
#define SAMA_SERIAL_UART3_IRQ_PRIORITY 4
#define SAMA_SERIAL_UART4_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM0_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM1_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM2_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM3_IRQ_PRIORITY 4
#define SAMA_SERIAL_FLEXCOM4_IRQ_PRIORITY 4
/*
* SPI driver system settings.
*/
#define SAMA_SPI_USE_SPI0 FALSE
#define SAMA_SPI_USE_SPI1 TRUE
#define SAMA_SPI_USE_FLEXCOM0 FALSE
#define SAMA_SPI_USE_FLEXCOM1 FALSE
#define SAMA_SPI_USE_FLEXCOM2 FALSE
#define SAMA_SPI_USE_FLEXCOM3 FALSE
#define SAMA_SPI_USE_FLEXCOM4 FALSE
#define SAMA_SPI_SPI0_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_SPI1_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM0_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM1_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM2_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM3_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_FLEXCOM4_DMA_IRQ_PRIORITY 4
#define SAMA_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
#define SPI_SELECT_MODE SPI_SELECT_MODE_NONE
/*
* ST driver settings.
*/
#define SAMA_ST_USE_PIT FALSE
#define SAMA_ST_USE_TC0 FALSE
#define SAMA_ST_USE_TC1 TRUE
/*
* TC driver system settings.
*/
#define HAL_USE_TC FALSE
#define SAMA_USE_TC0 FALSE
#define SAMA_USE_TC1 FALSE
#define SAMA_TC0_IRQ_PRIORITY 2
#define SAMA_TC1_IRQ_PRIORITY 2
/*
* UART driver system settings.
*/
#define SAMA_UART_USE_UART0 FALSE
#define SAMA_UART_USE_UART1 FALSE
#define SAMA_UART_USE_UART2 FALSE
#define SAMA_UART_USE_UART3 FALSE
#define SAMA_UART_USE_UART4 FALSE
#define SAMA_UART_USE_FLEXCOM0 FALSE
#define SAMA_UART_USE_FLEXCOM1 FALSE
#define SAMA_UART_USE_FLEXCOM2 FALSE
#define SAMA_UART_USE_FLEXCOM3 FALSE
#define SAMA_UART_USE_FLEXCOM4 FALSE
#define SAMA_UART_UART0_IRQ_PRIORITY 4
#define SAMA_UART_UART1_IRQ_PRIORITY 4
#define SAMA_UART_UART2_IRQ_PRIORITY 4
#define SAMA_UART_UART3_IRQ_PRIORITY 4
#define SAMA_UART_UART4_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM0_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM1_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM2_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM3_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM4_IRQ_PRIORITY 4
#define SAMA_UART_UART0_DMA_IRQ_PRIORITY 4
#define SAMA_UART_UART1_DMA_IRQ_PRIORITY 4
#define SAMA_UART_UART2_DMA_IRQ_PRIORITY 4
#define SAMA_UART_UART3_DMA_IRQ_PRIORITY 4
#define SAMA_UART_UART4_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM0_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM1_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM2_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM3_DMA_IRQ_PRIORITY 4
#define SAMA_UART_FLEXCOM4_DMA_IRQ_PRIORITY 4
#define SAMA_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
#endif /* MCUCONF_H */