diff options
23 files changed, 256 insertions, 75 deletions
diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/.project b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/.project index a6f7408..1ca5774 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/.project +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/.project @@ -80,17 +80,22 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS3/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> + </link> + <link> + <name>community_os</name> + <type>2</type> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os</locationURI> </link> <link> <name>os</name> <type>2</type> - <locationURI>CHIBIOS3/os</locationURI> + <locationURI>CHIBIOS/os</locationURI> </link> <link> <name>test</name> <type>2</type> - <locationURI>CHIBIOS3/test</locationURI> + <locationURI>CHIBIOS/test</locationURI> </link> </linkedResources> <variableList> diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch index 8772f9c..0af6b44 100644 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch +++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch @@ -6,5 +6,5 @@ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}\..\tools\openocd\bin\openocd.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c "telnet_port 4444" -f "interface/ti-icdi.cfg" -f "${file_prompt}""/> -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\bin\"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\scripts\"/> </launchConfiguration> diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/.project b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/.project index a380601..375aaf7 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/.project +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/.project @@ -27,22 +27,17 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS3/community/os/hal/boards/TI_TM4C1294_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C1294_LAUNCHPAD</locationURI> </link> <link> <name>community_os</name> <type>2</type> - <locationURI>CHIBIOS3/community</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os</locationURI> </link> <link> <name>os</name> <type>2</type> - <locationURI>CHIBIOS3/os</locationURI> - </link> - <link> - <name>test</name> - <type>2</type> - <locationURI>CHIBIOS3/test</locationURI> + <locationURI>CHIBIOS/os</locationURI> </link> </linkedResources> <variableList> diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch new file mode 100644 index 0000000..b75efdd --- /dev/null +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"> +<stringAttribute key="bad_container_name" value="\RT-TM4C1294-LAUNCHPAD-\debug"/> +<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> +<listEntry value="org.eclipse.ui.externaltools.launchGroup"/> +</listAttribute> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}\..\tools\openocd\bin\openocd.exe"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c "telnet_port 4444" -f "interface/ti-icdi.cfg" -f "${file_prompt}""/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\scripts\"/> +</launchConfiguration> diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/.project b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/.project index 09271d4..5b7e0f1 100644 --- a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/.project +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/.project @@ -27,22 +27,22 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS3/community/os/hal/boards/TI_TM4C1294_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C1294_LAUNCHPAD</locationURI> </link> <link> <name>community_os</name> <type>2</type> - <locationURI>CHIBIOS3/community/os</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os</locationURI> </link> <link> <name>os</name> <type>2</type> - <locationURI>CHIBIOS3/os</locationURI> + <locationURI>CHIBIOS/os</locationURI> </link> <link> <name>test</name> <type>2</type> - <locationURI>CHIBIOS3/test</locationURI> + <locationURI>CHIBIOS/test</locationURI> </link> </linkedResources> <variableList> diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch new file mode 100644 index 0000000..51c985f --- /dev/null +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"> +<stringAttribute key="bad_container_name" value="\RT-TM4C129-LAUNCHPAD\debug"/> +<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> +<listEntry value="org.eclipse.ui.externaltools.launchGroup"/> +</listAttribute> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}\..\tools\openocd\bin\openocd.exe"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c "telnet_port 4444" -f "interface/ti-icdi.cfg" -f "${file_prompt}""/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\scripts\"/> +</launchConfiguration> diff --git a/demos/TIVA/RT-TM4C1294-LAUNCHPAD/debug/RT-TM4C1294-LAUNCHPAD-LWIP (OpenOCD, Flash and Run).launch b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/debug/RT-TM4C1294-LAUNCHPAD-LWIP (OpenOCD, Flash and Run).launch new file mode 100644 index 0000000..c9016ed --- /dev/null +++ b/demos/TIVA/RT-TM4C1294-LAUNCHPAD/debug/RT-TM4C1294-LAUNCHPAD-LWIP (OpenOCD, Flash and Run).launch @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.cdt.debug.gdbjtag.launchConfigurationType"> +<stringAttribute key="bad_container_name" value="\TM4C129x-ETH\debu"/> +<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="1"/> +<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="true"/> +<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="true"/> +<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="monitor reset halt monitor reset init cortex_m maskisr auto"/> +<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=""/> +<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.portNumber" value="3333"/> +<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/> +<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/> +<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="main"/> +<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/> +<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/> +<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/> +<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/> +<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/> +<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/> +<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useRemoteTarget" value="true"/> +<stringAttribute key="org.eclipse.cdt.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"/> +<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="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="dmaris-VectorE0-(format)" val="2"/></contentList>"/> +<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/> +<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList/> "/> +<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/> +<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RT-TM4C1294-LAUNCHPAD-LWIP"/> +<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/> +<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.114656749"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/RT-TM4C1294-LAUNCHPAD-LWIP"/> +</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> +</launchConfiguration> diff --git a/os/hal/ports/TIVA/LLD/hal_gpt_lld.c b/os/hal/ports/TIVA/LLD/hal_gpt_lld.c index 86f2303..870ba12 100644 --- a/os/hal/ports/TIVA/LLD/hal_gpt_lld.c +++ b/os/hal/ports/TIVA/LLD/hal_gpt_lld.c @@ -462,6 +462,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_GPT0 if (&GPTD1 == gptp) { SYSCTL->RCGCTIMER |= (1 << 0); + + while (!(SYSCTL->PRTIMER & (1 << 0))) + ; + nvicEnableVector(TIVA_GPT0A_NUMBER, TIVA_GPT_GPT0A_IRQ_PRIORITY); } #endif @@ -469,6 +473,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_GPT1 if (&GPTD2 == gptp) { SYSCTL->RCGCTIMER |= (1 << 1); + + while (!(SYSCTL->PRTIMER & (1 << 1))) + ; + nvicEnableVector(TIVA_GPT1A_NUMBER, TIVA_GPT_GPT1A_IRQ_PRIORITY); } #endif @@ -476,6 +484,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_GPT2 if (&GPTD3 == gptp) { SYSCTL->RCGCTIMER |= (1 << 2); + + while (!(SYSCTL->PRTIMER & (1 << 2))) + ; + nvicEnableVector(TIVA_GPT2A_NUMBER, TIVA_GPT_GPT2A_IRQ_PRIORITY); } #endif @@ -483,6 +495,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_GPT3 if (&GPTD4 == gptp) { SYSCTL->RCGCTIMER |= (1 << 3); + + while (!(SYSCTL->PRTIMER & (1 << 3))) + ; + nvicEnableVector(TIVA_GPT3A_NUMBER, TIVA_GPT_GPT3A_IRQ_PRIORITY); } #endif @@ -490,6 +506,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_GPT4 if (&GPTD5 == gptp) { SYSCTL->RCGCTIMER |= (1 << 4); + + while (!(SYSCTL->PRTIMER & (1 << 4))) + ; + nvicEnableVector(TIVA_GPT4A_NUMBER, TIVA_GPT_GPT4A_IRQ_PRIORITY); } #endif @@ -497,6 +517,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_GPT5 if (&GPTD6 == gptp) { SYSCTL->RCGCTIMER |= (1 << 5); + + while (!(SYSCTL->PRTIMER & (1 << 5))) + ; + nvicEnableVector(TIVA_GPT5A_NUMBER, TIVA_GPT_GPT5A_IRQ_PRIORITY); } #endif @@ -504,6 +528,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_WGPT0 if (&GPTD7 == gptp) { SYSCTL->RCGCWTIMER |= (1 << 0); + + while (!(SYSCTL->PRWTIMER & (1 << 0))) + ; + nvicEnableVector(TIVA_WGPT0A_NUMBER, TIVA_GPT_WGPT0A_IRQ_PRIORITY); } #endif @@ -511,6 +539,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_WGPT1 if (&GPTD8 == gptp) { SYSCTL->RCGCWTIMER |= (1 << 1); + + while (!(SYSCTL->PRWTIMER & (1 << 1))) + ; + nvicEnableVector(TIVA_WGPT1A_NUMBER, TIVA_GPT_WGPT1A_IRQ_PRIORITY); } #endif @@ -518,6 +550,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_WGPT2 if (&GPTD9 == gptp) { SYSCTL->RCGCWTIMER |= (1 << 2); + + while (!(SYSCTL->PRWTIMER & (1 << 2))) + ; + nvicEnableVector(TIVA_WGPT2A_NUMBER, TIVA_GPT_WGPT2A_IRQ_PRIORITY); } #endif @@ -525,6 +561,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_WGPT3 if (&GPTD10 == gptp) { SYSCTL->RCGCWTIMER |= (1 << 3); + + while (!(SYSCTL->PRWTIMER & (1 << 3))) + ; + nvicEnableVector(TIVA_WGPT3A_NUMBER, TIVA_GPT_WGPT3A_IRQ_PRIORITY); } #endif @@ -532,6 +572,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_WGPT4 if (&GPTD11 == gptp) { SYSCTL->RCGCWTIMER |= (1 << 4); + + while (!(SYSCTL->PRWTIMER & (1 << 4))) + ; + nvicEnableVector(TIVA_WGPT4A_NUMBER, TIVA_GPT_WGPT4A_IRQ_PRIORITY); } #endif @@ -539,6 +583,10 @@ void gpt_lld_start(GPTDriver *gptp) #if TIVA_GPT_USE_WGPT5 if (&GPTD12 == gptp) { SYSCTL->RCGCWTIMER |= (1 << 5); + + while (!(SYSCTL->PRWTIMER & (1 << 5))) + ; + nvicEnableVector(TIVA_WGPT5A_NUMBER, TIVA_GPT_WGPT5A_IRQ_PRIORITY); } #endif diff --git a/os/hal/ports/TIVA/LLD/hal_i2c_lld.c b/os/hal/ports/TIVA/LLD/hal_i2c_lld.c index 5d80633..cb69861 100644 --- a/os/hal/ports/TIVA/LLD/hal_i2c_lld.c +++ b/os/hal/ports/TIVA/LLD/hal_i2c_lld.c @@ -504,6 +504,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C0 if (&I2CD1 == i2cp) { SYSCTL->RCGCI2C |= (1 << 0); + + while (!(SYSCTL->PRI2C & (1 << 0))) + ; + nvicEnableVector(TIVA_I2C0_NUMBER, TIVA_I2C_I2C0_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C0 */ @@ -511,6 +515,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C1 if (&I2CD2 == i2cp) { SYSCTL->RCGCI2C |= (1 << 1); + + while (!(SYSCTL->PRI2C & (1 << 1))) + ; + nvicEnableVector(TIVA_I2C1_NUMBER, TIVA_I2C_I2C1_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C1 */ @@ -518,6 +526,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C2 if (&I2CD3 == i2cp) { SYSCTL->RCGCI2C |= (1 << 2); + + while (!(SYSCTL->PRI2C & (1 << 2))) + ; + nvicEnableVector(TIVA_I2C2_NUMBER, TIVA_I2C_I2C2_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C2 */ @@ -525,6 +537,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C3 if (&I2CD4 == i2cp) { SYSCTL->RCGCI2C |= (1 << 3); + + while (!(SYSCTL->PRI2C & (1 << 3))) + ; + nvicEnableVector(TIVA_I2C3_NUMBER, TIVA_I2C_I2C3_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C3 */ @@ -532,6 +548,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C4 if (&I2CD5 == i2cp) { SYSCTL->RCGCI2C |= (1 << 4); + + while (!(SYSCTL->PRI2C & (1 << 4))) + ; + nvicEnableVector(TIVA_I2C4_NUMBER, TIVA_I2C_I2C4_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C4 */ @@ -539,6 +559,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C5 if (&I2CD6 == i2cp) { SYSCTL->RCGCI2C |= (1 << 5); + + while (!(SYSCTL->PRI2C & (1 << 5))) + ; + nvicEnableVector(TIVA_I2C5_NUMBER, TIVA_I2C_I2C5_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C5 */ @@ -546,6 +570,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C6 if (&I2CD7 == i2cp) { SYSCTL->RCGCI2C |= (1 << 6); + + while (!(SYSCTL->PRI2C & (1 << 6))) + ; + nvicEnableVector(TIVA_I2C6_NUMBER, TIVA_I2C_I2C6_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C6 */ @@ -553,6 +581,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C7 if (&I2CD8 == i2cp) { SYSCTL->RCGCI2C |= (1 << 7); + + while (!(SYSCTL->PRI2C & (1 << 7))) + ; + nvicEnableVector(TIVA_I2C7_NUMBER, TIVA_I2C_I2C7_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C7 */ @@ -560,6 +592,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C8 if (&I2CD9 == i2cp) { SYSCTL->RCGCI2C |= (1 << 8); + + while (!(SYSCTL->PRI2C & (1 << 8))) + ; + nvicEnableVector(TIVA_I2C8_NUMBER, TIVA_I2C_I2C8_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C7 */ @@ -567,6 +603,10 @@ void i2c_lld_start(I2CDriver *i2cp) #if TIVA_I2C_USE_I2C9 if (&I2CD10 == i2cp) { SYSCTL->RCGCI2C |= (1 << 9); + + while (!(SYSCTL->PRI2C & (1 << 9))) + ; + nvicEnableVector(TIVA_I2C9_NUMBER, TIVA_I2C_I2C9_IRQ_PRIORITY); } #endif /* TIVA_I2C_USE_I2C7 */ diff --git a/os/hal/ports/TIVA/LLD/hal_pwm_lld.c b/os/hal/ports/TIVA/LLD/hal_pwm_lld.c index b223a9c..ad7c587 100644 --- a/os/hal/ports/TIVA/LLD/hal_pwm_lld.c +++ b/os/hal/ports/TIVA/LLD/hal_pwm_lld.c @@ -341,6 +341,10 @@ void pwm_lld_start(PWMDriver *pwmp) #if TIVA_PWM_USE_PWM0 if (&PWMD1 == pwmp) { SYSCTL->RCGCPWM |= (1 << 0); + + while (!(SYSCTL->PRPWM & (1 << 0))) + ; + nvicEnableVector(TIVA_PWM0FAULT_NUMBER, TIVA_PWM_PWM0_FAULT_IRQ_PRIORITY); nvicEnableVector(TIVA_PWM0GEN0_NUMBER, TIVA_PWM_PWM0_0_IRQ_PRIORITY); @@ -353,6 +357,10 @@ void pwm_lld_start(PWMDriver *pwmp) #if TIVA_PWM_USE_PWM1 if (&PWMD2 == pwmp) { SYSCTL->RCGCPWM |= (1 << 1); + + while (!(SYSCTL->PRPWM & (1 << 1))) + ; + nvicEnableVector(TIVA_PWM1FAULT_NUMBER, TIVA_PWM_PWM1_FAULT_IRQ_PRIORITY); nvicEnableVector(TIVA_PWM1GEN0_NUMBER, TIVA_PWM_PWM1_0_IRQ_PRIORITY); diff --git a/os/hal/ports/TIVA/LLD/hal_serial_lld.c b/os/hal/ports/TIVA/LLD/hal_serial_lld.c index bd1b81e..89d29da 100644 --- a/os/hal/ports/TIVA/LLD/hal_serial_lld.c +++ b/os/hal/ports/TIVA/LLD/hal_serial_lld.c @@ -508,48 +508,80 @@ void sd_lld_start(SerialDriver *sdp, const SerialConfig *config) #if TIVA_SERIAL_USE_UART0 if (&SD1 == sdp) { SYSCTL->RCGCUART |= (1 << 0); + + while (!(SYSCTL->PRUART & (1 << 0))) + ; + nvicEnableVector(TIVA_UART0_NUMBER, TIVA_SERIAL_UART0_PRIORITY); } #endif #if TIVA_SERIAL_USE_UART1 if (&SD2 == sdp) { - SYSCTL->RCGC.UART |= (1 << 1); + SYSCTL->RCGCUART |= (1 << 1); + + while (!(SYSCTL->PRUART & (1 << 1))) + ; + nvicEnableVector(TIVA_UART1_NUMBER, TIVA_SERIAL_UART1_PRIORITY); } #endif #if TIVA_SERIAL_USE_UART2 if (&SD3 == sdp) { - SYSCTL->RCGC.UART |= (1 << 2); /* enable UART2 module */ + SYSCTL->RCGCUART |= (1 << 2); + + while (!(SYSCTL->PRUART & (1 << 2))) + ; + nvicEnableVector(TIVA_UART2_NUMBER, TIVA_SERIAL_UART2_PRIORITY); } #endif #if TIVA_SERIAL_USE_UART3 if (&SD4 == sdp) { - SYSCTL->RCGC.UART |= (1 << 3); /* enable UART3 module */ + SYSCTL->RCGCUART |= (1 << 3); + + while (!(SYSCTL->PRUART & (1 << 3))) + ; + nvicEnableVector(TIVA_UART3_NUMBER, TIVA_SERIAL_UART3_PRIORITY); } #endif #if TIVA_SERIAL_USE_UART4 if (&SD5 == sdp) { - SYSCTL->RCGC.UART |= (1 << 4); /* enable UART4 module */ + SYSCTL->RCGCUART |= (1 << 4); + + while (!(SYSCTL->PRUART & (1 << 4))) + ; + nvicEnableVector(TIVA_UART4_NUMBER, TIVA_SERIAL_UART4_PRIORITY); } #endif #if TIVA_SERIAL_USE_UART5 if (&SD6 == sdp) { - SYSCTL->RCGC.UART |= (1 << 5); /* enable UART5 module */ + SYSCTL->RCGCUART |= (1 << 5); + + while (!(SYSCTL->PRUART & (1 << 5))) + ; + nvicEnableVector(TIVA_UART5_NUMBER, TIVA_SERIAL_UART5_PRIORITY); } #endif #if TIVA_SERIAL_USE_UART6 if (&SD7 == sdp) { - SYSCTL->RCGC.UART |= (1 << 6); /* enable UART6 module */ + SYSCTL->RCGCUART |= (1 << 6); + + while (!(SYSCTL->PRUART & (1 << 6))) + ; + nvicEnableVector(TIVA_UART6_NUMBER, TIVA_SERIAL_UART6_PRIORITY); } #endif #if TIVA_SERIAL_USE_UART7 if (&SD8 == sdp) { - SYSCTL->RCGC.UART |= (1 << 7); /* enable UART7 module */ + SYSCTL->RCGCUART |= (1 << 7); + + while (!(SYSCTL->PRUART & (1 << 7))) + ; + nvicEnableVector(TIVA_UART7_NUMBER, TIVA_SERIAL_UART7_PRIORITY); } #endif @@ -577,49 +609,49 @@ void sd_lld_stop(SerialDriver *sdp) #endif #if TIVA_SERIAL_USE_UART1 if (&SD2 == sdp) { - SYSCTL->RCGC.UART &= ~(1 << 1); /* disable UART1 module */ + SYSCTL->RCGCUART &= ~(1 << 1); /* disable UART1 module */ nvicDisableVector(TIVA_UART1_NUMBER); return; } #endif #if TIVA_SERIAL_USE_UART2 if (&SD3 == sdp) { - SYSCTL->RCGC.UART &= ~(1 << 2); /* disable UART2 module */ + SYSCTL->RCGCUART &= ~(1 << 2); /* disable UART2 module */ nvicDisableVector(TIVA_UART2_NUMBER); return; } #endif #if TIVA_SERIAL_USE_UART3 if (&SD4 == sdp) { - SYSCTL->RCGC.UART &= ~(1 << 3); /* disable UART3 module */ + SYSCTL->RCGCUART &= ~(1 << 3); /* disable UART3 module */ nvicDisableVector(TIVA_UART3_NUMBER); return; } #endif #if TIVA_SERIAL_USE_UART4 if (&SD5 == sdp) { - SYSCTL->RCGC.UART &= ~(1 << 4); /* disable UART4 module */ + SYSCTL->RCGCUART &= ~(1 << 4); /* disable UART4 module */ nvicDisableVector(TIVA_UART4_NUMBER); return; } #endif #if TIVA_SERIAL_USE_UART5 if (&SD6 == sdp) { - SYSCTL->RCGC.UART &= ~(1 << 5); /* disable UART5 module */ + SYSCTL->RCGCUART &= ~(1 << 5); /* disable UART5 module */ nvicDisableVector(TIVA_UART5_NUMBER); return; } #endif #if TIVA_SERIAL_USE_UART6 if (&SD7 == sdp) { - SYSCTL->RCGC.UART &= ~(1 << 6); /* disable UART6 module */ + SYSCTL->RCGCUART &= ~(1 << 6); /* disable UART6 module */ nvicDisableVector(TIVA_UART6_NUMBER); return; } #endif #if TIVA_SERIAL_USE_UART7 if (&SD8 == sdp) { - SYSCTL->RCGC.UART &= ~(1 << 7); /* disable UART7 module */ + SYSCTL->RCGCUART &= ~(1 << 7); /* disable UART7 module */ nvicDisableVector(TIVA_UART7_NUMBER); return; } diff --git a/testhal/TIVA/TM4C123x/EXT/.project b/testhal/TIVA/TM4C123x/EXT/.project index 79bd112..c1e2c0f 100644 --- a/testhal/TIVA/TM4C123x/EXT/.project +++ b/testhal/TIVA/TM4C123x/EXT/.project @@ -79,22 +79,17 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS3/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> </link> <link> <name>community_os</name> <type>2</type> - <locationURI>CHIBIOS3/community/os</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os</locationURI> </link> <link> <name>os</name> <type>2</type> - <locationURI>CHIBIOS3/os</locationURI> - </link> - <link> - <name>test</name> - <type>2</type> - <locationURI>CHIBIOS3/test</locationURI> + <locationURI>CHIBIOS/os</locationURI> </link> </linkedResources> <variableList> diff --git a/testhal/TIVA/TM4C123x/EXT/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch b/testhal/TIVA/TM4C123x/EXT/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch index 8772f9c..0af6b44 100644 --- a/testhal/TIVA/TM4C123x/EXT/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch +++ b/testhal/TIVA/TM4C123x/EXT/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch @@ -6,5 +6,5 @@ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}\..\tools\openocd\bin\openocd.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c "telnet_port 4444" -f "interface/ti-icdi.cfg" -f "${file_prompt}""/> -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\bin\"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\scripts\"/> </launchConfiguration> diff --git a/testhal/TIVA/TM4C123x/GPT/.project b/testhal/TIVA/TM4C123x/GPT/.project index ae2b92b..8a852ff 100644 --- a/testhal/TIVA/TM4C123x/GPT/.project +++ b/testhal/TIVA/TM4C123x/GPT/.project @@ -79,22 +79,17 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS3/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> </link> <link> <name>community_os</name> <type>2</type> - <locationURI>CHIBIOS3/community/os</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os</locationURI> </link> <link> <name>os</name> <type>2</type> - <locationURI>CHIBIOS3/os</locationURI> - </link> - <link> - <name>test</name> - <type>2</type> - <locationURI>CHIBIOS3/test</locationURI> + <locationURI>CHIBIOS/os</locationURI> </link> </linkedResources> <variableList> diff --git a/testhal/TIVA/TM4C123x/GPT/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch b/testhal/TIVA/TM4C123x/GPT/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch index 8772f9c..0af6b44 100644 --- a/testhal/TIVA/TM4C123x/GPT/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch +++ b/testhal/TIVA/TM4C123x/GPT/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch @@ -6,5 +6,5 @@ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}\..\tools\openocd\bin\openocd.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c "telnet_port 4444" -f "interface/ti-icdi.cfg" -f "${file_prompt}""/> -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\bin\"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\scripts\"/> </launchConfiguration> diff --git a/testhal/TIVA/TM4C123x/I2C/.project b/testhal/TIVA/TM4C123x/I2C/.project index fcc4cb1..f53c6cc 100644 --- a/testhal/TIVA/TM4C123x/I2C/.project +++ b/testhal/TIVA/TM4C123x/I2C/.project @@ -79,17 +79,17 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS3/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> </link> <link> - <name>os</name> + <name>community_os</name> <type>2</type> - <locationURI>CHIBIOS3/os</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os</locationURI> </link> <link> - <name>test</name> + <name>os</name> <type>2</type> - <locationURI>CHIBIOS3/test</locationURI> + <locationURI>CHIBIOS/os</locationURI> </link> </linkedResources> <variableList> diff --git a/testhal/TIVA/TM4C123x/I2C/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch b/testhal/TIVA/TM4C123x/I2C/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch index 8772f9c..0af6b44 100644 --- a/testhal/TIVA/TM4C123x/I2C/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch +++ b/testhal/TIVA/TM4C123x/I2C/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch @@ -6,5 +6,5 @@ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}\..\tools\openocd\bin\openocd.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c "telnet_port 4444" -f "interface/ti-icdi.cfg" -f "${file_prompt}""/> -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\bin\"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\scripts\"/> </launchConfiguration> diff --git a/testhal/TIVA/TM4C123x/PWM/.project b/testhal/TIVA/TM4C123x/PWM/.project index 30f93a6..dccf763 100644 --- a/testhal/TIVA/TM4C123x/PWM/.project +++ b/testhal/TIVA/TM4C123x/PWM/.project @@ -79,22 +79,17 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS3/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> </link> <link> <name>community_os</name> <type>2</type> - <locationURI>CHIBIOS3/community/os</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os</locationURI> </link> <link> <name>os</name> <type>2</type> - <locationURI>CHIBIOS3/os</locationURI> - </link> - <link> - <name>test</name> - <type>2</type> - <locationURI>CHIBIOS3/test</locationURI> + <locationURI>CHIBIOS/os</locationURI> </link> </linkedResources> <variableList> diff --git a/testhal/TIVA/TM4C123x/PWM/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch b/testhal/TIVA/TM4C123x/PWM/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch index 8772f9c..0af6b44 100644 --- a/testhal/TIVA/TM4C123x/PWM/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch +++ b/testhal/TIVA/TM4C123x/PWM/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch @@ -6,5 +6,5 @@ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}\..\tools\openocd\bin\openocd.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c "telnet_port 4444" -f "interface/ti-icdi.cfg" -f "${file_prompt}""/> -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\bin\"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\scripts\"/> </launchConfiguration> diff --git a/testhal/TIVA/TM4C123x/SPI/.cproject b/testhal/TIVA/TM4C123x/SPI/.cproject index 483936f..d3a2482 100644 --- a/testhal/TIVA/TM4C123x/SPI/.cproject +++ b/testhal/TIVA/TM4C123x/SPI/.cproject @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<?fileVersion 4.0.0?> -<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> +<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> <storageModule moduleId="org.eclipse.cdt.core.settings"> <cconfiguration id="0.114656749"> <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.114656749" moduleId="org.eclipse.cdt.core.settings" name="Default"> diff --git a/testhal/TIVA/TM4C123x/SPI/.project b/testhal/TIVA/TM4C123x/SPI/.project index 150ab22..6301d40 100644 --- a/testhal/TIVA/TM4C123x/SPI/.project +++ b/testhal/TIVA/TM4C123x/SPI/.project @@ -79,22 +79,17 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS3/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> </link> <link> <name>community_os</name> <type>2</type> - <locationURI>CHIBIOS3/community/os</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os</locationURI> </link> <link> <name>os</name> <type>2</type> - <locationURI>CHIBIOS3/os</locationURI> - </link> - <link> - <name>test</name> - <type>2</type> - <locationURI>CHIBIOS3/test</locationURI> + <locationURI>CHIBIOS/os</locationURI> </link> </linkedResources> <variableList> diff --git a/testhal/TIVA/TM4C123x/SPI/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch b/testhal/TIVA/TM4C123x/SPI/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch index 8772f9c..0af6b44 100644 --- a/testhal/TIVA/TM4C123x/SPI/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch +++ b/testhal/TIVA/TM4C123x/SPI/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch @@ -6,5 +6,5 @@ <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${none}"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}\..\tools\openocd\bin\openocd.exe"/> <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="-c "telnet_port 4444" -f "interface/ti-icdi.cfg" -f "${file_prompt}""/> -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\bin\"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${eclipse_home}\..\tools\openocd\scripts\"/> </launchConfiguration> diff --git a/testhal/TIVA/TM4C123x/WDG/.project b/testhal/TIVA/TM4C123x/WDG/.project index 1c2bc3f..8f385fb 100644 --- a/testhal/TIVA/TM4C123x/WDG/.project +++ b/testhal/TIVA/TM4C123x/WDG/.project @@ -79,7 +79,7 @@ <link> <name>board</name> <type>2</type> - <locationURI>CHIBIOS/community/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> + <locationURI>PARENT-1-CHIBIOS/ChibiOS-Contrib/os/hal/boards/TI_TM4C123G_LAUNCHPAD</locationURI> </link> <link> <name>community_os</name> |