How to connect on Nucleo with GDB? - c

I am using arm-none-eabi toolchain to create binary file for Nucleo which I then flash to the Nucleo using the USB virtual storage device it provides.
I am compiling the program with -ggdb. But how could I possibly connect to the nucleo and execute breakpoints on it? I can't even imagine how could it work, but I'm complete beginner.
Can I connect? How?

Yes you can connect, at least from a Linux host. I never tried from Windows system. Use OpenOCD to open a debug port and connect gdb (used arm-none-eabi-gdb) to this port with "gdb extended-remote" command. I am using this method from Linux host PC to connect to a custom board based on STM32L4 series for debugging and collecting log messages. Nucleo boards are also using the same series of STM controller.

For what it's worth there's a free IDE call EMBlocks that I've used in the past. I think the new version is called EMBitz https://www.embitz.org/
I've used it to both flash the STM32 Nucleo boards as well as debug the flashed image file.
A quick search also turns up this website that seems to indicate you can use GDB with the stlink utility. https://openenergymonitor.org/emon/node/6189

Related

Programming external QSPI flash Raspberry Pi Pico

I want to reprogram the external flash of a raspberry Pico via SWD line.
This feature must be implemented in a different microcontroller, not from a Linux computer so the OpenOCD library cannot be used.
I already wrote a C library that is able to read and write in RAM and in core registers via SWD and I'm able to put the Cortex-M0+ into halt state.
I read many tutorials and documentation and those that are useful are:
http://markding.github.io/swd_programing_sram/
https://www.silabs.com/documents/public/application-notes/an0062.pdf
https://community.silabs.com/s/article/how-to-program-internal-sram-over-swd?language=en_US
but unfortunately they aren't clear enough.
Can you explain the sequence of commands that I should send to RP2040 to correctly upload the new firmware?
Thanks for your help!

Debug stm32 nucleo using gdb

how can I debug STM32 board using gdb without stlink or any other device.
actually I am trying to design an equipment which can replace the STMC device, since ST was stopped making this devices
You cannot debug a bare metal system without a debugger. STM32 support JTAG, SWD debuggers. You still can program it without a programmer/debugger (using the integrated bootloader if present in your model) and put your debug string on an uart, but no conventional debuggin, so no gdb.

parallella fpga : how to give an interrupt from pl to arm ps

I successfully implemented an "[accelerator in 15 minutes]"1 on parallella board. Now I need to send an interrupt from pl to ps. So I connected it to IRQ_F2P of Zynq processing system.
Now, how can I get this interrupt in arm processor?
Usual interrupt example using "XILINX SDK" tool which uses a JTAG. But in parallella , I don't have a JTAG. (I am coping the program to SD card and execute it from SD card using Ubuntu). So any suggestions are most welcome.
So for parallella, I tried to use the Xilinx SDK, but the header files are creating an error..
My one more doubt is "Is it possible to create a bsp using sdk tool and copy it into sd card and then make it run on parallella board. Will it work ?
If not, how do we get this interrupt in arm processor, because all example uses Xilinx header files like "xparameters.h, xil_printf.h, xcugic.h, etc" and these are connected to many other Xilinx functions.

Communication with mbed using C

How can I communicate with an mbed LPC1768 using C without using a terminal emulator like minicom or teraterm?
For example if I send an integer from my C code than that led should be turned on.
How can I do this?
Without reading user manual or datasheet you can't do any thing to your board. So just go through it then follow below link for demo application LPC1768 board
1.NXP LPC1768 ARM Cortex-M3 Red Suite Demo
2.LPC1768 ARM Cortex-M3 CrossWorks Demo
3.mbed
4.At github
If you are using linux or osx check out the following answer:
How do I read data from serial port in Linux using C?
You can check your /dev folder and look for a file that is created when you plug your mBed. The file name would be something like /dev/ttyS0. That file represents the communication port, you can read/write that file to receive/send data over serial port.
If you want a cross platform solution try RxTx library for Java.
You can use this library
what it does, is that it initialize UART port which is connected to the debugger on your board and use it as serial input output. so with any hyper terminal of your choice, you can write code to do something if you send certain string of characters or just use original printf when something happens. and it will be printed on your PC screen.

How do I setup wdb for Pre-Kernel debugging in vxworks 6.7?

I am new to the RTOS world and working on the eval version of vxworks 6.7. I don't know How to turn on the wdb debugging for my bootloader which has troubles loading my network driver. I hope someone can help me with a quick tips.
Thank you
Are you connected via serial for debugging? If not, it may be impossible to debug networking issues. wdb runs on host in eclipse and connects to device (target) via serial or ethernet.
Anyway you turn on wdb support via the project when you build the bootloader.

Resources