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.
Part Number: SM320F28335-EP
I'm working with the F28335 EP micro.
I work with linker file that save and run the code in flash memory.
Now I'm trying to use the sprintf function but when the micro execute it the system generate and exception and finish to work.
I search on internet and I see that is a common problem. I follow also some threads on the forum as (link ) but it do not help me.
I changed in the linker the stack to 0x800 and the heap size to 0x800 but it still do not work.
I noted that if I write the in this way "sprintf(buff, "Test");" it works. But if I write the function in this way "sprintf(buff, "Test %d", var);" it fails and generate an exception.
I try with all the suggestion that I found on the forum but I did not able to use the sprintf in my project.
Thank you very much for your help.
In reply to Wade VonBergen:
In reply to Andrea Emili78:
In reply to Whitney Dewey:
I still having the problem with sprintf.
I increase the heap and and stack size as suggested in some forum but did not work for me.
Have you some suggestions for me?
thank you very much for your support and sorry for the delay but I have to go forward in my project.
Today in order to answer to your question I did further tests.
My code is the following:
unsigned char ExploerF28335_Setup()
unsigned char explorerF28335_setup_status = EXPL_F28335_NO_ERROR;
unsigned char temp_test = 10;
sprintf(buff,"Test printf"); /*This function go weel and the program go forward*/
sprintf(buff,"Test printf %d", temp_test); /*This function do not work and cause
SCIX_SendString(SCI_A_ID, "Hello I'm the TI explorer board kit\n");
SCIX_SendString(SCI_A_ID, "Board IO Init complete\n");
SCIX_SendString(SCI_A_ID, "Timer Init complete\n");
SCIX_SendString(SCI_A_ID, "SCI Init complete\n");
I noted that the first sprintf go well while the second sprintf has a uncontrollable behavior and block the microcontroller.
I attach to two images of my debug setup and steps before and after execution.
Hi Whitney, thank you for your post. In this moment I'm busy with documentation of the project. I did only the test 1 and 2 but I got the same issue. I tried also to flash the micro and run the application without debugger , so without brekpoints, but when executed the sprintf fails in same way. The next week I want to check the point 3. I think that it could be a right step in debug procedure. I'm sorry for the delay. Thank you again for your support and for your suggestions. Regards, Andrea
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.