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


RAM function not going into RAM?

I’m trying to program the dual-bank flash of the STM32L082 microcontroller, and in order to have decent flash write speed, I need to program in half-page increments. I’m trying to use the half-page program function in HAL.

When I use it, I get a run-time error in the flash program status register FLASH_SR saying that the programming was interrupted by a fetch (bit 17, FWWERR). This is the error that could be explained if the half-page program function is not running from SRAM. When I step through the code with a debugger, I see that the program counter is 0x0800e190, which is in the middle of bank 1 of flash, which makes me think that the HAL “__RAM_FUNC HAL_FLASHEx_HalfPageProgram(uint32_t Address, uint32_t* pBuffer)” isn’t actually getting compiled into RAM. Is there something special I need to do to force the function into RAM?

I searched around a bit and found someone who recommended I change the option in the flash_ramfunc.c file to have “position indpendent code”. I checked that box but I’m still getting program counters in the bank 1 flash range, but now I get about a dozen PC halted console messages for every step.

Anyone have a suggestion for what I need to do to get a function to live in RAM?
Thanks in advance

Bruno from STMicro helpfully replied on another forum on how to make the ram function work.

Here’s a code snippet from the linker script:

/* Initialized data sections goes into RAM, load LMA copy after code */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.RamFunc) /* .RamFunc sections */

. = ALIGN(4);
_edata = .; /* define a global symbol at data end */
} >RAM AT> FLASH

When I added the red text to my linker script in that area, the function was placed correctly in RAM and the half-page programming started working.