This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Event Recorder with STM32F0

I have been able to get the Event Recorder mostly working with ARM-MDK 5.27, in order to get debugging messages out of my STM32F0 (Cortex-M0) MCU. However, I've run into two issues that I am hoping someone here can help me resolve. I have not been able to find definitive answers to either in numerous web searches:

1. On my MCU, configuring the Event Recorder record count appears to use more RAM than expected. I have set my record count to 64U, which should account for 1,024 bytes (16 bytes per record). However, when I allocate an uninitialized IRAM2 region of 1,024 (0x400) bytes, I get an error than the allocation is not enough:

myproject\myproject.axf: Error: L6220E: Execution region RW_IRAM2 size (1252 bytes) exceeds limit (1024 bytes). Region contains 0 bytes of padding and 0 bytes of veneers (total 0 bytes of linker generated content).

Where do the extra 228 bytes come from? I can only allocate record counts in 2^n numbers, and whatever number I pick (64U, 128U, etc.) results in an overrun of IRAM2 when compiling, even when increasing the allocation of uninitialized IRAM2. I have to use a larger uninitialized IRAM region (e.g., 2,048 bytes) and a smaller record count (e.g., 64) in order to compile without errors. This is a waste of at least 796 bytes of RAM for a 2,048 byte allocation. How can I work around this?

2. On the same MCU, attempting to set the Event Recorder to use its time stamp source as SysTick results in a linker error about multiple definitions of SysTick_Handler:

myproject\myproject.axf: Error: L6200E: Symbol SysTick_Handler multiply defined (by eventrecorder.o and stm32f0xx_it.o).

If I define the time stamp source to be the DWT Cycle Counter, I get a warning. From my reading, it seems like DWT is emulated in the Cortex-M0, but I still get the warning:

C:\Keil_v5\ARM\PACK\Keil\ARM_Compiler\1.6.1\Source\EventRecorder.c(660): warning:  #1215-D: #warning directive: "Invalid Time Stamp Source selected in EventRecorderConf.h!"

I want to confirm that this is working correctly with DWT and not going to cause issues.

Thanks in advance for any help!

Neil

Parents
  • Over one year ago and still no assistance with this. I found this as I am having the same problem myself. It seems to work when the source is set to the DWT cycle counter, but to have that error every time is unacceptable for production software and also does give the feeling that something isn't configured correctly...

Reply
  • Over one year ago and still no assistance with this. I found this as I am having the same problem myself. It seems to work when the source is set to the DWT cycle counter, but to have that error every time is unacceptable for production software and also does give the feeling that something isn't configured correctly...

Children