Hi, I am using ULINKpro D and JTAG connection to program a Cortex M7 baremetal device. Although ULINKpro D seems to be installed correctly (device manager - USB) and the connection between ULINKpro D and my DU seems okay, I cannot connect the debugger and this page shows up;
Also I get an error in Console:
Unable to connect to device ARMCS-DPI tried a couple of changes and I have this error as well:
Detected number of devices = 136, maximum allowed = 128. This problem is usually a result of the scanchain not acting correctly when using JTAG scans to count the number of devices.Does anyone know how to solve it?The only thing that has to be mentioned is that I am using 20 to 20 pin adaptor provided in the package of ULINKpro D.Thanks & regards
Apologies, I should correct my earlier reply.
CS refers to the presence of CoreSight SoC-400 in that design.
https://developer.arm.com/Processors/CoreSight%20SoC-400
See section 8 of AN399:
https://developer.arm.com/documentation/dai0399
Thank you Ronan for all good information provided!I followed the steps and I can read/write to ITCM and DTCM.There is only one issue left I assume, which is the shared memory between the CPU and other IPs with the address 0x60000000.When I want to read/write to this memory, I get this error:
Here is memory information;
Hi again
There are various reasons why the debugger might be unable to read the memory/peripheral at that addresses, for example:
* the peripheral might be powered-down
* the peripheral might need to be explicitly enabled before use
* the MPU might be blocking access to that address
* the memory/peripheral might be inaccessible/disabled for the current processor mode or security state (e.g. some memory/peripherals are only accessible in secure state)
* the memory/peripheral might require a certain access width, e.g. 8-, 16- or 32-bit access.For example, to read a word with a 16-bit (LDRH) access, you can use:x /w <width=16>:0x60000000
You'll need to check the specification for your target to investigate what might be preventing the access.
Stephen
Hi StephenWe realized it was the problem that you mentioned (peripheral might need to be explicitly enabled before use), and the issue is solved now.Thank you and Ronan for your kind cooperation.
Thanks for letting us know.If you could mark this thread as Answer Accepted, that'd be appreciated.Hope your product development now continues smoothly.Stephen
Thank you Stephen and Ronan;I already did that for all the conversation.Just two thing that I really appreciate to know.1. Is there a command to see the clock speed of my CPU. Since this CPU is not commercialized, I could see small adjustments in the design. I wanted to make sure what the highest clock is.2. I want to investigate about the memory as well, I want to know the size of ICTM and DTCM, and if there is any other memory designed for the CPU. Than you in advance for your kind cooperation.
Hi again,Sorry, the debugger is not able to show you the clock speed of your CPU. You'll need to ask your hardware designers for that information. But you can set the JTAG clock from within the debugger.The ITCM and DTCM sizes can be read from the CM7_ITCMCR and CM7_DTCMCR. See:developer.arm.com/.../instruction-and-data-tightly-coupled-memory-control-registersThe debugger is not able to work out for itself what other memory might be in your system, though you might be able to probe for working memory using the Memory view. But again, best to ask your hardware designers for that information. Hope this helpsStephen
Hello!Thanks again.Appreciate your kind cooperation.
Hi again!When we used malloc of size 2**15 in C code, it does not allocate. uint16_t *out = (uint16_t *)malloc(samples_size * sizeof(uint16_t)); if (!out) { fprintf(stderr, "Memory allocation for out failed.\n"); exit(1); }unsigned int samples_size = 1 << 15;Our DTCM 256kb and also ITCM is 256kb.CM7_DTCMCR x 0xE000EF940xE000EF94: 0x00000049CM7_ITCMCR x 0xE000EF900xE000EF90: 0x00000049It seems that I cannot use all 256kb that I have in DTCM.Can you give me insights through this?
Please create a new thread for a new question so others in the community can assist (as well as find answers).
Malloc() will use the heap to allocate memory. Where have you located this (via scatterloading region ARM_LIB_(STACK)HEAP)?
Thank you for your answer, I could not find any documentation regarding this issue, but I created a new thread here:Memory allocation IssueIt would be appreciated if you help me there.Warm regards
Mehran