aboutsummaryrefslogtreecommitdiffstats
path: root/demos/TIVA/RT-TM4C123G-LAUNCHPAD
diff options
context:
space:
mode:
Diffstat (limited to 'demos/TIVA/RT-TM4C123G-LAUNCHPAD')
-rw-r--r--demos/TIVA/RT-TM4C123G-LAUNCHPAD/.cproject1
-rw-r--r--demos/TIVA/RT-TM4C123G-LAUNCHPAD/.project11
-rw-r--r--demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile6
-rw-r--r--demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h1
-rw-r--r--demos/TIVA/RT-TM4C123G-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch2
-rw-r--r--demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c45
-rw-r--r--demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h8
7 files changed, 46 insertions, 28 deletions
diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/.cproject b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/.cproject
index 109f8d7..2a64a93 100644
--- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/.cproject
+++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/.cproject
@@ -49,4 +49,5 @@
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+ <storageModule moduleId="refreshScope"/>
</cproject>
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/Makefile b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile
index 322b39b..b393902 100644
--- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile
+++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/Makefile
@@ -43,6 +43,12 @@ ifeq ($(USE_VERBOSE_COMPILE),)
USE_VERBOSE_COMPILE = no
endif
+# If enabled, this option makes the build process faster by not compiling
+# modules not used in the current configuration.
+ifeq ($(USE_SMART_BUILD),)
+ USE_SMART_BUILD = yes
+endif
+
#
# Build global options
##############################################################################
diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h
index 25e39f6..0d24275 100644
--- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h
+++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/chconf.h
@@ -18,6 +18,7 @@
#define _CHCONF_H_
#define _CHIBIOS_RT_CONF_
+#define _CHIBIOS_RT_CONF_VER_5_0_
/*===========================================================================*/
/**
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 &quot;telnet_port 4444&quot; -f &quot;interface/ti-icdi.cfg&quot; -f &quot;${file_prompt}&quot;"/>
-<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-TM4C123G-LAUNCHPAD/main.c b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c
index 6723c62..2872f89 100644
--- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c
+++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/main.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014..2016 Marco Veeneman
+ Copyright (C) 2014..2017 Marco Veeneman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,9 +20,8 @@
typedef struct led_config
{
- ioportid_t port;
+ ioline_t line;
uint32_t sleep;
- uint8_t pin;
} led_config_t;
/*
@@ -36,11 +35,11 @@ static THD_FUNCTION(blinkLed, arg) {
chRegSetThreadName("Blinker");
- palSetPadMode(ledConfig->port, ledConfig->pin, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetLineMode(ledConfig->line, PAL_MODE_OUTPUT_PUSHPULL);
while (TRUE) {
chThdSleepMilliseconds(ledConfig->sleep);
- palTogglePad(ledConfig->port, ledConfig->pin);
+ palToggleLine(ledConfig->line);
}
}
@@ -62,37 +61,43 @@ int main(void)
chSysInit();
/* Configure RX and TX pins for UART0.*/
- palSetPadMode(GPIOA, GPIOA_UART0_RX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1));
- palSetPadMode(GPIOA, GPIOA_UART0_TX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1));
+ palSetLineMode(LINE_UART0_RX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1));
+ palSetLineMode(LINE_UART0_TX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1));
/* Start the serial driver with the default configuration.*/
sdStart(&SD1, NULL);
- if (!palReadPad(GPIOF, GPIOF_SW2)) {
+ if (!palReadLine(LINE_SW2)) {
test_execute((BaseSequentialStream *)&SD1);
}
- ledRed.port = GPIOF;
- ledRed.pin = GPIOF_LED_RED;
+ ledRed.line = LINE_LED_RED;
ledRed.sleep = 100;
- ledGreen.port = GPIOF;
- ledGreen.pin = GPIOF_LED_GREEN;
+ ledGreen.line = LINE_LED_GREEN;
ledGreen.sleep = 101;
- ledBlue.port = GPIOF;
- ledBlue.pin = GPIOF_LED_BLUE;
+ ledBlue.line = LINE_LED_BLUE;
ledBlue.sleep = 102;
/* Creating the blinker threads.*/
- chThdCreateStatic(waBlinkLedRed, sizeof(waBlinkLedRed), NORMALPRIO, blinkLed,
+ chThdCreateStatic(waBlinkLedRed,
+ sizeof(waBlinkLedRed),
+ NORMALPRIO,
+ blinkLed,
&ledRed);
- chThdCreateStatic(waBlinkLedGreen, sizeof(waBlinkLedGreen), NORMALPRIO,
- blinkLed, &ledGreen);
-
- chThdCreateStatic(waBlinkLedBlue, sizeof(waBlinkLedBlue), NORMALPRIO,
- blinkLed, &ledBlue);
+ chThdCreateStatic(waBlinkLedGreen,
+ sizeof(waBlinkLedGreen),
+ NORMALPRIO,
+ blinkLed,
+ &ledGreen);
+
+ chThdCreateStatic(waBlinkLedBlue,
+ sizeof(waBlinkLedBlue),
+ NORMALPRIO,
+ blinkLed,
+ &ledBlue);
/* Normal main() thread activity.*/
while (TRUE) {
diff --git a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h
index 926cab1..337e2e1 100644
--- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h
+++ b/demos/TIVA/RT-TM4C123G-LAUNCHPAD/mcuconf.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014..2016 Marco Veeneman
+ Copyright (C) 2014..2017 Marco Veeneman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -30,15 +30,15 @@
/*
* HAL driver system settings.
*/
-#define TIVA_OSCSRC TIVA_RCC2_OSCSRC2_MOSC
+#define TIVA_OSCSRC SYSCTL_RCC2_OSCSRC2_MO
#define TIVA_MOSC_ENABLE TRUE
#define TIVA_DIV400_VALUE 1
#define TIVA_SYSDIV_VALUE 2
#define TIVA_USESYSDIV_ENABLE FALSE
#define TIVA_SYSDIV2LSB_ENABLE FALSE
#define TIVA_BYPASS_VALUE 0
-#define TIVA_PWM_FIELDS (TIVA_RCC_USEPWMDIV | \
- TIVA_RCC_PWMDIV_8)
+#define TIVA_PWM_FIELDS (SYSCTL_RCC_USEPWMDIV | \
+ SYSCTL_RCC_PWMDIV_8)
/*
* GPIO driver system settings.