Hello,
I have TM4C1294XL launchpad.
I would like to use
#include <stdio.h> #include <string.h> #include "inc/tm4c1294ncpdt.h" #include "inc/hw_memmap.h" #include "inc/hw_types.h" #define PERIPH SYSCTL_PERIPH_GPION #define GPIO_BASE GPIO_PORTN_BASE #define GPIO_PIN GPIO_PIN_1 int main() { uint32_t g_ui32SysClock; g_ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120000000); SysCtlPeripheralEnable(PERIPH); GPIOPinTypeGPIOOutput(GPIO_BASE, GPIO_PIN); SysCtlDelay(3); UARTStdioConfig(0, 115200, g_ui32SysClock); volatile uint32_t ui32Loop; while (1) { GPIOPinWrite(GPIO_BASE, GPIO_PIN, GPIO_PIN); for (ui32Loop = 0; ui32Loop < 200000; ui32Loop++); GPIOPinWrite(GPIO_BASE, GPIO_PIN, 0); for (ui32Loop = 0; ui32Loop < 200000; ui32Loop++); printf("I am alive"); // tivaware/utils/uartstdio.c:UARTwrite(const char *, int) works fine here, but I want to handle stdout using this uart. } }
Those are my arguments to the compiler in CCSv6.0.1
"c:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 'Building file: ../hello.c' 'Invoking: ARM Compiler' "c:/ti/ccsv6/tools/compiler/arm_5.1.6/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 --abi=eabi -me --include_path="c:/ti/ccsv6/tools/compiler/arm_5.1.6/include" --include_path="C:/Users/ugps/workspace_v6_0/mt/mt_eth_btldr" --include_path="C:/ti/TivaWare_C_Series-2.1.1.71/boot_loader" --include_path="C:/ti/TivaWare_C_Series-2.1.1.71" -g --gcc --define=ccs="ccs" --define=PART_TM4C1294NCPDT --display_error_number --diag_warning=225 --diag_wrap=off --printf_support=full --preproc_with_compile --preproc_dependency="hello.pp" --define=DEBUG "../hello.c"
I am aware of webpages like:
processors.wiki.ti.com/index.php/Tips_for_using_printf - but I feel it is for TI-RTOS... but unluckily there are no requiremenets specified... since I am new I do not even know what are prerequisites to use it...
http://www.ti.com/lit/ug/spru187u/spru187u.pdf page 224 - adding new device, but
add_device("mydevice", _MSA, MYDEVICE_open, MYDEVICE_close, MYDEVICE_read, MYDEVICE_write, MYDEVICE_lseek, MYDEVICE_unlink, MYDEVICE_rename);
As you can also see I have tried using --printf_support flag...
I would like to be able to see printf's output in the console.
I do not necesarrly need RTOS, I am working on some simple applications but I do not want to run purry nor hyperterminal all the time...
And another question? What is difference between CC5000, Tivaware and TI-RTOS?