Part Number:MSP430G2744
Tool/software: Code Composer Studio
Goodmorning Everybody!
I have some debugging troubles with the code I wrote, but first of all let me explain a bit more about my program.
I want my little keyboard with UP and DOWN buttons to change a value on the display by incrementing or decrementing a start point value and, in the ISR of the TIMER A, I need to call my .asm function every 10ms so that I would be able to know if the general button (that is my variable TASTO) is or not pressed by the user.
After reading that value I call the .c function "button_pushed" for doing some different operations in the case the button pushed is UP or DOWN button.
I have a .c header file shared with an .asm file: here there are the definitions of all the variables and functions I want to use in the .asm file.
In this header file I declared the variable TASTO as follows:
extern unsigned char TASTO;
In the .asm file I wrote something like this:
.bss TASTO, 1
.global TASTO
and until this point everything looks fantastic: infact when I compile my code I haven't any errors and warnings.
But unfortunately I can't tell the same for the debug step because my program doesn't do what I want (as described above).
It seems like the linker file doesn't match the variable TASTO decleared in .c header file with the variable that I'm using in the .asm function.
Is it possible? Have I write something wrong?
Which is the easiest way to declare a variable in C header file and use it in .asm file, sharing that header file?
(The files mantioned before are attached to this post).
I hope someone could really help me to find out a solution so that I can proceed with my work.
Thank You very much for the attention,
Kind Regards,
Maria Angela
(Please visit the site to view this file)