This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123G and Kentec L35

Other Parts Discussed in Thread: EK-TM4C123GXL

TM4C123GXL rev A    (TI Tiva C Series uC)
EB-LM4F1230-L35      (KenTec Touch Screen)
CCS Version: 5.5.0.00077
Windows 7

Hello,

I'm relatively new to uCs, and I'm trying to write my own project using the TM4C123G uC and Kentec L35 touch screen.
I went through the Lab10 workshop, no problems.

I started iteratively building my own project in CCS Edit which went well until I tried to implement the touch part of the touchscreen (TouchScreenInit).

The error I get is #20 identifier "INT_ADC0SS3_" is undefined (in touch.c - TouchScreenInit(void) ).

Except from what I can tell, INT_ADC0SS3 is defined in hw_ints.h, which I verified is #included in touch.c... 
#define INT_ADC0SS3             INT_CONCAT(INT_ADC0SS3_, INT_DEVICE_CLASS)

Perhaps there's an instantiation I'm missing?

I literally copied the files like Kentec320x240x15ssd2119_8bit.c/h and touch.c/h from the working Lab10, and everything else is linked to the same files that Lab10 uses as near as I can tell.
http://processors.wiki.ti.com/index.php/Getting_Started_with_the_TIVA%E2%84%A2_C_Series_TM4C123G_LaunchPad

My main.c include files are as follows:

#include "stdint.h"
#include "stdbool.h"
#include "time.h"

#include "inc/hw_memmap.h"
#include "inc/hw_nvic.h"
#include "inc/hw_sysctl.h"
#include "inc/hw_types.h"

#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#include "driverlib/flash.h"
#include "driverlib/sysctl.h"
#include "driverlib/systick.h"
#include "driverlib/uart.h"
#include "driverlib/udma.h"
#include "driverlib/rom.h"

#include "grlib/grlib.h"
#include "grlib/widget.h"
#include "grlib/canvas.h"
#include "grlib/pushbutton.h"

#include "utils/ustdlib.h"
#include "Kentec320x240x16_ssd2119_8bit.h"
#include "touch.h"
#include "images.h"

Has anyone seen this, or can offer any direction or insight into my dilemma?  I really appreciate your help. 
Thank you very much.

  • Hi Victoria,

    Victoria Kaiser said:
    The error I get is #20 identifier "INT_ADC0SS3_" is undefined (in touch.c - TouchScreenInit(void) ).

    INT_ADC0SS3 is defined at hw_ints.h. Add this #include below.

    #include "inc/hw_ints.h"

    -kel

  • Hi Victoria

    Also please remember to use the define TARGET_IS_BLIZZARD_RA3 since the part you seem to have is revision A3.

    Also if you can confirm that the TivaWare release is TivaWare_C_Series-2.0.1.11577, then that should solve the compilation error along with kel's update?

    Amit

  • Kel,

    Thank you for your input. As I explained, touch.c does include that library already, and I still receive the error.

    I did attempt to include hw_ints.h to my main.c previously, and I just re-attempted to no success.   
    I'm not sure the main.c would require that include?

    Thank you for your help.

  • Amit,

    Thank you for your response. Yes, I am using TivaWare_C_Series-2.0.1.11577.

    I added to my predefined symbols (Properties -> Build->ARM Compiler->Advanced Options->Predefined Symbols)
     TARGET_IS_BLIZZARD_RA3 which resolved the error.

    Thank you for your assistance, I appreciate your help!

  • Hi Victoria,

    The define has to be added as a build define in CCS and not in main.c

    Since you have a EK can you please check the markings on the TM4C device. Based on that I would be able to give you the correct define to be used.

    Regards

    Amit

  • Hi Amit,

    The markings on the TM4C device board are as follows:

    EK-TM4C123GXL REV A

    Tiva C Series Launchpad

    The back sticker reads 13100419C

    Perhaps this is related, when I attempt to debug the project with the new pre-defined TARGET_IS_BLIZZARD_RA3, the 'Resume' Button in the debug toolbar is grayed out and the code seems to not be running.  However, switching to a different project this works correctly.

    Thank you for your help!

  • In revisiting this project, I find I continue to have this problem.  

    At 'TouchScreenInit()' I find the program stalls.  I have traced it to IntEnable(INT_ADC0SS3) in touch.c and  eventually to the IntDefaultHandler for 'unexpected interrupts.'

    I (believe) I have defined 'TARGET_IS_BLIZZARD_RA3' properly. I have included #include "inc/hw_ints.h" as suggested.

    Is there some other 'define' I am supposed to include?

    Thank you for your assistance.

  • Hate to see your pain/suffering/frustration continue.   Know that you are not alone - many suffer similar...

    Our group works w/many ARM MCUs - thus "vendor agnostic" IDE proves de rigeur.  (my hedge - inability to provide an exact solution - your dilemma)

    What should work is for you to (for now) discard any/all attempts to "roll your own project" - instead choose the closest, "vendor created project" and gradually import your special bits.  (ideally one major function/file at a time)

    This method usually insures that all of the special/vital "hooks/requirements" of the IDE are properly managed.  You may then wish to really review each/every of the various set-ups/configs - noting each - prior to any future attempt to, "roll your own."  

    Your main goal should be project completion/mastery - not so much, "IDE care/handling -> mastery."  Using the closest related, existing project and, "NOT Rolling your own" seems to work best for many...

  •  Hi Victoria, to remember forever check if you removed the two zero ohm resistor.

     After that the second issue plagued me on a similar project was stack setting, try

     Property -> BUILD -> Arm Linker -> Basic Option  check the stack value here, by default is silently set to 512 and for graph related project  is not enough.

  • Hi,

    Verify your Tiva version - Amit asked if it is 2.0.1.xxxx - and no confirmation - this is to highlight that in this version the definition of INT_SS03 has changed to:

    #define INT_ADC0SS3_BLIZZARD    33          // ADC0 Sequence 3

    Is this what you need?

    Petrei

  • Victoria Kaiser said:
    Thank you for your response. Yes, I am using TivaWare_C_Series-2.0.1.11577.

    Seems bit too long, "down the mine" mon ami - poster had indeed responded...  (Jan 20 - 12:36 ... so long ago)

    "Hooking in" to a proven - existing project is so, so much easier.  Pity that you/Roberto don't join in that recommendation...  (Now FIVE Months down the "rat-hole" in pursuit of the ever elusive, "roll my own Project!")

  • R: I have altered the stack size a few times, (mostly to get rid of the warning) thus far it does not seem to have altered anything.  Is there a particular size you suggest?

    With regard to the 0-ohm resistors, I have not noticed this problem with the examples.  What is it you suggest needs to be opened?

    : I apologize, was my confirmation of using "TivaWare_C_Series-2.0.1.11577" (5th post) not the Tiva version he was asking for? What information should I be providing with regard to version?
    I did add this define in my main c file as you suggested, to no effect.  I still have this unexpected interrupt triggered issue described above. 

    : Thank you, I have gotten many of the examples working.  To be fair, this project was put on the 'back burner' so I didn't have an opportunity to pursue this issue until now.  Perhaps that's my only reasonable option, to clean out an example program and build from that.
    It's just that 'why things work they way they do' mentality I have a problem quelling.  ;-)

  • Hi, 

    @Victoria,

    First, I missed that row with Tiva version - I apologize... As for the "define" i do not expect to be added to the main file since it is already part of inc/hw_int.h file; i expect to change the calling of IntEnable to 

    IntEnable(INT_ADC0SS3_BLIZZARD) 

    since the name of parameter has changed. Can you try that?

    Petrei

  • Petrei,

    You're suggesting I modify the touch.c file?  Won't that affect other projects that are currently functioning and which are dependent on that file?

  • Hi,

    You may try to identify the problem: first compile the program and then goto to the line IntEnable(INT_ADC0SSI3) in touch.c file; hover on the parameter and the IDE should evaluate that macro for you(it is four level macro). The right number you must see is 33. If you do not find out this number, then you can use the alternate name suggested or even the brute force number 33. (Today I compiled an application with touch.c file and all was OK for me, I use CCS6.0)

    Then goto debugger, place a breakpoint to the same line and run until stopped at the breakpoint. Then examine the asm code inside asm window, for IntEnable function. Should see two .asm lines

    movs r0, #0x21 ;// aka 33

    blx IntEnable

    If you find out these two lines, then step-in the InEnable function to find out which exactly expression triggers fault. You may use also the ROM_IntEnable function. 

    Also, to deal with hard faults, see this application note from TI http://www.ti.com/lit/an/spma043/spma043.pdf

    Petrei

  • Victoria Kaiser said:

    R: I have altered the stack size a few times, (mostly to get rid of the warning) thus far it does not seem to have altered anything.  Is there a particular size you suggest?

     I don't know exactly, 2048 or 4096 can be enough, insert a line on an Interrupt routine and set a global variable to lowest stack address found, tis can be a measure of stack deep needed. When I was setting stack measure seemed ok, 1400 bytes when was set to 2048, 4096 then 16K, but stack where set from where I pointed and it was just 512 so a huge stack overflow was in place!

    Victoria Kaiser said:

    With regard to the 0-ohm resistors, I have not noticed this problem with the examples.  What is it you suggest needs to be opened?

     When I saw them my board overheated an  port connected by 0 Ohm got broken.