0

I am currently working on a library that abstracts the use of a stm board (specifically the NUCLEO-H723ZG) and we are on the profiling phase. I did get to make the profiling with the SWV after a big headache with the SB26 bridge that comes with the aforementioned board, using the auto generated code from stm32cubeIDE.

Now i need to do the same but abstracting the auto generated code from the stm32cubeIDE into a method that does all the configuration for you, but i cannot pin point what is really missing. I already have copied the SystemClock config, the PeriphCommonClock config, both SCB_Enable Cache and the MPU_Config (and yes both are using the same copy of the ioc configuration). Any ideas of what i could be missing?

I tried to profile an autogenerated main.c and after some configuration it worked perfectly.

Then i tried to do the same with a main.cpp and copying the methods form the autogenerated main one by one (just to see whose were needed) and after copying them all it didn t work. The code executes and the live expressions work. The configurations are the same on the .ioc and the debugging.

I m now looking for the minimum necessary for an SWV configuration method, preferably non dependant from HAL.

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
r1ckk
  • 11
  • 2
  • So you decided to create x-y problem yourself. What for? – 0___________ Feb 03 '23 at 22:06
  • Read how the debug, trace and other debug hardware works . Do not follow HAL - **read the documentation** – 0___________ Feb 03 '23 at 22:08
  • What are you actually trying to do? "making a library that abstracts" isn't a goal, it is a method which may or may not be appropriate depending on the goal. What are you actually trying to achieve, apart from tying yourself in knots with code generation? – Tom V Feb 04 '23 at 16:33

0 Answers0