

Each category pin can be tabulated as follows: The Arduino pins are split into category CN5, CN6, CN8, and CN9. The arduino like pins are female connector pins which exactly match the order and position of Arduino UNO pins and hence any Arduino shield can be used with these development boards. The pin one resembles the Arduino UNO and the blue one is the STM32 style ( Morpho). As you can see, there are two sets of pins. The STM32 Nucleo board pinout is shown above. The Board operates with 3.3V supply but a wide voltage range of 7-12V can be provided to the VIN pin since it has an on-board voltage regulator. Similarly, there are two push buttons where one is user programmable, and the other is to reset the Microcontroller. This board also comes with an integrated ST-LINK/V2-1 programmer and debugger hence it is very easy to get started with this board.Īs shown in the image above, there are three LEDs, where LD1 is for indicating USB communication, LD2 is programmable LED, and LD3 indicates power. The Boards pinout is similar to Arduino UNO and has many other additional pins to expand performance. It features the ARM Cortex M4 32-bit STM32F401RET6 microcontroller which is in LQFP64 package.
#NUCLEO F401RE CLION CODE#
If it works, and your code doesn't work with GDB, then you can easily look for difference and find the issue.The STM32 Nucleo boards are the official Development Boards from STMicroelectronics. I'd advice you to build and flash some simple example from libopencm3-examples (like this one), and try to debug it with GDB. Everything works as expected.Īlso it should be mentioned that I'm using libopencm3 in my firmware, so it also might have some influence over success of operation. /cm3/vector.c:68Ħ8 for (src = &_data_loadaddr, dest = &_data Īnd then use usual debugging commands, like step, next, print var, bt, etc. In my case, GDB shows me (on start): GDB connected. Now you can use usual GDB commands for debugging.

Save it as gdb.sh and run it like this (once you powered up your board): $. $GDB -ex "target extended localhost:4242" $elf_file #!/bin/shĮcho "Please provide elf-file for debug symbols" >&2 Of course, st-util must be installed, as that script uses it. Perhaps if you follow my instructions, it will work out for you, too.įirst of all, provide next flags to GCC when building your firmware: # Debug flagsĬFLAGS += -Os -g -fno-schedule-insns -fno-schedule-insns2ĬFLAGS += -fno-omit-frame-pointer -funwind-tables I have a similar setup (except for CLion), and I'm able to debug my STM32 board via STM32F4DISCOVERY (which has ST-LINK v2 on it).


Lastly, if I use configuration of GDB: Default (Bundled) I don't expect it to work well, but it actually gets further and allows a very limited functionality of pausing/resuming (but with absolutely no other abilities) and does not complain about the symbols elf symbols load properly direct from command line. If I use arm-none-eabi-gdb direct from command line ( /usr/bin/arm-none-eabi-gdb verified), things work as normal, breakpoints, stepping, etc. gdbinit but gdbinit seems ignoredįurthermore, it does indicate a connection to st-util running remotely, but I am unable to execute any commands (breakpoints, stepping, pause, etc) except for terminate - which does seem to terminate it. Symbol file: /home/malachi/temp/mbed_test/mbed-os-program/BUILD/NUCLEO_F401RE/GCC_ARM/mbed-os-program.elfįrom CLion, no matter what I do, I consistently get this for Console: Cannot configure GDB defaults: No symbol table is loaded. In the GDB Remote Debug config panel, I've set: GDB: /usr/bin/arm-none-eabi-gdb I read through GDB Monitor commands in CLion providing good insight, but I am having a slightly different issue:
