Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world.
And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download two short videos (registration required) highlighting:

System Workbench for STM32


You are viewing a reply to gprof gnu profiling tools ?  

gprof gnu profiling tools ?

i have folowed the “mcu on eclipse” instruction and with a few minor change i get it to work

basicaly what i did and changed
get all proiling subfolder from github source
in gmon.c


change the symbol used to “bound” the code “text” section

if (!already_setup) {
    extern char _etext; /* end of text/code symbol, defined by linker */
    //MS the __etext is _etext on st ld file
    already_setup = 1;
    //MS 0x410 is not suitale for stm32f4 let use Reset_Handler that is just after isr table and low level init
    extern char Reset_Handler;
    monstartup((uint32_t)&Reset_Handler, (uint32_t)&_etext);
  }


in profile.c use a specific timer at 1KHz for prolining instead os systick (systick cant be cusotmized in cubemx project)
not ethat this timer get setup and started in main not best thing :-(

void TIM7_IRQHandler(void) {
  //void OSA_SysTick_Handler(void);
  static size_t pc, idx;

  //OSA_SysTick_Handler(); /* call normal Kinetis SDK SysTick handler */
  if (prof.state==PROFILE_ON) {
    pc = ((uint32_t*)(__builtin_frame_address(0)))[14]; /* get SP and use it to get the return address from stack */
    if (pc >= prof.lowpc && pc < prof.highpc) {
      idx = PROFIDX (pc, prof.lowpc, prof.scale);
      prof.counter[idx]++;
    }
  }
  //MS re-arm the specific profiler timer
  __HAL_TIM_CLEAR_IT(&htim7, TIM_IT_UPDATE);
}


customize the system_stm32f4xx.c to init the profiling
best option would be to add “prof init” as part of the “lib init array” so that no files changes would be required

void SystemInit(void)
{
	void _monInit(void);
	_monInit();
// ...


bad point is that semithosting “relative path” wan’t let create a file in the project
So rigth now i had to force “gmon.out” to obsolute path where write is ok but’s that very user specific :-(

void _mcleanup(void) {
	static const char gmon_out[] = "c:\\tmp\\gmon.out";


you can folow http://www.openstm32.org/forumthread164Question to get semihosting working and news on the file path

 

Newest Forum Posts

  1. STM32429I_Discovery board with printf float support problem by johannes.visser@msc-technologies.eu, 16:08
  2. malloc heap issue with CubeMX Project by johannes.visser@msc-technologies.eu, 16:04
  3. Debugger not working by Daniel Jack Morley, 2019-11-27 21:46
  4. Compiler change problem by Lucian Pop, 2019-11-20 17:41
  5. Sample programs and compiling by jjtimer, 2019-11-20 10:31
  6. Unit test issues for STM32 by Rinkedevries, 2019-11-18 10:32
  7. Ubuntu 19.04 Debug problems by costantino, 2019-11-17 19:17
  8. Compile without eclipse by JSStabl, 2019-11-14 15:55
  9. Problem with PWM signal by ElectroniK, 2019-11-13 20:55
  10. Does System Workbench for STM32 work on a Raspberry Pi 4? by betocool, 2019-11-10 05:27

Last-Modified Blogs