Forum Replies Created
-
AuthorPosts
-
February 16, 2020 at 17:56 in reply to: Variables are not initialized (RAM with address 0x10000000) #27394MariaParticipantFebruary 16, 2020 at 16:27 in reply to: Variables are not initialized (RAM with address 0x10000000) #27391MariaParticipant
Hi!
I’m continue working on the import.
I did what you said and it started to work, but only when g_Test1[0x6000] is placed in RW_IRAM2
If I place it to RW_IRAM1, it is not initialized.
This is scatter:
LR_IROM1 0x08000000 0x00200000 { ; load region size_region
ER_IROM1 0x08000000 0x00200000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}DMA_BUFFER 0x20000000 0x400 {
*(.dma_buffer)
}
RW_IRAM1 0x20000400 0x0002FC00 {
.ANY (RAM2)
}
RW_IRAM2 0x10000000 0x00010000 {
.ANY (+RW +ZI)
}
}And this is the definition of the variable
char __attribute__((section(“RAM2”))) g_Test1[0x6000] = {
1,
2,
3
};
RW_IRAM2 0x10000000 0x00010000 {
.ANY (+RW +ZI)
}
}- This reply was modified 4 years, 2 months ago by Maria.
February 4, 2020 at 07:56 in reply to: Variables are not initialized (RAM with address 0x10000000) #27329MariaParticipantHi,
I did all steps of import again and checked that Keil compiler is selected.
Now I have startup file in the build. I changed configuration to Release.
But the result is the same. When I add scatter, there is a hardfault. Then I add entry point (main), and the program runs, but variables has junk inside.
I packed new imported project to 7z.
https://drive.google.com/file/d/1nYkUik1OgJfQLrksJanHTo1wyBuvOZQW/view?usp=sharing
February 2, 2020 at 18:01 in reply to: Variables are not initialized (RAM with address 0x10000000) #27319MariaParticipantHi,
here are my two projects.
https://drive.google.com/open?id=1zU5aPyfcMHL-xBK1Fz7J7pPQbcfmwWQN
I really hope that the problem will be reproduced on your side and we will find the solution.
February 2, 2020 at 14:41 in reply to: Variables are not initialized (RAM with address 0x10000000) #27317MariaParticipantHi
I still didn’t succeed to make the project work.
These are my steps:
- I generated from stm32Cube project for my board stm32f429IITx (the project was generated for Keil) – without any special settings. I just chose stm32f429IITx from the list of MCUs.
- I imported this newly generated project to VS with VisualGDB
- It works fine (without scatter and without any other manipulations)
- I add my scatter
- Project run fails to hardfault
- I defined entry point to main
- Project runs, but all variables are not initialized (not only from RW_IRAM2 area but all of them)
- I wanted to examine map file, but it doesn’t exist even that option is set and in the Build window I see these notes:
Linking VisualGDB/Debug/Attempt8…
Program Size: Code=3226 RO-data=486 RW-data=24592 ZI-data=1632
Map file saved to file://D:\playground\VS_import_playground\Attempt8\proj.mapSo there is nothing special in the particular project. There is a problem how VisualGBD works with the scatter. Could you please try to follow my steps and check if it works or not.
January 20, 2020 at 08:34 in reply to: Variables are not initialized (RAM with address 0x10000000) #27145MariaParticipantI created a new project as you described, and yes, it works.
But I still didnt succeed to make my big project work. I checked all settings and I don’t see any difference that could lead to this problem. Furthermore, after all my attempts my project starts to fall into hard fault immediately after the start (Received a SIGTRAP: Trace/breakpoint trap).
I attached my scatter and my map file (I only change it to txt).
Also here is command like for compilation:
-I”..\master\console\console\Middlewares\Third_Party\FatFs\src\drivers” -I”..\master\console\console\Middlewares\ST\STM32_USB_Device_Library\Core\Inc” -I”..\master\console\console\Middlewares\ST\STM32_USB_Device_Library\Class\CDC\Inc” -I”..\master\console\console\Middlewares\ST\STM32_USB_Host_Library\Core\Inc” -I”..\master\console\console\Middlewares\ST\STM32_USB_Host_Library\Class\MSC\Inc” -I”..\master\console\console\Middlewares\Third_Party\FatFs\src” -I”..\master\console\console\Console\Drivers” -I”..\master\console\console\Console\Drivers\wifi\winc1500\host_drv” -I”..\master\console\console\Console\Drivers\wifi\winc1500\host_drv\driver\source” -I”..\master\console\console\Console\Source” -I”..\master\console\console\Console\Source\GUI” -I”..\master\console\console\Console\Source\GUI\Screens” -I”..\master\console\console\Console\Source\GUI\Fonts” -I”..\master\console\console\lwip\src\include” -I”..\master\console\console\lwip\src\include\ipv4″ -I”..\master\console\console\lwip\system” -I”..\..\Packs\CMSIS-FreeRTOS\10.2.0\CMSIS\RTOS2\FreeRTOS\Include” -I”..\..\Packs\CMSIS-FreeRTOS\10.2.0\CMSIS\RTOS2\FreeRTOS\Include1″ -I”..\..\Packs\CMSIS-FreeRTOS\10.2.0\Source\include” -I”.\RTE\RTOS” -I”..\..\Packs\CMSIS-FreeRTOS\10.2.0\Source\portable\RVDS\ARM_CM4F” -I”..\..\Packs\CMSIS\5.6.0\CMSIS\RTOS2\Include” -I”..\..\Packs\CMSIS\5.6.0\CMSIS\Core\Include” -I”..\master\console\console\Inc” -I”..\..\Packs\CMSIS\5.6.0\CMSIS\Core_A\Include” -I”D:\playground\VS_import_playground\master\console\Packs\CMSIS\5.6.0\CMSIS\Core\Include” -I”RTE” -I”../master/console/Packs/CMSIS/5.6.0/CMSIS/RTOS2/Include” -I”D:\playground\VS_import_playground\master\console\Packs\CMSIS-FreeRTOS\10.2.0\CMSIS\RTOS2\FreeRTOS\Include1″ -I”../master/console/console/MDK-ARM/RTE/RTOS” -I”../master/console/Packs/CMSIS-FreeRTOS/10.2.0/CMSIS/RTOS2/FreeRTOS/Include” -I”../master/console/Packs/CMSIS-FreeRTOS/10.2.0/Source/include” -I”..\master\console\console\Drivers\STM32F4xx_HAL_Driver\Inc” -I”..\master\console\console\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy” -I”D:\playground\VS_import_playground\master\console\Packs\CMSIS-FreeRTOS\10.2.0\Source” -I”..\master\console\Packs\CMSIS-FreeRTOS\10.2.0\Source\portable\RVDS\ARM_CM4F” –apcs=interwork -O0 -g -D”USE_HAL_DRIVER” -D”STM32F429xx” -D”DEBUG=1″ –gnu –c99 –split-sections “VisualGDB\Debug\”
And command line for the linker:
-o “D:\playground\VS_import_playground\Attempt3\VisualGDB\Debug\Attempt3” –info unused –info sizes –scatter “Clear_for_Keil.sct” –xref –info summarysizes –map –info totals “RMS_Console_map” –symbols –strict –callgraph –emit_relocs –info veneers
I really need your help. Thank you.
- This reply was modified 4 years, 3 months ago by Maria.
Attachments:
You must be logged in to view attached files.January 15, 2020 at 07:28 in reply to: Variables are not initialized (RAM with address 0x10000000) #27062MariaParticipantHi!
Thank you for your response!
Here is my scatter file. I woks fine when I run the project from Keil. All my RAM sections is inside LR_IROM1 block.
I’m using attribute section only for SPI DMA buffers. In all other cases I rely on the linker and I have no preferences where to put other variables.
Should I make any changes in my scatter to make it work in VS?
LR_IROM1 0x08000000 0x00200000 { ; load region size_region
ER_IROM1 0x08000000 0x00200000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
DMA_BUFFER 0x20000000 0x500 {
*(.dma_buffer)
}
RW_IRAM1 0x20000500 0x00030000 { ; RW data
.ANY (+RW +ZI)
}
RW_IRAM2 0x10000000 0x00010000 {
.ANY (+RW +ZI)
}
}- This reply was modified 4 years, 3 months ago by Maria.
-
AuthorPosts