dananjayavr / mes_project_board_template

Template NUCLEO-F439ZI project to be used for various assignements in Making Embedded Systems course.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prerequisites

  • CMake
  • ARM GNU GCC Tools
  • MinGW

Build the project (Manual)

  • Create a build folder (ex. cmake-build-debug) and cd to that folder

  • Run cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=../arm-none-eabi-gcc.cmake -DCMAKE_BUILD_TYPE=Debug ..

  • Then, run cmake --build . -- -j 4

  • You should obtain .bin and .hex files for your target

Run project

  • Use STM32CubeProgrammer to program the device.

Build the project (with CLion)

  • Open the folder containing CMakeLists.txt and *.cmake file with CLion.
  • In File -> Settings -> Build, Execution, Deployment section, add the following to CMake options field: -DCMAKE_TOOLCHAIN_FILE=arm-none-eabi-gcc.cmake
  • CLion should reload the CMake project without any errors.
  • Build the project

Debug using OpenOCD and CLion

  • Create a new run configuration (Run -> Edit Configurations)
  • Add a new OpenOCD Download & Run configuration
  • In the board config file field, supply the appropriate configuration file. Ex. https://github.com/ntfreak/openocd/blob/master/tcl/board/st_nucleo_f4.cfg
  • Also make sure to fill the Executable field ex. template.out file in the build folder
  • Pressing the Run button should now flash the target
  • To debug, place a breakpoint and click on the green bug (debug) icon. The debugger should stop at the breakpoint

Troubleshooting

Sources

About

Template NUCLEO-F439ZI project to be used for various assignements in Making Embedded Systems course.


Languages

Language:C 62.7%Language:HTML 32.4%Language:JavaScript 2.0%Language:Assembly 1.9%Language:CSS 0.8%Language:C++ 0.1%Language:Batchfile 0.0%Language:Python 0.0%Language:CMake 0.0%