Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORESIGHT_AddAP doesn't execute #189

Open
engrnader opened this issue Dec 21, 2023 · 6 comments
Open

CORESIGHT_AddAP doesn't execute #189

engrnader opened this issue Dec 21, 2023 · 6 comments

Comments

@engrnader
Copy link

engrnader commented Dec 21, 2023

Hi,
i'm executing a the commands below to connect to Cortex-M55 however I was not successful:
response_1 = jlink.exec_command('CORESIGHT_AddAP = Index=4 Type=AHB-AP Addr=0x00300000')
response_2 = jlink.exec_command('CORESIGHT_SetIndexAHBAPToUse = 4')

It seems that the second command works fine but not the first command. I wrote a jlink script and ran it from keil following the same exact procedure and I was able to connect to the device. I'm trying to override AP[4] address to 0x00300000.

image

Can someone help me implementing this using pylink?

@engrnader engrnader changed the title CORESIGHT_AddAP doesn't execut CORESIGHT_AddAP doesn't execute Dec 21, 2023
@hkpeprah
Copy link
Contributor

Could you try to use the coresight_* functions instead? https://pylink.readthedocs.io/en/latest/pylink.html#pylink.jlink.JLink.coresight_configure

@engrnader
Copy link
Author

If I use the coresight functions instead I would have to define the ir_pre and post and dr_pre and post. I don't know those parameters.

How would you do it given the code I provided before?

@hkpeprah
Copy link
Contributor

hkpeprah commented Jan 3, 2024

AFAIK, you can omit those parameters (they're optional). What have you tried?

@engrnader
Copy link
Author

engrnader commented Jan 3, 2024

Then how can I specify the ROM table address? Jlink by default assumes the ROM table is at address 0x0.

I tried coresight_configure() with no parameters and it didn't work.

Here is what I have tried per your recommendations:
image

I gotten the same error.
image

Now, the issue here is that there are multiple cores within the JTAG chain and I want to select a specific core within the JTAG chain shown in the code snippet above. When executing the commands mentioned before, it don't select the core specified.

Perhaps i'm using coresight_configure() wrong.

@hkpeprah
Copy link
Contributor

hkpeprah commented Jan 8, 2024

If there are multiple cores on the JTAG chain, then you unfortunately have to use the arguments: https://pylink.readthedocs.io/en/latest/pylink.html#pylink.jlink.JLink.coresight_configure

I personally haven't used an ARM device with multiple cores on a single scan chain, so I can't tell you what the arguments you would pass for each of those would be. Sorry to say. I would look up a reference manual for your part to see if it specifies anything about that. I'm guessing the core_idx is related to the device index on the scan chain.

@engrnader
Copy link
Author

@hkpeprah thank you for your response. I will look into this more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants