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 (registration required) various documents highlighting:

System Workbench for STM32


System Reset for unknown reason.

This is an STM32CubeMX created project with the FREERTOS option enabled. The processor is an STM32f373VC. Its BOOT0 pin is grounded.

Eclipse cannot find where in the source code the default breakpoint is. When that breakpoint’s line in the Breakpoints tab is clicked on nothing happens. In the source code the breakpoint, which is expected on the first line of executable code in the function main(), does not appear in the margin.

I am unable to step through code.

In response to Run => Debug the firmware immediately hangs. When I suspend I find it is executing code in an infinite for loop ( for( ;; ); ) because the function Reset_Handler() has been called. The value of RCC->CSR at this point is:
1100 1000 0000 0000 0000 0000 0000.
There is no sign the processor was ever under voltage. This is always at 3.3V.
The WWDG was not an enabled option in STM32CubeMX. The IWDG option was. The IWDG bit is in reset state.
Power regulator is stable according to scope trace. I have no idea why the POR/PDR bit is set unless it is has been set since the board was powered up at the start of a debug session.

The last few lines in Console tab are:


adapter speed: 950 kHz
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080001e4 msp: 0x20008000
Error: address + size wrapped(0xffffffff, 0x00000004)
Error: address + size wrapped(0xffffffff, 0x00000004)


I do not know the meaning of the address + size error. Does this mean the address space has been exceeded?

In the Debug tab there is the line:
C:/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.3.0.201507241045/tools/compiler/bin/arm-none-eabi-gdb (7.8.0.20150304)
When this line is highlighted this message appears in the Console tab:


Program received signal SIGINT, Interrupt.
prvGetRegistersFromStack (pulFaultStackAddress=0x0) at C:/Projects/TEC Driver SW4STM32/TEC/Src/exception_debug.c:187
187 for( ;; );


The file exception_debug.c is code I added to help me determine which interrupt handler has been called. A manually set breakpoint on a line just above 187 works. A manually set breakpoint on the first line of executable code in main() does not get hit.

The relevant compiler options (excluding the includes) are:


-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=”attributeweak” -Dpacked=”attributepacked” -DUSE_HAL_DRIVER -DSTM32F373xC -Og -g3 -Wall -fmessage-length=0 -c -fmessage-length=0



Any comments regarding why there is a system reset, and why the default breakpoint does not appear in source code, would be appreciated.