Cannot access memory
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-02-15 4:34 AM - last edited on 2024-02-15 8:27 AM by mƎALLEm
Hi, I am having problem with string copy strncpy(). I am getting error message "Cannot access memory at address 0x31203a6e"
static char *DataBuffer[30] = {0};
for(char *str =strtok((char*)recdata, "\n\n"); str; str = strtok(NULL, "\n\n"))
{
strncpy(DataBuffer, str, strlen(str)+2);
strcat(DataBuffer,"\n");
strncpy(DataBuffer, str, strlen(str)+2);
}
Is it memory addressing access faults. Is the chip failing memory handling. How do I debug it to find out.
Labels:
- Labels:
-
STM32F4 Series
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-02-25 6:21 AM
NULL is not a pointer to a string pointer. Use &recdata, assuming recdata is a string pointer.
If you feel a post has answered your question, please click "Accept as Solution".

- « Previous
-
- 1
- 2
- Next »