diff options
Diffstat (limited to 'demos/TIVA/RT-TM4C123G-LAUNCHPAD')
7 files changed, 45 insertions, 37 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 deleted file mode 100644 index 8772f9c..0000000 --- a/demos/TIVA/RT-TM4C123G-LAUNCHPAD/debug/OpenOCD on ICDI (prompts for .cfg target configuration).launch +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"> -<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\bin\"/> -</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. |