Jump to content
43oh

ButtonsPoll()


Recommended Posts

Hi, I'm having a lot of issues trying to get the ButtonsPoll() function working as recommended at the end of tutorial 3 from TI. I've done the first 3 lab instruction videos, followed the guidance on http://unboxnbeyond.wordpress.com/2013/04/14/using-button-h-for-inbuilt-buttons/#more-166, and also followed the guidance on a previous topic: http://forum.stellarisiti.com/topic/577-polling-a-switch/ . I think I've managed to set the include options to the right place, they are identical to the first link, same with the file search paths, and set the macros ( compliler|advanced options|predefined symbols) to what is recommended in the other topic. They are in the correct order (not sure why that makes a difference but seems to reduce my errors),

 

The errors I am getting are:

Description Resource Path Location Type
<a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function "ROM_GPIOPadConfigSet" declared implicitly buttons.c /lab3/drivers line 178 C/C++ Problem
<a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function "ROM_GPIOPinRead" declared implicitly buttons.c /lab3/drivers line 185 C/C++ Problem
<a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a>  unresolved symbols remain lab3 C/C++ Problem
#10010 errors encountered during linking; "lab3.out" not built lab3 C/C++ Problem
unresolved symbol ROM_GPIOPinRead, first referenced in ./drivers/buttons.obj lab3 C/C++ Problem
unresolved symbol ROM_SysCtlPeripheralEnable, first referenced in ./drivers/buttons.obj lab3 C/C++ Problem
unresolved symbol ROM_GPIODirModeSet, first referenced in ./drivers/buttons.obj lab3 C/C++ Problem
 
Warnings:
<a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function "ROM_GPIOPinRead" declared implicitly buttons.c /lab3/drivers line 93 C/C++ Problem
unresolved symbol ROM_GPIOPadConfigSet, first referenced in ./drivers/buttons.obj lab3 C/C++ Problem
<a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function "ROM_SysCtlPeripheralEnable" declared implicitly buttons.c /lab3/drivers line 163 C/C++ Problem
<a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function "ROM_GPIODirModeSet" declared implicitly buttons.c /lab3/drivers line 177 C/C++ Problem
 
 
I tried inserting the macro 'CCS = "CCS" ' (blindly, have no idea what its doing), this gets rid of the errors, and just causes a fatal compilation error. 
 
I hope someone can help me solve this issue. I understand how to do the button polling through other means, but I think getting my head around a seemingly ridiculous maze of includes and search paths is more important. 
 
 

 

Link to post
Share on other sites

Hi,

Every time you encounter the error "function declared implicitly in file xxx" means the compiler cannot find the declaration of the function, usually in some yyy.h file. This comes from two reasons: either you did not mention the file yyy.h at the beginning of your file, either you miss a "include" path declaration to that file. 

 

At the beginning of the file you must have something like this:

#include <stdbool.h>
#include <stdint.h>
#include "inc/hw_types.h"
#include "inc/hw_memmap.h"
#include "inc/hw_gpio.h"
#include "driverlib/sysctl.h"
#include "driverlib/rom.h"
#include "driverlib/pin_map.h"
#include "driverlib/gpio.h"
#include "drivers/buttons.h"
 
As for the path, you do not mention your tools, so I am not able to help. However, if CCS, read again the Lab manual, some step is missing, that declaring the ROOT (if I am guessing  well, not on Win system now).
 
Lyon
Link to post
Share on other sites
  • 9 months later...
  • 9 months later...

There is another proper solution. You get these errors because "ROM_***" function wraped by ifdef depending on the target platform type in rom.h and the target platform type is not specified anywhere. Just right click on your project -> Properties -> Build -> ARM Compiler -> Advanced Options -> Predefined Symbols and add "TARGET_IS_TM4C12*****" (See actual list of targets in rom.h, for example, TARGET_IS_TMC129_RA0) under the Pre-defined NAME section.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...