Other Parts Discussed in Thread: AM5716
Tool/software: Code Composer Studio
Hi.
I am making a boot program for MPU (A15) using "TMDXIDK5718".
As shown below, when four processes are described, only the fourth memcpy is not processed correctly.
Stops at runtime.
Please tell me what is wrong.
#include <stdio.h> #include <string.h> /** * main.c */ int main(void) { uint8_t buf[500]; uint8_t *setPos = buf; memset(buf, 0x00, 500); memcpy(setPos, "12345678", 4); // (1) OK memcpy(setPos, "12345678", 8); // (2) OK memcpy(setPos+1, "23456789", 4); // (3) OK memcpy(setPos+1, "23456789", 8); // (4) NG return 0; }
The project is created with the following settings.
The figure below shows the memory when processing up to processing 3 is executed.
It is set correctly.
The figure below shows when process 4 is executed.
The debugger exits.
Thank you.