elmot / clion-embedded-arm

OpenOCD + STM32CubeMX support for CLion
https://blog.jetbrains.com/clion/2017/12/clion-for-embedded-development-part-ii
Other
170 stars 29 forks source link

Unable to debug if linker script has two applications #112

Closed tmauron closed 5 years ago

tmauron commented 6 years ago

Expected Behavior

Ability to debug an app that does not begin at 0x08000000 but at ORIGIN = 0x08008000 for example. (With VECT_TAB_OFFSET = 0x8000). It works fine in the command line (openocd & gdb). This is usefull if you have two applications. For example a bootloader and an application.

Actual Behavior

FW download works (no error). When I press RESET the execution is stuck in the disassembly file.

Steps to Reproduce the Problem

  1. Change linker script: ORIGIN = 0x08008000 and VECT_TAB_OFFSET = 0x8000
  2. Try with command line (openocd & gdb) => this works.
  3. Run with CLion debug (code stuck like there were breakpoints in assembly). Make sure there are NO breakpoints anywhere. (Same behaviour with breakponits).

Thank you!

Specifications

elmot commented 6 years ago

Can you provide a reproducible example? is it possible to just flash a stub of the bootloader which just jumps to the correct address?

elmot commented 5 years ago

This is not going to be implemented in open-source plugin. If the issue is still valid, please create a feature request at JetBrains YouTrack system. Please do not forget to provide an example.