Proxmark3 community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

  • Logged in as ikarus
  • Last visit: Today 11:22:42

Announcement

Time changes and with it the technology
Proxmark3 @ discord

Users of this forum, please be aware that information stored on this site is not private.

#1 2022-03-29 11:00:42

sampurna
Contributor
Registered: 2022-02-19
Posts: 16

Debug Arm code using VSCode in Linux

Hi

I am using Linux and VSCode , I am able to debug the client code .
Is there any way to debug the following functions/method from the client code.

void FpgaSendCommand(uint16_t cmd, uint16_t v);

void FpgaDownloadAndGo(int bitstream_version);

void FpgaSetupSsc(uint16_t fpga_mode);
void SetupSpi(int mode);

Any kind of clue or help is highly appreciated .

Offline

#2 2022-03-29 11:51:54

gator96100
Contributor
From: Austria
Registered: 2016-03-25
Posts: 177

Re: Debug Arm code using VSCode in Linux

There is the option of hardware debugging on the arm mcu. You will need a Segger J-Link Debug Probe connected to the proxmark and the Segger J-Link software installed. In VSCode you will need to select the correct task.

Offline

#3 2022-03-29 15:11:58

sampurna
Contributor
Registered: 2022-02-19
Posts: 16

Re: Debug Arm code using VSCode in Linux

Thanks @gator96100, appreciate your work related to debugging proxmark using VSCode , it really helped me to debug the client code . I too tried to reach you related to this .

So, does it indicate that we cannot debug the flow to FPGA or ARM module from client code ,  I was thinking if any options in any make files would create the debug symbols and we can see the what values we are getting in DMA buffer.  i also observed  another  flag DEBUG_ARM=1 in git , but don't know how to use and where to use it.

My issue is that i am able to build all the components  when we run the command make clean && make all, but the debugging information is not getting created for appmain.c file as well as the files placed in armsrc folder. Any ways to generate the debug information ? When i put a breakpoint in above function . VS code shouts
"Module containing the breakpointis not loaded yet or breakpoint location couldnot be reached.

Waiting for some kind of input or reference.

Last edited by sampurna (2022-03-29 15:17:21)

Offline

#4 2022-03-30 01:36:13

sampurna
Contributor
Registered: 2022-02-19
Posts: 16

Re: Debug Arm code using VSCode in Linux

Hi @gator96100  i am debugging the client code in Ubuntu with VS code  following the steps mentioned in  http://www.proxmark.org/forum/viewtopic.php?id=10164

I am able to debug the client code as well as the commands that are send through the method "uart_send", after that not able to debug  "PacketReceived" from armsrc code invoked inside the function  "void  __attribute__((noreturn)) AppMain(void)".

Please let me know if i am missing any settings or do i need to install any cross compiler tool chain.

Last edited by sampurna (2022-03-30 01:46:17)

Offline

#5 2022-03-30 08:01:34

sampurna
Contributor
Registered: 2022-02-19
Posts: 16

Re: Debug Arm code using VSCode in Linux

Hi Gator96100 ,

I got your article from git , https://github.com/RfidResearchGroup/proxmark3/pull/1146

I am observing the same issue . can you please little bit elaborate it . I would like to see how the data is moving from client to  firmware . Can you please share the steps in chronological order.

Offline

Quick reply

Write your message and submit

Board footer

Powered by FluxBB