Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Nucleo F767ZI - Error loading application after creating linker RAM sections

Hello,
I’m starting evaluation of cortex-m7 with a nucleoF767ZI board, with SW4STM32 IDE (I have downloaded it yesterday, I’m running on win10-x64).
I’m using an example from the STM32F7Cube to check various peripherals and execution time.
I have choosen the following project for my tests :
\STM32Cube_FW_F7_V1.7.0\Projects\STM32F767ZI-Nucleo\Examples_MIX\TIM\TIM_6Steps
Don’t ask me why, I choose this one randomly, I don’t check timers for now.
I first tried to make a LED blink to measure execution time of some algorith that manipulates large arrays (50K of data) : LUT, rearrangement of bits, etc...
I’m trying to check this duration for various RAM location of my buffers.

Without any modification to the linker, I use two buffers :
- one of 24576 words placed by linker at address 0x2000013c (DTCM-RAM)
- one of 49152 bytes (same size), placed by linker at address 0x2000c146 (DTCM-RAM)
Anyway, with cache enabled I get 8ms execution time and without cache I get 42ms time...that requires more test to be sure of the final timing when the final application will integrate large data moves between SD card, external SDRAM, Ethernet...because 8ms is ok, 42ms is NOT ok :-)

So I tried to move the data to various locations in RAM, first test : all in SRAM1 zone.
So i added a section in the linker file :

.testSRAM1Block 0x20020000 :
{
. = ALIGN(4);
*(.testSRAM1Location)
*(.testSRAM1Location*)
} >RAM

and I declared the buffers like that :

uint8_t input_buf49152 attribute((section (“.testSRAM1Location”))) ;
uint16_t output_buf24576 attribute((section (“.testSRAM1Location”))) ;

That’s what I see in the output.map file :

.testSRAM1Block
0x20020000 0x18000
0x20020000 . = ALIGN (0x4)
*(.testSRAM1Location)
.testSRAM1Location
0x20020000 0x18000 Example/User/main.o
0x20020000 input_buf
0x2002c000 output_buf
*(.testSRAM1Location*)

Seems good !

BUT when I try to execute application on board, I get the following error :
...
Info : flash size probed value 2048
Warn : no flash bank found for address 20020000
wrote 32768 bytes from file Debug/NUCLEO-F767ZI.elf in 0.504922s (63.376 KiB/s)

    • Programming Finished **
    • Verify Started **

STM32F767ZITx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20080000
STM32F767ZITx.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20080000
Error: checksum mismatch - attempting binary compare
diff 0 address 0x2002419d. Was 0x80 instead of 0x00
diff 1 address 0x200241e1. Was 0x04 instead of 0x00
..and that continues....(up to 128 errors, then it stops signalling)

I did not find any solution on forums :-( Looks like ocd thinks I defined this area for FLASH ? I don’t understand...

Thank you
Aurelien

In fact, I can use the specific section when running in debug mode, not in application mode...
Any idea ?


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs