I decided I would modify the blinky project (dk-tm4c129x) because I'll likely want to make some LED error codes in the future. Blinky uses the LEDs differently than I am used to, avoiding calls to ROM_SysCtlPeripheralEnable, ROM_GPIOPinTypeGPIOOutput, GPIOPinWrite and ROM_SysCtlDelay.
I decided as practice I would try to transform blinky to use these as opposed to writing directly as it was.
Unfortunately I've been held up immediately and I can't figure out why I'm getting this unresolved symbol error.
My first change was to replace the for loops with ROM_SysCtlDelay's.
#include <stdint.h> #include "driverlib/rom.h" #include "inc/tm4c129xnczad.h" //***************************************************************************** // //! \addtogroup example_list //! <h1>Blinky (blinky)</h1> //! //! A very simple example that blinks the on-board LED. // //***************************************************************************** //***************************************************************************** // // Blink the on-board LED. // //***************************************************************************** int main(void) { volatile uint32_t ui32Loop; // // Enable the GPIO port that is used for the on-board LED. // SYSCTL_RCGCGPIO_R = SYSCTL_RCGCGPIO_R14; // // Do a dummy read to insert a few cycles after enabling the peripheral. // ui32Loop = SYSCTL_RCGCGPIO_R; // // Enable the GPIO pin for the LED (PQ7). Set the direction as output, and // enable the GPIO pin for digital function. // GPIO_PORTQ_DIR_R = 0x80; GPIO_PORTQ_DEN_R = 0x80; // // Loop forever. // while(1) { // // Turn on the LED. // GPIO_PORTQ_DATA_R |= 0x80; // // Delay for a bit. // //for(ui32Loop = 0; ui32Loop < 200000; ui32Loop++) // { // } ROM_SysCtlDelay(200000); // // Turn off the LED. // GPIO_PORTQ_DATA_R &= ~(0x80); // // Delay for a bit. // for(ui32Loop = 0; ui32Loop < 200000; ui32Loop++) { } } }
If I click f3 on "driverlib/rom.h" it takes me to the header, searching the header I'm able to find ROM_SysCtlDelay which should be defined if TARGET_IS_TM4C129_RA1 (which is defined in my compile time flags)
This one just doesn't make any sense to me. Any ideas?