Jump to content
Sign in to follow this  
Bingo600

EK-TM4C1294XL - the first blinky with GCC

Recommended Posts

Got my two EK-TM4C1294XL , with XM4C129 chips

Decided to skip the "Unknown connect" to the demosite , and build + load "blinky"  - D1 is blinking green

I'm using GCC , and the nice template from here , and the lm4flash (as root)
https://github.com/uctools/tiva-template

Connect the debugport with the USB cable and fire away:

 

build $ sudo /home/bingo/bin/lm4flash main.bin
Found ICDI device with serial: 0F0006C6
ICDI version: 12245


I wonder what the makefile entry - really should be  (seems like the new tivaware rel notes says they abandoned the BLIZZARD stuff)

CFLAGS += -DTARGET_IS_BLIZZARD_RA1



/Bingo

tiva-template-blinky.zip

Share this post


Link to post
Share on other sites

Thanx

 

Just found your nice explanation here

 

http://forum.stellarisiti.com/topic/1884-understanding-arm-based-controller-stellaris-through-driverlib-or-through-registers/

 

Is the TARGET_IS just used for the ROM functions ?

 

I have also used

MCU = TM4C1294NCPDT

 

And hope that's correct

 

 

/Bingo

Yes the TARGET_IS stuff just tells driverlib/rom.h whether the ROM_ functions exist, since each test checks those TARGET_IS defines before defining the ROM_ function as a pointer to its location in the ROM API table.

 

Example, from driverlib/rom.h for TivaWare 2.1:

//*****************************************************************************
//
// Pointers to the main API tables.
//
//*****************************************************************************
#define ROM_APITABLE            ((uint32_t *)0x01000010)
#define ROM_VERSION             (ROM_APITABLE[0])
#define ROM_UARTTABLE           ((uint32_t *)(ROM_APITABLE[1]))
#define ROM_SSITABLE            ((uint32_t *)(ROM_APITABLE[2]))
#define ROM_I2CTABLE            ((uint32_t *)(ROM_APITABLE[3]))
#define ROM_GPIOTABLE           ((uint32_t *)(ROM_APITABLE[4]))
#define ROM_ADCTABLE            ((uint32_t *)(ROM_APITABLE[5]))
#define ROM_COMPARATORTABLE     ((uint32_t *)(ROM_APITABLE[6]))
#define ROM_FLASHTABLE          ((uint32_t *)(ROM_APITABLE[7]))
#define ROM_PWMTABLE            ((uint32_t *)(ROM_APITABLE[8]))
#define ROM_QEITABLE            ((uint32_t *)(ROM_APITABLE[9]))
#define ROM_SYSTICKTABLE        ((uint32_t *)(ROM_APITABLE[10]))
#define ROM_TIMERTABLE          ((uint32_t *)(ROM_APITABLE[11]))
#define ROM_WATCHDOGTABLE       ((uint32_t *)(ROM_APITABLE[12]))
#define ROM_SYSCTLTABLE         ((uint32_t *)(ROM_APITABLE[13]))
#define ROM_INTERRUPTTABLE      ((uint32_t *)(ROM_APITABLE[14]))
#define ROM_USBTABLE            ((uint32_t *)(ROM_APITABLE[16]))
#define ROM_UDMATABLE           ((uint32_t *)(ROM_APITABLE[17]))
#define ROM_CANTABLE            ((uint32_t *)(ROM_APITABLE[18]))
#define ROM_HIBERNATETABLE      ((uint32_t *)(ROM_APITABLE[19]))
#define ROM_MPUTABLE            ((uint32_t *)(ROM_APITABLE[20]))
#define ROM_SOFTWARETABLE       ((uint32_t *)(ROM_APITABLE[21]))
#define ROM_EPITABLE            ((uint32_t *)(ROM_APITABLE[23]))
#define ROM_EEPROMTABLE         ((uint32_t *)(ROM_APITABLE[24]))
#define ROM_FPUTABLE            ((uint32_t *)(ROM_APITABLE[26]))
#define ROM_SMBUSTABLE          ((uint32_t *)(ROM_APITABLE[29]))
#define ROM_SYSEXCTABLE         ((uint32_t *)(ROM_APITABLE[30]))
#define ROM_ONEWIRETABLE        ((uint32_t *)(ROM_APITABLE[34]))
#define ROM_SPIFLASHTABLE       ((uint32_t *)(ROM_APITABLE[38]))
#define ROM_LCDTABLE            ((uint32_t *)(ROM_APITABLE[41]))
#define ROM_EMACTABLE           ((uint32_t *)(ROM_APITABLE[42]))
#define ROM_AESTABLE            ((uint32_t *)(ROM_APITABLE[43]))
#define ROM_CRCTABLE            ((uint32_t *)(ROM_APITABLE[44]))
#define ROM_DESTABLE            ((uint32_t *)(ROM_APITABLE[45]))
#define ROM_SHAMD5TABLE         ((uint32_t *)(ROM_APITABLE[46]))

//*****************************************************************************
//
// Macros for calling ROM functions in the ADC API.
//
//*****************************************************************************
#if defined(TARGET_IS_TM4C123_RA1) ||                                         \
    defined(TARGET_IS_TM4C123_RA3) ||                                         \
    defined(TARGET_IS_TM4C123_RB1) ||                                         \
    defined(TARGET_IS_TM4C129_RA0) ||                                         \
    defined(TARGET_IS_TM4C129_RA1)
#define ROM_ADCSequenceDataGet                                                \
        ((int32_t (*)(uint32_t ui32Base,                                      \
                      uint32_t ui32SequenceNum,                               \
                      uint32_t *pui32Buffer))ROM_ADCTABLE[0])
#endif
#if defined(TARGET_IS_TM4C123_RA1) ||                                         \
    defined(TARGET_IS_TM4C123_RA3) ||                                         \
    defined(TARGET_IS_TM4C123_RB1) ||                                         \
    defined(TARGET_IS_TM4C129_RA0) ||                                         \
    defined(TARGET_IS_TM4C129_RA1)
#define ROM_ADCIntDisable                                                     \
        ((void (*)(uint32_t ui32Base,                                         \
                   uint32_t ui32SequenceNum))ROM_ADCTABLE[1])
#endif
#if defined(TARGET_IS_TM4C123_RA1) ||                                         \
    defined(TARGET_IS_TM4C123_RA3) ||                                         \
    defined(TARGET_IS_TM4C123_RB1) ||                                         \
    defined(TARGET_IS_TM4C129_RA0) ||                                         \
    defined(TARGET_IS_TM4C129_RA1)
#define ROM_ADCIntEnable                                                      \
        ((void (*)(uint32_t ui32Base,                                         \
                   uint32_t ui32SequenceNum))ROM_ADCTABLE[2])
#endif
#if defined(TARGET_IS_TM4C123_RA1) ||                                         \
    defined(TARGET_IS_TM4C123_RA3) ||                                         \
    defined(TARGET_IS_TM4C123_RB1) ||                                         \
    defined(TARGET_IS_TM4C129_RA0) ||                                         \
    defined(TARGET_IS_TM4C129_RA1)
#define ROM_ADCIntStatus                                                      \
        ((uint32_t (*)(uint32_t ui32Base,                                     \
                       uint32_t ui32SequenceNum,                              \
                       bool bMasked))ROM_ADCTABLE[3])
#endif
#if defined(TARGET_IS_TM4C123_RA1) ||                                         \
    defined(TARGET_IS_TM4C123_RA3) ||                                         \
    defined(TARGET_IS_TM4C123_RB1) ||                                         \
    defined(TARGET_IS_TM4C129_RA0) ||                                         \
    defined(TARGET_IS_TM4C129_RA1)
#define ROM_ADCIntClear                                                       \
        ((void (*)(uint32_t ui32Base,                                         \
                   uint32_t ui32SequenceNum))ROM_ADCTABLE[4])
#endif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×