We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hello friends I'm doing a 8x8 LED matrix with LPC1768 and when I compile I get an error that I can not solve also leave some warnings but I did not care much. could help me? I leave the whole project in keil
many thanks Ciernes
ok I put the const in the function:
void Matrix_NewFrame(const uint8_t array[8]);
but now it seems that there is still something wrong
Build target 'Target 1' compiling main.c... compiling matrix.c... linking... .\matriztest.axf: Error: L6200E: Symbol ascii multiply defined (by matrix.o and main.o). .\matriztest.axf: Error: L6200E: Symbol ascii multiply defined (by matrix_font.o and main.o). .\matriztest.axf: Error: L6200E: Symbol character_length multiply defined (by matrix.o and main.o). .\matriztest.axf: Error: L6200E: Symbol character_length multiply defined (by matrix_font.o and main.o). ".\matriztest.axf" - 4 Errors, 0 Warning(s). Target not created
matrix.h
extern const uint8_t ascii[128][8]; extern const uint8_t character_length[128];
Then actually define it ONCE
This is a time when a sequential reading of a good programming book really would have helped.
Ever consider the keyword "extern"? Ever looked into a book about C regarding use of multiple source files and the use of header files to inform the compiler of what functions and variables the different source files might contain?
There is a reason why people often start with something simple, like a "hello world!" application and then add new complexities step-by-step instead of trying a big-bang approach. The step-by-step approach teaches all the relevant keywords. How to spell them. What they are good for. When to use them. And it describes the block structure, the control and loop blocks. And covers from simple to more and more complex data type constructs.
Doing many small steps, with regular positive feedback in form of a working program, is way more satisfying than getting stuck with a too large piece of code and not understanding what is happening and why.
Note that Google is very good to use when you get an error message - it will very often lead to either other people having had a similar issue (and help they have received with it) or even full lessons teaching that relevant part of coding.
The code now does not throw any error, we wanted to thank the patience you have had. I certainly started with a "hello world" and it seemed easy, so I wanted to take a chance with something bigger it is clear that the code is too big and complicated for me, but believe me I'm going to spend long hours studying to do similar things without help. I know that no questions are addressed to "stupid" problems in this kind of forums but this forum together with two or three more are the ones who have a professional level. There are supposedly forums where people try to give you an expert solution but unfortunately these people have not shown a higher level mio. The next time I come into this forum, I will try to do more constructive questions. thank you very much Per Westermark
carefully: Jonathan