2012-08-20 06:14 AM
Hi,
When I use strcat to append a string to a destination string. It does not work. I did it like this. char *item_list = ''''; strcat(item_list,''hello''); When I set a break point and check the item_list, it is still NUll. Any ideas?2013-02-24 06:52 AM
I can only work with the information presented.
If you are using DMA to fill the buffer you need to define it as volatile (ie changed outside the natural flow of the code). You should also look to see if the DMA actually completes. Add some telemetry via the serial port, and increase it's verboseness until you can understand the flow and structure content. The issue is outside the code you have presented currently.2013-02-24 07:26 AM
you are right. buffer should be volatile. I changed it, but without good news.
I'm going toattach here my code (_it.c file is empty, and HTML is a string #define). Yes, I know, I should implement also a FIFO queue. That will be the next step, once solved this issue. thanks again. I feel no more alone in this working sunday! ________________ Attachments : main.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hyzp&d=%2Fa%2F0X0000000bO8%2F7Fhp2IkOUvocSbblo69PRNSGtkwtoLITLFyMaEJNvDU&asPdf=false2013-02-24 01:47 PM
I need to work through the mechanics there, but you definitely need to be clearing the CharBuffer before you start iterating the loop, and ensure the CharBuffer is one byte bigger than the DMA transfer, and the final byte beyond the DMA is NUL.
2013-02-24 11:48 PM
ok, thanks.
the buffer will be always filled (by now) with 6 to 1917 chars. after every ''receive'', it's filled (by memset) with '\0' char.2013-02-27 02:40 AM
Solved by RTOS