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

Debugging support #1

Open
valeros opened this issue Jul 9, 2019 · 16 comments
Open

Debugging support #1

valeros opened this issue Jul 9, 2019 · 16 comments
Labels
help wanted Extra attention is needed

Comments

@valeros
Copy link
Member

valeros commented Jul 9, 2019

Hi @sathya281! Could you please describe (or ask someone who knows) how you debug your boards at the moment? What software, debug probe, target do you use (for example artix7_100t board)?

@valeros valeros added the help wanted Extra attention is needed label Jul 9, 2019
@ghost
Copy link

ghost commented Jul 10, 2019

Hi,

First of all thanks for the platform support.

Hope below answer helps you:

Board : artix7_100t and artix7_35t
debug probe: ftdi interface connected through riscv openocd
Debugger: riscv gnu GDB, 32 bit / 64 bit

For openocd, we want to use below commit. This has ftdi support.
https://github.com/riscv/riscv-openocd/tree/fd9c54b1feea13f6846c69fc9e1e8dc3a7879717

regards,
Sathya

@valeros
Copy link
Member Author

valeros commented Jul 10, 2019

Could you post here a simple command for openocd with all arguments that you are using?

@ghost
Copy link

ghost commented Jul 10, 2019

command -
sudo openocd -f spike.cfg

contents of spike.cfg
#interface_list
interface jlink
debug_level 2

#interface remote_bitbang
#interface usb_blaster

#remote_bitbang_host localhost
#remote_bitbang_port 10000

set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x100039d3
#jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x10e31913

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME

adapter_khz 900
#$_TARGETNAME configure -event reset-start { adapter_khz 200 }
#riscv set_prefer_sba on
gdb_report_data_abort enable

init
halt

@ghost
Copy link

ghost commented Jul 10, 2019

This one is for ftdi stuff
command -
sudo openocd -f spike.cfg

contents of spike.cfg
debug_level 1
adapter_khz 8000
interface jlink
gdb_port 3333
telnet_port 4444
tcl_port 6666

set _CHIPNAME riscv
jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x100039D3

set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME riscv -chain-position $_TARGETNAME

gdb_report_data_abort enable

riscv set_prefer_sba on

init

@valeros
Copy link
Member Author

valeros commented Jul 10, 2019

In both scripts, jlink is specified as the interface: interface jlink. Is that right?

@ghost
Copy link

ghost commented Jul 10, 2019

Hey sorry, Thanks for pointing it out.

I have listed below the config files for both the debug probe.

  1. FTDI support

sudo openocd -f ftdi_spike.cfg
ftdi_spike.cfg

  1. JLINK support

sudo openocd -f jlink_spike.cfg
jlink_spike.cfg

@valeros
Copy link
Member Author

valeros commented Jul 10, 2019

Any plans for adding those scripts to the official shakti-sdk repository? At the moment there is only one spike.cfg for jlink debug probe.

@ghost
Copy link

ghost commented Jul 10, 2019 via email

@ghost
Copy link

ghost commented Jul 12, 2019

Hi,
you can check now. The SDK is updated.

@ghost
Copy link

ghost commented Jul 14, 2019

I went through the code. We need to change lots of data in JSON file

@valeros
Copy link
Member Author

valeros commented Jul 15, 2019

Sure thing, feel free to submit a PR.

@johnnavaj
Copy link

@valeros how do i pull /use this in pio ? i don't see any entry added for the boards mentioned.

@valeros
Copy link
Member Author

valeros commented Jul 16, 2019

You need to install this platform from the git repository, in case you are using the command line version:

pio platform install https://github.com/platformio/platform-shakti.git

or PIO Home -> Platforms -> Advanced Installation in the IDE

@johnnavaj
Copy link

Yes i was able to load the platform into the ide , as part of the board entries i don't find the boards as part of shakti-platform.

@valeros
Copy link
Member Author

valeros commented Jul 16, 2019

I'm not sure I understand your question. Can you please describe in detail what you're trying to achieve?

@johnnavaj
Copy link

I was trying to understand how to add the board entry (ie), when you create a project it should be able to point to the designated board which we have support for eg - artix7_100t or artix7_35t also along with the SDK.

So i discussed with @sathya281 , i will make the changes and submit a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants